Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG?] App's Audio input selector doesn't change the capture audio input #177

Closed
Abrifq opened this issue Aug 15, 2024 · 10 comments
Closed

Comments

@Abrifq
Copy link

Abrifq commented Aug 15, 2024

Version 0.4.2
on Flatpak
Using pipewire 0.3.48 (+patches)

Hello,
I noticed when i check Recognize from my speakers the volume meter continued to reflect the volume of my microphone.

When I check from pavucontrol it showed that the app was actually continuing to capture from the mic.

I changed it to the Monitor of my headphones in pavucontrol, now it recognizes normally & the volume meter reflects the speaker volumes.

Is this still a current issue or is it fixed and i'm somehow out of date?

@Dark-Thoughts
Copy link

I can at least say that it does not recognize any of my output channels, making the whole app completely broken basically.

@Abrifq
Copy link
Author

Abrifq commented Sep 21, 2024

I can at least say that it does not recognize any of my output channels, making the whole app completely broken basically.

Do you have pulseaudio or pipewire installed?
Did you forward access to those with flatpak? (if not, try uninstalling and then installing again)

@Dark-Thoughts
Copy link

pctl info says "Server Name: PulseAudio (on PipeWire 1.0.7)".
In Discover it says it has access to Pulseaudio Sound Server permissions, if you mean that.

@Abrifq
Copy link
Author

Abrifq commented Sep 21, 2024

Try running it from the terminal with flatpak run com.github.marinm.songrec and send us the log/text output please.

@Dark-Thoughts
Copy link

There's no output other than this one which appeared after a few seconds of idling:
** (songrec:2): WARNING **: 11:40:06.858: atk-bridge: get_device_events_reply: unknown signature

@marin-m
Copy link
Owner

marin-m commented Sep 25, 2024

Hello!

Could you please also specify with Linux distribution (and version thereof) you are using?

Regards

@marin-m
Copy link
Owner

marin-m commented Sep 26, 2024

I have tested in a recent Archlinux build both inside Flatpak and outside Flatpak.

Outside Flatpak the source input change feature works normally.

Inside Flatpak the devices are correctly listed but the source input change feature is effectively inoperant.

More specifically, the pa_context_move_source_output_by_name function from libpulse (wrapped through the move_app_by_name and move_source_output_by_name method calls in the pulsectl Rust crate we are using) is called normally and returns no error but it has no visible effect.

This looks like a regression somewhere in the ALSA wrapper/PulseAudio/PipeWire/Flatpak chain, hard to tell where.

@Dark-Thoughts
Copy link

Hello!

Could you please also specify with Linux distribution (and version thereof) you are using?

Regards

As stated here I'm currently on Bazzite, before that I was on Nobara. Both had the same issue.

@marin-m
Copy link
Owner

marin-m commented Sep 27, 2024

According to the systemd log (journalctl -f) there is now some kind of permission check preventing from changing the input source from within Flatpak apparently

sept. 27 10:49:43 arch-vbox pipewire-pulse[1178]: mod.protocol-pulse: client 0x560830295130 [MainConn]: ERROR command:68 (MOVE_SOURCE_OUTPUT) tag:8 error:1 (Permission non accordée)
sept. 27 10:49:43 arch-vbox pipewire-pulse[1178]: mod.protocol-pulse: client 0x560830295130 [MainConn]: ERROR command:68 (MOVE_SOURCE_OUTPUT) tag:10 error:1 (Permission non accordée)

Also there is some documentation here: https://docs.pipewire.org/page_access.html + https://docs.pipewire.org/page_module_access.html

marin-m added a commit that referenced this issue Sep 29, 2024
marin-m added a commit to flathub/com.github.marinm.songrec that referenced this issue Sep 29, 2024
…l to allow switching to monitor mode on recent pipewire-pulse-based setups (see marin-m/SongRec#177)
@marin-m
Copy link
Owner

marin-m commented Sep 29, 2024

After taking advice at https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4326 it seems that adding the --device=all to the Flatpak manifest of SongRec fixed the issue (at least it works normally for me now on Arch, unlike with the former --device=dri permission flag).

The fix has been released and pushed to Flathub so I'm closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants