The officially official Devuan Forum!

You are not logged in.

#1 2025-08-07 22:56:20

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 138  

Devuan 6.0 documentation of how to enable pipewire even in KDE Wayland

This is how I do it, with KDE wayland it works. By the way, on Devuan 6 gnome is totally borked. Doesn't work at all.

mkdir -p ~/.config/autostart
nano ~/.config/autostart/pipewire.desktop

add this to the file:

[Desktop Entry]
Type=Application
Name=PipeWire
Exec=sh -c 'pipewire & pipewire-pulse & wireplumber &'
X-GNOME-Autostart-enabled=true

Then:

chmod +x ~/.config/autostart/pipewire.desktop

Last edited by recklessswing (2025-08-07 22:56:40)

Offline

#2 2025-10-02 23:18:05

dgiglio
Member
Registered: 2024-02-17
Posts: 4  

Re: Devuan 6.0 documentation of how to enable pipewire even in KDE Wayland

I run this script:

#!/usr/bin/env bash

# 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/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

exec /usr/bin/wireplumber &

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

exec /usr/bin/pipewire-pulse &

Offline

#3 2025-10-18 20:30:51

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 138  

Re: Devuan 6.0 documentation of how to enable pipewire even in KDE Wayland

@dgiglio but does it run on wayland too? I remember this you add this to the .xsessionrc, but that only works on xorg.

Last edited by recklessswing (2025-10-18 20:32:03)

Offline

#4 Yesterday 16:54:30

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 138  

Re: Devuan 6.0 documentation of how to enable pipewire even in KDE Wayland

I think I've came with a better solution. But with runit, because it can do similiar thing like systemd --user daemon thing. It can reinstall pipewire if it fails. It seems reliable. So, install runit and also don't use GDM3, it breaks this. Use lightdm or sddm. I think it works on KDE wayland.

sudo apt update
sudo apt install -y pipewire wireplumber pipewire-audio pulseaudio-utils alsa-utils dbus elogind
# Optional
# sudo apt install -y lightdm lightdm-gtk-greeter && sudo dpkg-reconfigure lightdm
####STEP ONE
mkdir -p ~/.config/runit/service/pipewire/log
mkdir -p ~/.config/runit/service/pipewire-pulse/log
mkdir -p ~/.config/runit/service/wireplumber/log
mkdir -p ~/service
mkdir -p ~/.local/bin
####STEP TWO
cat > ~/.local/bin/wait-for <<'EOF'
#!/bin/sh
# wait-for <path or cmd> [timeout]
TARGET="$1"
TIMEOUT="${2:-10}"
i=0
while [ $i -lt "$TIMEOUT" ]; do
  if [ -S "$TARGET" ] || [ -e "$TARGET" ]; then exit 0; fi
  # Komut olarak verilmişse: "cmd:pw-cli info 0" gibi
  case "$TARGET" in
    cmd:*) sh -c "${TARGET#cmd:}" >/dev/null 2>&1 && exit 0 ;;
  esac
  sleep 1
  i=$((i+1))
done
exit 1
EOF
chmod +x ~/.local/bin/wait-for

####STEP THREE
cat > ~/.config/runit/service/pipewire/run <<'EOF'
#!/bin/sh
# pipewire user service
# XDG_RUNTIME_DIR genelde Wayland/GNOME ile gelir; yoksa tedbir:
[ -z "$XDG_RUNTIME_DIR" ] && export XDG_RUNTIME_DIR="/run/user/$(id -u)"
exec pipewire
EOF
chmod +x ~/.config/runit/service/pipewire/run

cat > ~/.config/runit/service/pipewire/log/run <<'EOF'
#!/bin/sh
exec svlogd -tt ~/.local/var/log/pipewire
EOF
chmod +x ~/.config/runit/service/pipewire/log/run
mkdir -p ~/.local/var/log/pipewire

####STEP FOUR
cat > ~/.config/runit/service/pipewire-pulse/run <<'EOF'
#!/bin/sh
# pipewire-pulse user service
[ -z "$XDG_RUNTIME_DIR" ] && export XDG_RUNTIME_DIR="/run/user/$(id -u)"
# PipeWire socket hazır olmadan başlamasın:
~/.local/bin/wait-for "$XDG_RUNTIME_DIR/pipewire-0" 10 || true
exec pipewire-pulse
EOF
chmod +x ~/.config/runit/service/pipewire-pulse/run

####STEP FIVE
cat > ~/.config/runit/service/pipewire-pulse/log/run <<'EOF'
#!/bin/sh
exec svlogd -tt ~/.local/var/log/pipewire-pulse
EOF
chmod +x ~/.config/runit/service/pipewire-pulse/log/run
mkdir -p ~/.local/var/log/pipewire-pulse

####STEP SIX
cat > ~/.config/runit/service/wireplumber/run <<'EOF'
#!/bin/sh
# wireplumber user service
[ -z "$XDG_RUNTIME_DIR" ] && export XDG_RUNTIME_DIR="/run/user/$(id -u)"
# PipeWire core hazır olmadan başlamasın:
~/.local/bin/wait-for "$XDG_RUNTIME_DIR/pipewire-0" 10 || true
exec wireplumber
EOF
chmod +x ~/.config/runit/service/wireplumber/run

####STEP SEVEN
cat > ~/.config/runit/service/wireplumber/log/run <<'EOF'
#!/bin/sh
exec svlogd -tt ~/.local/var/log/wireplumber
EOF
chmod +x ~/.config/runit/service/wireplumber/log/run
mkdir -p ~/.local/var/log/wireplumber

###STEP EIGHT
ln -s ~/.config/runit/service/pipewire        ~/service/ 2>/dev/null || true
ln -s ~/.config/runit/service/pipewire-pulse  ~/service/ 2>/dev/null || true
ln -s ~/.config/runit/service/wireplumber     ~/service/ 2>/dev/null || true

####STEP NINE
cat > ~/.xsessionrc <<'EOF'
#!/bin/sh
# Xorg oturumlarında runit user services tetikleyici
if [ -z "$XDG_RUNTIME_DIR" ]; then
  export XDG_RUNTIME_DIR="/tmp/xdg-$(id -u)"
  mkdir -p "$XDG_RUNTIME_DIR"
  chmod 700 "$XDG_RUNTIME_DIR"
fi
if [ -d "$HOME/service" ]; then
  if ! pgrep -u "$(id -u)" runsvdir >/dev/null 2>&1; then
    runsvdir -P "$HOME/service" &
  fi
fi
EOF

####STEP TEN(FOR WAYLAND, I THINK)
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/runit-session.desktop <<'EOF'
[Desktop Entry]
Type=Application
Name=Runit User Services
Exec=/bin/sh -lc 'exec /usr/bin/runsvdir -P "$HOME/service"'
X-GNOME-Autostart-enabled=true
NoDisplay=true
EOF

Offline

Board footer