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

Most PipeWire clients dont get grabbed #3672

Open
mpeter50 opened this issue Feb 14, 2025 · 15 comments
Open

Most PipeWire clients dont get grabbed #3672

mpeter50 opened this issue Feb 14, 2025 · 15 comments

Comments

@mpeter50
Copy link

EasyEffects Version

7.2.3

What package are you using?

Flatpak (Flathub)

Distribution

openSUSE Leap 15.6

Describe the bug

EasyEffects only redirects a few processes that play audio to its audio sink. Such a program is the non-flatpak Deadbeef music player.
But most others dont get grabbed for some reason, like Librewolf (Firefox fork, flatpak), games from Steam (Steam is native package), or even the volume change effect from the KDE Plasma Audio Volume widget.

Expected Behavior

All pipewire clients get grabbed by EasyEffects so that effects are applied to their sound.

Debug Log

The log was too big to paste here: easyeffects.log

Additional Information

I watch the pipewire audio connections in QPWGraph, and I can see that deadbeef connects to "Easy Effects Sink" as expected, but everything else I listed above is directly connected to the default audio output device.
When watching the logs, I have observed that when such a pipewire client appears that EE does not grab, the following is logged in pairs (probably because stereo):

pipe_manager.cpp:1344   No node with id 100 in our node_map

I can correct the connections manually with QPWGraph, and then effects get applied as expected, but thats a bit painful, especially when a client disappears or resets connections when audio pauses.

I have noticed that theres a button in the Audio Volume widget that reads as "play all audio via this device", that redirects even deadbeef to the default system audio output device. I wanted to clarify that the above is regarding to when that was not pressed.

pwdump.txt

Pavucontrol tabs:

Playback Recording Output Devices Input Devices Configuration
Image Image Image Image Image

EasyEffects does not crash, it keeps running, so no coredump.
If you want to test something, let me know! Sometimes I cannot respond for a few days, but I'm happy to help diagnose this.

@wwmm
Copy link
Owner

wwmm commented Feb 15, 2025

or even the volume change effect from the KDE Plasma Audio Volume widget.

This one is probably being blocklisted inside EasyEffects for historical reasons. In the past system notification sounds caused some weird side effects.

like Librewolf (Firefox fork, flatpak), games from Steam (Steam is native package)

Hum... I play on Steam regularly and things are fine. Same on Firefox. Are you sure your pipewire installation is completed? Sometimes people do not install pipewire-pulse. Although EasyEFfects does not need the compatibility layer some of PipeWire functionality is usually put inside this package.

@mpeter50
Copy link
Author

mpeter50 commented Feb 15, 2025

I think I have that, here its called pipewire-pulseaudio. Here is the installation summary for packages that have pipewire in the name:

S  | Name                                    | Summary                                                                  | Type
---+-----------------------------------------+--------------------------------------------------------------------------+-----------
   | gstreamer-plugin-pipewire               | Gstreamer Plugin for PipeWire                                            | package
   | gstreamer-plugin-pipewire-debuginfo     | Debug information for package gstreamer-plugin-pipewire                  | package
   | kpipewire-devel                         | Development files for kpipewire                                          | package
i  | kpipewire-imports                       | QtQuick bindings for kpipewire                                           | package
i  | libKPipeWire5                           | PipeWire integration for KDE Plasma - main library                       | package
i  | libKPipeWire5-lang                      | Translations for package kpipewire                                       | package
i  | libKPipeWireDmaBuf5                     | PipeWire integration for KDE Plasma - DMA-BUF support                    | package
i  | libKPipeWireRecord5                     | PipeWire integration for KDE Plasma - recording support                  | package
i+ | libpipewire-0_3-0                       | A Multimedia Framework designed to be an audio and video server and more | package
i  | libpipewire-0_3-0-32bit                 | A Multimedia Framework designed to be an audio and video server and more | package
   | libpipewire-0_3-0-debuginfo             | Debug information for package libpipewire-0_3-0                          | package
i+ | pipewire                                | A Multimedia Framework designed to be an audio and video server and more | package
   | pipewire                                | A Multimedia Framework designed to be an audio and video server and more | srcpackage
i+ | pipewire-alsa                           | PipeWire media server ALSA support                                       | package
   | pipewire-alsa-32bit                     | PipeWire media server ALSA support                                       | package
   | pipewire-alsa-debuginfo                 | Debug information for package pipewire-alsa                              | package
   | pipewire-debuginfo                      | Debug information for package pipewire                                   | package
   | pipewire-debugsource                    | Debug sources for package pipewire                                       | package
