-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
[Feature Request] Adding support to Pipewire? #397
Comments
Once it becomes the default in Arch Linux I will definitely try to make PulseEffects working on it. But I wonder if it will be possible. Last time I looked it seemed to me that the audio section of pipewire was still in its infancy. It is not clear to me how pipewire intends to deal with audio effects tools like PulseEffects. They have to provide means for us to intercept applications audio. I hope they implement this better than pulseaudio. |
@q2dg Fedora fiddlesticks will never become default in Arch Linux. |
One question; what do you mean by "the default in Arch Linux"? A major point of Arch Linux is that there are almost no defaults. You install the You can for example install the |
You can do almost anything you want. Fair enough. But as soon as you install any desktop over the base install the audio server installed as dependency is Pulseaudio and not Pipewire. It doesn't ask you which one you want. It installs Pulseaudio. And for a good reason. Some programs like Firefox expect Pulseaudio and not Pipewire to be there |
It seems that they have some work on the audio side done https://github.com/PipeWire/pipewire/search?l=C&q=audio |
They probably still needs some compatibility layer for Pulseaudio only apps. I took a look at their api and I could not see a way to replicate what I can do now in Pulseaudio. Things like redirecting apps audio to a custom sink, getting info about the apps playing(sampling rate, format,...), etc |
The good thing is that as GStreamer is a first class citizen for Pipewire I doubt we would need any change to the effects chain. |
Okay I completely trust your judgment on whether it is ready for your use cases. I just found that specific statement odd. I did check my system by the way. It has both
|
Also I'm quite sure that Pipewire does not currently replace the sound server component. It still uses PulseAudio for this, or so I have read. That is why both can be installed at the same time. |
At some point There is a interesting read here https://github.com/PipeWire/pipewire/wiki/PulseAudio and here https://github.com/PipeWire/pipewire/wiki/FAQ But it is not clear if this is still the current state |
Its been about a year and a half and I was just wondering if there was an update to this? Note to readers, the above wiki has moved from github to gitlab, now see: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/FAQ and https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/PulseAudio |
Hello! There is no work being done in the Pipewire integration. Honestly it is not clear to me yet if it is even possible to do what we need in Pipewire. I will explain in a few words how PulseEffects applies effects. Maybe it will help a reader more familiar with Pipewire to tell if it evolved enough to our needs. One of the first steps done now is creating a virtual output device. Or a null sink in Pulseaudio's words. In order to apply effects we move the audio app from the sound card to this virtual output device. The next step is telling GStreamer to get audio from this virtual output device. After the desired effects are applied by GStreamer we tell it to play the result to the sound card. It is still unclear to me if third party apps have a way to redirect a given audio app sound to some kind of virtual device. Another important point is that different audio contents may have different sampling rate. So this virtual device has to choose a rate and resampling anything that is different. Pulseaudio does that for us. I do not know how Pipewire is handling this. In my opinion we will have to wait till many audio applications start to use Pipewire directly. Then the answers to these questions might become clear. At this moment I do not see a point in using Pipewire api when audio applications are still talking directly to Pulseaudio. |
Today Arch Linux decided to replace Pulseaudio by Pipewire. I will save the time of PulseEffects users and say that PulseEffects is not working in Pipewire. Although Pipewire is a drop-in Pulseaudio replacement for most audio applications this only happens if the application does not need to load Pulseaudio modules. And at this moment PulseEffects relies on Pulseaudio null sinks to redirect applications. I am reading Pipewire API but so far I did not see how Pipewire intends to handle this task. And that doc is even more confusing than the one from Pulseaudio... Long story short people replacing Pulseaudio by Pipewire may stay without PulseEffects for a while... |
Can you please pin this issue? And please @wwmm, write that statement also in the readme. |
Done. |
@wwmm Work in Pipewire to support module loading (e.g. via I would suggest filing a bug on the Pipewire issue tracker for use cases that aren't working yet. Edit: Of course to use this you must have the pipewire-pulse daemon running. And to users I should point out that Pipewire allows using JACK applications and Pulse applications in the same graph. This means that you could use pro-audio effects plugins in a host such as JACK Rack, Carla, or Ardour and graphical routing via a patch bay like Patchmatrix or gjackctl. |
This is nice but, I think it's not really the same. Probably I will be able to set up things on Pipewire to get the same plugins I'm using now on PulseEffects to work and play on my speakers. Anyway PulseEffects best part is to configure easily audio effect without the need to know anything about calf, lsp, ladspa, lv2, pulseaudio and jack. Everything is in a graphical environment where every plugin has a nice and user friendly interface. And if I need to use a configuration made by another user, I can do it faster just loading its preset file. So Pipewire is surely a good multimedia module to improve Linux system, but PulseEffects is still needed. |
This is good. The lack of module loading support is probably the only reason why Pipewire compatibility layer is not being enough to run PulseEffects right now. In any case I have already made my mind about using Pipewire native API instead of relying on the compatibility layer. Yesterday I created a new branch where I am replacing Pulseaudio API by the one from Pipewire https://github.com/wwmm/pulseeffects/tree/pipewire. But this is going to take much more time than I initially thought. The native PIpewire API is completely different. @Digitalone1 for some reason Arch Linux is not forcing |
I can't update if I don't install pipewire-pulse. Maybe I just need to install and uninstall it to reinstall pulseaudio? |
I confirm that after installing |
@wwmm I'm glad the porting to Pipewire is going forward. Which are your plans for the project? Since it is interacting with Pipewire, I suppose "PulseEffects" will not be a suitable name for the application. Will you change it? And what will it be about the old PulseEffects? I suppose it will be still adopted by other distributions that are not using Pipewire yet. |
No. I thought about this when I started the port and it is not worth it. What will need change are statements like
I definitely do not have time to develop 2 PulseEffects. Once the PipeWire branch is ready it will be moved to master and a legacy branch will be created with the current code targeting Pulseaudio. But I have no intention to work on it after moving to PipeWire. Maybe a bugfix for some issue that is really serious. But nothing more. |
@wwmm Okay, so after the next 4.8.4 release that will fix issues related to locale and equalizer plugin, I recommend to make a copy of the master branch into a new legacy branch. Maybe new release for Pipewire could be 5.0.0 and eventually bug fixes to the old legacy version in the future could be backported into 4.8.4.1. |
The |
@wwmm you forgot to release the 4.8.4 version with the latest fixes. I decided to not switch to Pipewire at the moment and remain on Pulseaudio, so I will use the legacy version. The project is very promising and with high potential, but It's also not mature yet and too soon to adopt it in my opinion. I think it's like Wayland in its first years. I started to use it only in the last months and only because I switched to Gnome. I'm not able to maintain the code related to the audio server, but since it is stable I think to be able to backport at least future new plugins and severe bugfixes made to the master branch. If I'll manage to do it, I'll update my repository and find a way to push inside the legacy branch. |
Done.
It is young. But I have to say my impressions about PipeWire have changed since I started the port. I was expecting it to be really far behind Pulseaudio in the audio department but from a developer point of view is actually quite close. And with an API that is more comfortable to work with. I have been using it daily and so far only minor issues. But I am not using bluetooth devices. This is the legacy Pulseaudio branch https://github.com/wwmm/pulseeffects/tree/pulseaudio-legacy. Master is now on PipeWire. |
I have this working in Flatpak but I had to manually set the client permissions to make it work, maybe I'm doing something wrong.
edit: That octal number does not make a lot of sense but it seems to work, trying other combinations broke Pipewire. Here are my changes, note that the rtkit access is just for-the-record, it's broken (and reported). |
I do not set any permission to our client. So it should be whatever PipeWire sets as default. |
@wwmm The problem might be that Pipewire recognizes the app as Flatpak according to the wiki so the app doesn't get write permission.
Note the
edit: maybe pw_client_update_permissions() will work? |
I'm trying tip (commit 0b9ba07) at the moment, and PulseEffects doesn't seem to have any perceivable effect with the Equalizer on for me. Console Errors
I hope this is enough to describe the issue, but I can provide additional information if needed. For the record, the distro is NixOS. Edit: After tinkering a bit with This led me to believe that maybe PulseEffects isn't doing the device setting properly (which the errors in the console may have to do with, but I'm not sure). Edit: I should probably clarify what exactly fixed the issue: |
Based on the |
It would also help to run in debug mode. Kill the current instance |
Here is the debug output that I got from running your command. I've noticed that I'm getting the same output, but this time when I checked with P/S: I have disabled real-time as you told me to. Edit: It seems that wiring up Edit: For the record, here's the final working configuration: |
I think it will be better to open a new issue for your case. You should not be having so many From PulseEffects point of view Your use case is too specific. Either you disable |
The blocklist is something you can try yourself. When a stream is shown in our applications section it has a button that allows it to be blocklisted |
This is what `pulseeffects` contains$ cat /nix/store/rqhc7v0s02snshb4jpxzkl7gfi36v5qd-pulseeffects-4.8.4/bin/pulseeffects
#! /nix/store/dskh7v2h3ly3kdkfk3xmjlqql1zr0hnw-bash-4.4-p23/bin/bash -e
export GIO_EXTRA_MODULES='/nix/store/ff82al5hzs9lpdzgk8cjjzpxy6qhxx9h-dconf-0.38.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GIO_EXTRA_MODULES='/nix/store/ff82al5hzs9lpdzgk8cjjzpxy6qhxx9h-dconf-0.38.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GDK_PIXBUF_MODULE_FILE='/nix/store/azyzm1pc4w1vdg5mwiqazvg16fa5m6gg-librsvg-2.50.1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
export XDG_DATA_DIRS='/nix/store/3a81krh4hb5kkl51kfvsprvjr9y393rl-gtk+3-3.24.24/share/gsettings-schemas/gtk+3-3.24.24:/nix/store/cv7wvlhb17l4d2ydq7k85na5b2vfyb3j-pulseaudio-14.0/share/gsettings-schemas/pulseaudio-14.0:/nix/store/0yxfy0mzq96l2bgcb2488f75x7fbb466-gsettings-desktop-schemas-3.38.0/share/gsettings-schemas/gsettings-desktop-schemas-3.38.0:/nix/store/rqhc7v0s02snshb4jpxzkl7gfi36v5qd-pulseeffects-4.8.4/share/gsettings-schemas/pulseeffects-4.8.4'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
export XDG_DATA_DIRS='/nix/store/rqhc7v0s02snshb4jpxzkl7gfi36v5qd-pulseeffects-4.8.4/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
export GST_PLUGIN_SYSTEM_PATH_1_0='/nix/store/yc5blhqcks8lrglcpacy1y0lnqg0kvr8-gstreamer-1.18.2/lib/gstreamer-1.0:/nix/store/yg4m4xzfzm0rbbp875v4ycj87b3mb01l-gst-plugins-base-1.18.2/lib/gstreamer-1.0:/nix/store/ps47p6b8xah0v29s632s5bm5adx08k2l-gst-plugins-good-1.18.2/lib/gstreamer-1.0:/nix/store/v4m26sv945ja030f965py10w9348b9kv-gst-plugins-bad-1.18.2/lib/gstreamer-1.0:/nix/store/yc5blhqcks8lrglcpacy1y0lnqg0kvr8-gstreamer-1.18.2/lib/gstreamer-1.0:/nix/store/yg4m4xzfzm0rbbp875v4ycj87b3mb01l-gst-plugins-base-1.18.2/lib/gstreamer-1.0:/nix/store/ps47p6b8xah0v29s632s5bm5adx08k2l-gst-plugins-good-1.18.2/lib/gstreamer-1.0:/nix/store/v4m26sv945ja030f965py10w9348b9kv-gst-plugins-bad-1.18.2/lib/gstreamer-1.0'${GST_PLUGIN_SYSTEM_PATH_1_0:+':'}$GST_PLUGIN_SYSTEM_PATH_1_0
export LV2_PATH='/nix/store/g63mn9sq3bzhsv6s0q9nzkg1l6818djv-calf-0.90.3/lib/lv2:/nix/store/7vlmmfdakavmky79bm4wbvknccpbpm2b-lsp-plugins-1.1.26/lib/lv2'
export LADSPA_PATH='/nix/store/gnclp3zw51j775gsmaj9yhr8r6855rph-rubberband-1.9.0/lib/ladspa:/nix/store/hby5pfmgwk28azh67idh5rzsq4f8nhqp-zam-plugins-3.13/lib/ladspa'
exec -a "$0" "/nix/store/rqhc7v0s02snshb4jpxzkl7gfi36v5qd-pulseeffects-4.8.4/bin/.pulseeffects-wrapped" "$@" |
That is really confusing... Why is there no If |
We have an internal blocklist that forbids us from trying to apply effects to ourselves. This check is based on PipeWire nodes name. Under normal circunstances our nodes are named |
@diamondburned the master branch was updated. It now sets the name of our nodes instead of letting PipeWire setting a default value to it. Maybe this is enough to fix the problem. |
I have just released
|
I managed to install Pipewire and Pulseeffects in Manjaro Gnome, and make it work, except when I reboot, convolver (for example), don't . Sound interrupts, laggy, ??? (can't explain). |
If you are able to record this it would help. In any case try to rrun PulseEffects in debug mode. Kill the current instance |
We can close this |
See https://pipewire.org
Thanks!
The text was updated successfully, but these errors were encountered: