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.
Perhaps, some interesting points. not about audio, but ...
Code:
We use xdg-desktop-portal (+ backend implementation) for communication between the app requesting
to share a screen and between desktop (Plasma or Gnome). You need xdg-desktop-portal, which is the
middle man between the app and backend implementation, compiled with screencast portal.
Code:
For backend implementation, if you are using Plasma, you need xdg-desktop-portal-kde from Plasma 5.13.x,
again compiled with screencast portal, which is build when PipeWire is present.
And there you show an important package for Wayland/Plasma5 which is still missing from Slackware -current. For completing the screencasting stack on Wayland/Plasma5 there's needed xdg-desktop-portal which is the frontend of xdg-desktop-portal-kde, already present.
I asked for xdg-desktop-portal in the past, but apparently the other guys do not bothered to sustain this request.
Feel free to ask for it, if you want to work in Wayland/Plasma5 things like screencasting on webbrowsers, TeamViewer, AnyDesk or any other application which does screencasting, like the VNC servers.
In other hand, the Plasma5 uses itself the PipeWire only for the video side (aka screencasting) like is even the taskbar thumbnails.
The pipewire-pulse is an on-site replacement of the PulseAudio server, and the clients uses the PulseAudio libraries, as usual. Then everything should work also on KDE4.
I suggest to @cwizardone to open a Konsole window with 3 tabs, where to execute those commands bellow, each on on its tab and on the following specified order:
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,131
Rep:
Quote:
Originally Posted by marav
Perhaps, some interesting points. not about audio, but ...
Code:
We use xdg-desktop-portal (+ backend implementation) for communication between the app requesting
to share a screen and between desktop (Plasma or Gnome). You need xdg-desktop-portal, which is the
middle man between the app and backend implementation, compiled with screencast portal.
Code:
For backend implementation, if you are using Plasma, you need xdg-desktop-portal-kde from Plasma 5.13.x,
again compiled with screencast portal, which is build when PipeWire is present.
Thanks for the information. I found a copy of xdg-desktop-portal-kde and installed it, but, unfortunately, it didn't solve the problem.
However, by installing the latest pipewire-0.3.34-x86_64, from yesterday's (26 August) -current updates I've had some limited success.
The little popping sound when pressing the keyboard volume key works, but there are no other system notification sounds. None.
VLC audio worked, once I changed the audio device to the built-in sound card on the motherboard. There was NO audio in any browsers, i.e., Firefox or Vivaldi.
Changing the sound card in the kde-4 system settings doesn't help AND everytime
I logout and log back in, kde-4 (or whatever) changed the sound card back to digital card on my Nvidia graphics card. Yes, I change it in kde-4 settings to the analog card on the motherboard and pressed "Apply" (save), but, as I said, once I logout and log back in, it has been changed (by what?) back to the Nvidia sound card.
So, at the moment, I'm back to pulse....
Which reminds me, even when Pulse was not loaded (not autospawned, etc.) it showed as
the audio playback device in the kde-4 multimedia settings.
Last edited by cwizardone; 08-27-2021 at 11:50 AM.
Before that, the PulseAudio server auto-start should be disabled as described on the first post of this thread, and a login/logout to be done...........
The results are,
Quote:
bash-5.0$ /usr/bin/pipewire
[W][01392.203387][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01392.203419][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: No such file or directory
[W][01392.203664][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[E][01392.203773][module-protocol-: 601 lock_socket()] server 0x55ef6e493b00: unable to lock lockfile '/var/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running)
[E][01392.203805][ conf.c: 411 load_module()] config 0x55ef6e478d30: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable
[E][01392.203861][ pipewire.c: 117 main()] failed to create context: Resource temporarily unavailable
bash-5.0$ /usr/bin/pipewire-media-session
[W][01412.984483][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01412.984515][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: No such file or directory
[W][01412.984663][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01412.985318][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01412.985457][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01412.985464][ module-rtkit.c: 633 impl_acquire_rt()] could not make thread realtime: No such file or directory
[E][01413.206485][ bluez5-dbus.c: 3446 get_managed_objects_reply()] GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown
[E][01416.231542][ conf.c: 304 pw_conf_save_state()] can't rename temp file 'bluez-autoswitch.tmp': No such file or directory
[E][01416.231580][bluez-autoswitch: 322 restore_timeout()] can't save bluez-autoswitch state: No such file or directory
bash-5.0$ /usr/bin/pipewire-pulse
[W][01463.766318][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01463.766353][ module-rtkit.c: 460 set_nice()] could not set nice-level to -11: No such file or directory
[W][01463.766607][ module-rtkit.c: 200 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][01463.767173][ server.c: 569 start_unix_server()] server 0x55c101e51410: socket '/var/run/user/1000/pulse/native' is in use
[W][01463.767185][ server.c: 968 servers_create_and_start()] pulse-server 0x55c101e50f50: failed to start server on 'unix:/var/run/user/1000/pulse/native': Address already in use
[E][01463.767189][ pulse-server.c: 5077 pw_protocol_pulse_new()] pulse-server 0x55c101e50f50: no servers could be started: Address already in use
[E][01463.767235][ conf.c: 411 load_module()] config 0x55c101e36d30: could not load mandatory module "libpipewire-module-protocol-pulse": Address already in use
[E][01463.767328][ pipewire.c: 117 main()] failed to create context: Address already in use
bash-5.0$
The module-rtkit is found in what package?
Last edited by cwizardone; 08-27-2021 at 04:08 PM.
[E][01463.767328][ pipewire.c: 117 main()] failed to create context: Address already in use
These are all warning and the first issue will be shown last.
It is already running.
please take time to look at your
Code:
/etc/pipewire/pipewire.conf
You will see what is going on.
Code:
context.modules = [
#{ name = <module-name>
# [ args = { <key> = <value> ... } ]
# [ flags = [ [ ifexists ] [ nofail ] ]
#}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found.
# If nofail is given, module initialization failures are ignored.
#
# Uses RTKit to boost the data thread priority.
{ name = libpipewire-module-rtkit
args = {
#nice.level = -11 # here
#rt.prio = 88 # is
#rt.time.soft = 200000 # your
#rt.time.hard = 200000 # warnings uncomment the level you want to use
}
flags = [ ifexists nofail ]
}
As you can see not enabled.
since I build mine with jack2.
Code:
context.spa-libs = {
#<factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
audio.convert.* = audioconvert/libspa-audioconvert
api.alsa.* = alsa/libspa-alsa
api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera
api.bluez5.* = bluez5/libspa-bluez5
api.vulkan.* = vulkan/libspa-vulkan
api.jack.* = jack/libspa-jack
support.* = support/libspa-support
#videotestsrc = videotestsrc/libspa-videotestsrc
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
}
In slackware we configure it through /etc
You can set this during a build. this is the slackware way
As of now.
if you think /etc/ is being ignored lets tell Pat
By default, there is no pipewire.conf in /etc/pipewire/
Hence my comment (not for you, but for cwizardone)
Last I looked this is a slackware thread. May want to take it to Pipewire General.
seems to work fine for me in real time and with jack2 https://www.youtube.com/watch?v=cb0Bvy0ez4A
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,131
Rep:
Quote:
Wed May 19 21:05:00 UTC 2021
..............
l/pipewire-0.3.28-x86_64-1.txz: Upgraded.
Config files are now installed in the data dir, system overrides
in /etc/pipewire and $HOME are checked first.
Would someone be kind enough to translate the above into English, that is, what or where is the "data dir" ?
Thanks.
Pipewire config files are installed in /usr/share/pipewire, see the following comment at the top of /usr/share/pipewire/pipewire.conf :-)
Code:
# Copy and edit this file in /etc/pipewire for systemwide changes
# or in ~/.config/pipewire for local changes.
In practice this means you can leave the distribution of pipewire alone and put your own config changes as you require them into either /etc/pipewire for system-wide config or ~/.config/pipewire for local config.
# slackpkg file-search module-rtkit
Looking for module-rtkit in package list. Please wait... DONE
The list below shows the packages that contains "module-rtkit" file.
[inst] slackware64 : pipewire-0.3.34-x86_64-1
You can search specific packages using "slackpkg search package".
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,131
Rep:
Quote:
Originally Posted by gbschenkel
Code:
# slackpkg file-search module-rtkit
Looking for module-rtkit in package list. Please wait... DONE
The list below shows the packages that contains "module-rtkit" file.
[inst] slackware64 : pipewire-0.3.34-x86_64-1
You can search specific packages using "slackpkg search package".
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...
Yes you have to edit the client config file to disable daemon auto start. Otherwise you end up with pulseaudio and pipewire daemons fighting each other because apps will launch pulse if it is not already running.
Other than that just make sure all pulseaudio .desktop launchers are removed from the various xdg autostart paths.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.