i+ | pipewire-devel                          | Development Files For PipeWire, A Multimedia Framework                   | package
i+ | pipewire-doc                            | PipeWire media server documentation                                      | package
i+ | pipewire-jack                           | PipeWire JACK implementation                                             | package
i+ | pipewire-lang                           | Translations for package pipewire                                        | package
i  | pipewire-libjack-0_3                    | PipeWire libjack replacement libraries                                   | package
   | pipewire-libjack-0_3-32bit              | PipeWire libjack replacement libraries                                   | package
   | pipewire-libjack-0_3-debuginfo          | Debug information for package pipewire-libjack-0_3                       | package
   | pipewire-libjack-0_3-devel              | Development files for pipewire-libjack-0_3                               | package
   | pipewire-module-x11-0_3                 | X11 support For PipeWire, A Multimedia Framework                         | package
   | pipewire-module-x11-0_3-debuginfo       | Debug information for package pipewire-module-x11-0_3                    | package
   | pipewire-module-xrdp                    | Enable xrdp to generate sound with pipewire                              | package
i  | pipewire-modules-0_3                    | Modules For PipeWire, A Multimedia Framework                             | package
i  | pipewire-modules-0_3-32bit              | Modules For PipeWire, A Multimedia Framework                             | package
   | pipewire-modules-0_3-debuginfo          | Debug information for package pipewire-modules-0_3                       | package
i+ | pipewire-pulseaudio                     | PipeWire PulseAudio implementation                                       | package
   | pipewire-pulseaudio-debuginfo           | Debug information for package pipewire-pulseaudio                        | package
i+ | pipewire-spa-plugins-0_2                | Plugins For PipeWire SPA                                                 | package
i  | pipewire-spa-plugins-0_2-32bit          | Plugins For PipeWire SPA                                                 | package
   | pipewire-spa-plugins-0_2-debuginfo      | Debug information for package pipewire-spa-plugins-0_2                   | package
   | pipewire-spa-plugins-0_2-jack           | SPA Plugin to use PipeWire as jack client                                | package
   | pipewire-spa-plugins-0_2-jack-debuginfo | Debug information for package pipewire-spa-plugins-0_2-jack              | package
i+ | pipewire-spa-tools                      | The PipeWire SPA Tools                                                   | package
   | pipewire-spa-tools-debuginfo            | Debug information for package pipewire-spa-tools                         | package
i+ | pipewire-tools                          | The PipeWire Tools                                                       | package
   | pipewire-tools-debuginfo                | Debug information for package pipewire-tools                             | package
   | qemu-audio-pipewire                     | Pipewire based audio support for QEMU                                    | package

i+ means user installed, i means automatically installed.

@wwmm
Copy link
Owner

wwmm commented Feb 15, 2025

I think I have that, here its called pipewire-pulseaudio

Ok. In this case the only thing that comes to my mind is that maybe EasyEffects isn't compatible with the PipeWire version 1.0.5 you have installed. Here on Arch Linux I have 1.2.7. As far as I remember It has been a few years since the last time someone had incompatibility between EasyEffects and PipeWire versions. So I am not 100% sure this is your situation. And I would expect more OpenSUSE users to be here if the Pipewire version provided by OpenSUSE is the problem. Strange...

@wwmm
Copy link
Owner

wwmm commented Feb 15, 2025

EasyEffects only redirects a few processes that play audio to its audio sink.

Just to clarify. Are streams visible in EasyEffects Players tab but without being moved automatically to our virtual device? Or they do not even show in our tab? I was assuming they are not even there. But if it is just the automatic move not working maybe the problem is on wireplumber package. At the end of the day WirePlumber is the one doing the streams moves that EasyEffects requests.

@wwmm
Copy link
Owner

wwmm commented Feb 15, 2025

At the end of the day WirePlumber is the one doing the streams moves that EasyEffects requests.

And EasyEffects will only request this if Process All Output Streams is enabled in our preferences window.

@mpeter50
Copy link
Author

No, other apps dont even show up there. They are not in the excluded section either.

Process All Output Streams is enabled.

@mpeter50
Copy link
Author

Hmm I have found that some of my pipewire packages did not transfer to the packman repository from the official one, when I moved over pipewire itself. I'll try to unify it and see if it changes.

@wwmm
Copy link
Owner

wwmm commented Feb 15, 2025

No, other apps dont even show up there. They are not in the excluded section either.

Hum... Maybe we do have some incompatibility with that PipeWire release. I can't think of another explanation right now.

@mpeter50
Copy link
Author

Unifying the packages did not help. But! At least now I can select aptx codec for my headphone. Earlier I though its not present becaue the bt dongle does not support it.

Is there a way I could see if theres an incompatibility issue?
I dont see anything obvious in journalctl --user after a reboot, from the point when easyeffects was auto started.

It is most probably unrelated, but maybe you see some correlation: at the same time I'm fighting with another issue that completely freezes the whole system either right at login, or a few screen frames later. It breaks TTY switching, and TTY operation too if I can switch fast enough. It occurs with a pretty high chance. I blame it on nvidia for now, but I am yet to find out what causes this precisely.
Its funny because if it does not happen at login, it is pretty likely that it wont happen later either. And it also does not freeze on SDDM if I dont login.

