Using Pipewire instead of Pulseaudio in Slackware 15
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I read the whole thread twice, tested and miserably failed to adapt to i3wm.
What I did : basically replaced the xdg desktop files with execution of their commands at startup in i3wm config file. Everything else same.
Then I couldn't have sound and no frontend : alsamixer or pavucontrol were failing.
Thought as I was writing : shouldn't i also take care of what launches pulseaudio ? (Session start) Have to look at that...
Hi, im using bspwm (a exotic wm as one Lucky not man not robot user told me) a tilling windows similar to I3wm, i was having problems when launching pipewire from the bswpm config, so i used dex-autostart (alternatives to dex are dapper, fbautostart, or sandsmark-xdg-autostart-launcher) https://www.mankier.com/1/dex-autostart you can find it here https://pkgs.org/search/?q=dex-autostart donwload it and convert to Slackware with rpm2tgz and the package name install it with installpkg
i created three .desktop files inside /home/myhomename/.config/autostart directory
pipewire.desktop
Code:
[Desktop Entry]
Version=1.0
Name=PipeWire Media System
Comment=Start the PipeWire Media System
Exec=/usr/bin/pipewire
Terminal=false
Type=Application
[Desktop Entry]
Version=1.0
Name=PipeWire Media Session
Comment=Start the PipeWire Media Session
Exec=/usr/bin/pipewire-media-session
Terminal=false
Type=Application
Thanks abcdam, already seen that but doesn't seem to be the culprit : checked multiple times that pulseaudio wasn't running.
I tried what LuckyCyborg suggested and launch the 3 commands in terminal. I've got pipewire-media-session failing. Looks like it would be Dbus related ?
Thanks abcdam, already seen that but doesn't seem to be the culprit : checked multiple times that pulseaudio wasn't running.
I tried what LuckyCyborg suggested and launch the 3 commands in terminal. I've got pipewire-media-session failing. Looks like it would be Dbus related ?
very probably, what do you have in your .xinitrc file?
Thanks abcdam, already seen that but doesn't seem to be the culprit : checked multiple times that pulseaudio wasn't running.
I tried what LuckyCyborg suggested and launch the 3 commands in terminal. I've got pipewire-media-session failing. Looks like it would be Dbus related ?
You are kind to post the output of pipewire-media-session ?
Hi, im using bspwm (a exotic wm as one Lucky not man not robot user told me) a tilling windows similar to I3wm, i was having problems when launching pipewire from the bswpm config, so i used dex-autostart (alternatives to dex are dapper, fbautostart, or sandsmark-xdg-autostart-launcher) https://www.mankier.com/1/dex-autostart you can find it here https://pkgs.org/search/?q=dex-autostart donwload it and convert to Slackware with rpm2tgz and the package name install it with installpkg
Revengeful much?
In English (and Russian or Chinese) the word "cyborg" means "a technological enhanced human", then even someone wearing glasses to correct his/her eye-sighting (like me) could be defined as "cyborg"
However, I understand that according your high stacks this "someone wearing glasses" is "not a man" ?
WOW! I wonder if you advocate also that those "cyborgs" to be stripped by their human rights and citizenship, as non-human beings as they are...
Quote:
Originally Posted by adcdam
i created three .desktop files inside /home/myhomename/.config/autostart directory
pipewire.desktop
Code:
[Desktop Entry]
Version=1.0
Name=PipeWire Media System
Comment=Start the PipeWire Media System
Exec=/usr/bin/pipewire
Terminal=false
Type=Application
[Desktop Entry]
Version=1.0
Name=PipeWire Media Session
Comment=Start the PipeWire Media Session
Exec=/usr/bin/pipewire-media-session
Terminal=false
Type=Application
inside my bspwm config file i have
dex-autostart -as /home/(myhome)/.config/autostart/
you can have this autostart directory in /etc if you want.
Yes, we know about this type of PipeWire daemons setup. Honestly, this is with what I started to, too...
We arrived at conclusion that we need a conveniently modified daemon supervisor to better control the PipeWire daemons, to ensure that they auto-quit on user logout and a single instance of them is started.
Something like your desktop files will work also on Plasma5 or XFCE (as I tested myself too in the past) but with big caveats: the PipeWire daemons will continue running after you are leaving your desktop and on second starting of it, another set of PipeWire daemons will be started, with disasterful effects (usually no sound)
If you wish, I can explain you with luxurious details several usual use cases where this PipeWire daemons setup (without daemon supervisor) will fail.
Last edited by ZhaoLin1457; 09-25-2021 at 09:07 PM.
Thanks for interest in my atempts. Here are the errors I've got :
Code:
$ pipewire
[W][00861.381033][ context.c: 484 pw_context_new()] context0x562ab6cff440: no modules loaded from context.modules
$ pipewire-media-session
[W][00874.748401][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.748458][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: Aucun fichier ou dossier de ce type
[W][00874.748626][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.749355][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.749523][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.749531][ module-rtkit.c: 633 impl_acquire_rt()] could not make thread realtime: Aucun fichier ou dossier de ce type
[E][00874.749662][ media-session.c: 2115 start_session()] can't start monitor: L'hôte cible est arrêté ou en panne
$ pipewire-pulse
[W][00881.133129][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.133201][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: Aucun fichier ou dossier de ce type
[W][00881.133439][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.137409][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.137617][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.137627][ module-rtkit.c: 633 impl_acquire_rt()] could not make thread realtime: Aucun fichier ou dossier de ce type
[E][00887.640565][ pulse-server.c: 884 do_set_client_name()] pulse-server 0x55ad196c5470: failed to connect client: L'hôte cible est arrêté ou en panne
Thanks for interest in my atempts. Here are the errors I've got :
Code:
$ pipewire
[W][00861.381033][ context.c: 484 pw_context_new()] context0x562ab6cff440: no modules loaded from context.modules
$ pipewire-media-session
[W][00874.748401][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.748458][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: Aucun fichier ou dossier de ce type
[W][00874.748626][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.749355][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.749523][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00874.749531][ module-rtkit.c: 633 impl_acquire_rt()] could not make thread realtime: Aucun fichier ou dossier de ce type
[E][00874.749662][ media-session.c: 2115 start_session()] can't start monitor: L'hôte cible est arrêté ou en panne
$ pipewire-pulse
[W][00881.133129][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.133201][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: Aucun fichier ou dossier de ce type
[W][00881.133439][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.137409][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.137617][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00881.137627][ module-rtkit.c: 633 impl_acquire_rt()] could not make thread realtime: Aucun fichier ou dossier de ce type
[E][00887.640565][ pulse-server.c: 884 do_set_client_name()] pulse-server 0x55ad196c5470: failed to connect client: L'hôte cible est arrêté ou en panne
Now imagine how meaningful they are for a Russian who also barely speaks English, as a second language...
And you do not shown the errors from pipewire-media-session as you said that it has issues.
Anyway, the idea of this test is to open 3 tabs on a terminal application, then to execute in this order: pipewire, pipewire-media-session, pipewire-pulse, each one on its tab, without closing the precedently started daemons.
Anyway, maybe this bug report may give you an idea:
pipewire-media-session seems to be missing from pipewire.service status. Is it running? The format of pipewire configuration files changed, so you may want to check there are no old-format configs left over.
Long story short, remove every little file from /etc/pipewire if exists and reboot the system.
Last edited by LuckyCyborg; 09-26-2021 at 02:28 PM.
The daemon kills the 3 processes at real logout but seems to slow down system while exiting to runlevel 3. Shall I change my scripts for logging out or is there a smart way ?
The daemon kills the 3 processes at real logout but seems to slow down system while exiting to runlevel 3. Shall I change my scripts for logging out or is there a smart way ?
If by "exiting to runlevel 3" I should understand the stage where you close your graphical desktop environment to return to console, I do not think that the daemon supervisor itself will/can introduce a slowdown.
Because on this stage, all it do is to watch for proper running of its client program instance and for the messages from elogind regarding the user's logout. Essentially, it does not interact with any other parts of system.
So, if you feel a slowdown, is probably because the way how the audio clients interacts with the PipeWire daemons - even those daemons themselves once started will run without changes even after you leave the DE and return on console, in fact they will be killed by the daemon supervisor only after user itself logouts.
Overall looking, there's a difference between the PipeWire daemons which are X11 agnostics and keeps running until the user logouts and the PulseAudio daemon which loads a series of X11 plugins, then I suppose that it quits when it loose the connection to X11 server, leaving also the PulseAudio clients without connection to the PulseAudio server, then they quitting probably early.
I for one, I do not seen serious noticeable slowdowns - probably also because I use SDDM for login on my DEs.
Last edited by LuckyCyborg; 09-27-2021 at 01:55 AM.
I think I've found the simplest way to configure pipewire for a user in Slackware. Note that pipewire is only meant to be run on a per user basis, there is no equivalent to a "system daemon", like was available for pulseaudio.
In my $HOME/.profile script, I have the following lines to start pipewire and friends:
Code:
# ~/.profile
# Start pipewire daemons and bind them to the elogind session:
/usr/bin/daemon --bind --pidfiles=$HOME/.pidfiles --name=pipewire --command=/usr/bin/pipewire
/usr/bin/daemon --bind --pidfiles=$HOME/.pidfiles --name=pipewire-media-session --command=/usr/bin/pipewire-media-session
/usr/bin/daemon --bind --pidfiles=$HOME/.pidfiles --name=pipewire-pulse --command=/usr/bin/pipewire-pulse
Some notes:
I'm using daemon, since Slackware includes it. The '--bind' option will cause pipewire to exit with the last logout so it cleans itself up (using elogind in the backend). The '--name' option tells daemon to use a lock file so daemon only starts one instance. I didn't bother with a '--respawn', but you could use it if you want automatic respawns if a daemon crashes.
Then in my $HOME/.bash_profile script I source the .profle script with the following:
Code:
# ~/.bash_profile: executed by bash(1) for login shells.
if [ -f $HOME/.profile ]; then
source $HOME/.profile
fi
The reasoning for this setup is that .bash_profile gets sourced as soon as you login at a tty console, and it gets sourced when you login using 'sddm'. The 'xdm' display manager on the other hand skips sourcing .bash_profile, but will still source .profile, which is why I have the daemon's starting in .profile. The end result is that pipewire gets started at any login; a display manager or from the console.
This also has the benefit that you don't have to touch any of pulseaudio's config files to use pipewire. I.e. No need to disable autospawning of pulseaudio or messing with xdg autostart files. Pipewire will always start right after login, and always before pulseaudio. If you want to switch back to pulseaudio then you just remove or comment out the relevent lines in .profile and pulseaudio will take over again (you will have to logout/login). I've tested this for all WM's and DE's included in slackware, using startx/startkwayland/sddm/xdm and pipewire is used everywhere with this setup.
That's all.
Last edited by 0XBF; 10-17-2021 at 09:55 AM.
Reason: typo corrections
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.