The officially official Devuan Forum!

You are not logged in.

#1 Re: Documentation » How to: Devuan 5 Daedalus an pipewire » 2024-02-23 18:00:29

ffp

Hello friends, I tried the implementations listed here on my Dell Latitude 7480 laptop and while they do work, I sometimes had to reboot my laptop a few times to get working audio or manually kill and start the pipewire processes from terminal.
I found a different solution which worked for me and I wanted to share it with you too in case you have a similar problem:

In /etc/X11/Xsession.d/ create a file and call it 98-pipewire and put the following script into it:

#!/bin/bash

# We need to kill any existing pipewire instance to restore sound
pkill -u "${USER}" -fx /usr/bin/pipewire-pulse 1>/dev/null 2>&1
pkill -u "${USER}" -fx /usr/bin/pipewire-media-session 1>/dev/null 2>&1
pkill -u "${USER}" -fx /usr/bin/wireplumber 1>/dev/null 2>&1
pkill -u "${USER}" -fx /usr/bin/pipewire 1>/dev/null 2>&1

exec /usr/bin/pipewire &

# wait for pipewire to start before attempting to start related daemons
while [ "$(pgrep -f /usr/bin/pipewire)" = "" ]; do
        sleep 1
done

if [ -x /usr/bin/wireplumber ]; then
	exec /usr/bin/wireplumber &
elif [ -x /usr/bin/pipewire-media-session ]; then
	exec /usr/bin/pipewire-media-session &
fi

[ -f "/usr/share/pipewire/pipewire-pulse.conf" ] && exec /usr/bin/pipewire-pulse &

And with this I get audio on every reboot so no more restarting my laptop multiple times.

The only issue I had after doing this is that sometimes the audio was a bit choppy.
I found a solution on the Debian wiki but it had to be applied on every boot so I did this:

In /usr/share/pipewire/pipewire.conf I uncommented and changed the settings

default.clock.allowed-rates = [ 44100 48000 ]
default.clock.quantum       = 2048
default.clock.min-quantum   = 2048

And after rebooting this was solved for me too. I hope this can help you as well!

Board footer

Forum Software