@wwmm
Copy link
Owner

wwmm commented Feb 15, 2025

Is there a way I could see if theres an incompatibility issue?

This is usually hard to figure out. Maybe while fixing other issues we started to do things in a way that is not compatible with that PipeWire release (and older) anymore. But I can't remember anything that would make almost all apps to not be visible in EasyEffects window. And I would expect more OpenSUSE users to be affected. But so far you are the only one reporting something like this. So with lucky it may be just some kind of bad installation or configuration.

@mpeter50
Copy link
Author

I did some digging, and found something interesting (to me).

First I have downgraded easyeffects to 7.1.6:

sudo flatpak update --commit 3ca75fb27312e5b85127f1263c9f6db48d1779d6c8440027cae9db019740c367 com.github.wwmm.easyeffects

This did not fix the problem, but I'll come back to this later.

Then I have built the flatpak package locally, on git tag v6.3.0, according to the wiki instructions:

flatpak-builder build-dir --install-deps-from=flathub --user --install util/flatpak/com.github.wwmm.easyeffects.Devel.json --force-clean --ccache

When that was done, I have installed the flatpak package of LSP plugins 21.08. Tried 23.08 too as in the wiki, but EE didnt recognize it, so tried 21.08 which was working. I have seen this version number in the flatpak mainfest in the git repo.

flatpak install flathub org.freedesktop.LinuxAudio.Plugins.LSP

Here I selected the version manually in the prompt.
The package was probably installed only for my user, because I have chosen the user-saved flathub repository when I was asked.

Then I ran the built EE:

flatpak run com.github.wwmm.easyeffects.Devel

When it started up, the Amarok music player (which wasn't grabbed by the latest version) got grabbed automatically by it. This seems to be happening reliably both when I start Amarok while EE is already running, and when I start EE when Amarok is already running.

Image

Ok, so 6.3.0 is able to detect clients that 7.2.3 cant.
But here comes the trick.

I have tried again the flathub release of EasyEffects 7.1.6.
Now that too grabs Amarok, both when Amarok is started first, and when EE is started first. I'm sure I'm running 7.1.6, it says so in the about menu, and it does not have the slopes on the window decoration.
The system's default device is my headphone in KDE's Audio Volume widget, not the "Easy Effects Sink".

When I have found this out, I have updated it to 7.2.3, to see what happens there.
Now it automatically grabs Amarok at startup (so when Amarok is started first), but later it doesnt, and when Amarok starts the next track and recreates its connections, it wont be grabbed.

The above does not only apply to Amarok, Flatpak Librewolf also gets grabbed now the same way.

Image


What do you think? What may have happened?

It seems that building EE 6.3.0, and/or installing org.freedesktop.LinuxAudio.Plugins.LSP 21.08, and/or something else, has changed something for newer EE versions too. 7.1.6 now works perfectly, 7.2.3 does not but its closer too.
But not too much else could have changed because today earlier was when I have set up the EE Sink as default output device as a workaround, because at that time it wasnt working. I have rebooted once or twice since then, installed flatpak-builder, and I think thats all, packages didnt get updated probably.

@wwmm
Copy link
Owner

wwmm commented Feb 17, 2025

It seems that building EE 6.3.0, and/or installing org.freedesktop.LinuxAudio.Plugins.LSP 21.08, and/or something else, has changed something for newer EE versions too. 7.1.6 now works perfectly, 7.2.3 does not but its closer too.

Hum... The Linux Studio Plugins package should not be related to this. Some plugins will be broken if it has an incompatible version. But EasyEffects relies only on PipeWire/WirePlumber to handle streams. My guess is that this whole process somehow updated the Flatpak runtime or some of the libraries it needs.

In any case the fact that 7.2.3 still doesn't work is a sign that it is still not like it should be. Something in the Flatpak installation is not new enough or missing.

@wwmm
Copy link
Owner

wwmm commented Feb 17, 2025

@violetmage do you have any suggestion about how to check if the Flatpak installation is missing something we need or it is providing a too old runtime?

@violetmage
Copy link
Contributor

Other than flatpak repair and flatpak list, nothing else comes to mind at the moment. I will look into this more once I'm back at my desk today.

@violetmage
Copy link
Contributor

violetmage commented Feb 18, 2025

I forgot to mention, when using flatpak repair and flatpak list, remember to try both system and user installations;

$ flatpak repair --system

$ flatpak repair --user

$ flatpak list --system

$ flatpak list --user

To be clear, normally you shouldn't need to specify --user or --system when working with flatpak. In fact, mixing the use of --user and --system when making changes to the installation will usually cause strange things to happen in the end. In this case, repair and list are effectively read-only operations, so mixing --system and --user here is ok.

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