You are not logged in.

#1 2021-11-09 15:22:56

sleekmason
zoom
Registered: 2018-05-22
Posts: 651
Website

Pipewire on Bullseye

A simple script I wrote to install and use Pipewire in place of Pulseaudio on Bullseye. There are actually two scripts, as you might want to uninstall Pipewire and revert back to Pulseaudio as well. This was tested both on Lilidog (not released quite yet), and on Debian11 lxde live. This has not yet been tested on Bunsen Labs.

This script also replaces Alsa and Jack with Pipewire, as recommended by the Debian Wiki.
https://wiki.debian.org/PipeWire PipeWire is a server and API for handling multimedia on Linux.

This is about as easy as you can get. All the commands come directly from the Debian wiki.

So, some things to know:

Bullseye only.  Won't work on Buster. Not needed for Sid.

You will probably want to choose 'no' when asked about 'enable realtime process priority' during installation.

If Pnmixer is installed, an error warning box should come up asking whether to re-initialize the audio connection. Choose yes! Sometimes the warning box fails to comes up, if it doesn't, you may need to rightclick on pnmixer and 'Reload Sound'.

I also wrote a removal script to go with this. You can install and uninstall pretty much at will. This only removes the programs and resets the server to Pulseaudio. I had thought to remove everything pipewire, but errors started cropping up after multiple switches:)

This is a work in progress, meaning, please feel free to change, adjust, replace, whatever, however you want so long as it works. My coding experience includes only the copy and paste clinic. I just wanted to try Pipewire on Bullseye and needed a way to get it done somewhat safely.

Apparently on sid it is really simple. Suppose that is next to look into.

pipewire-installer

#!/bin/bash
echo ""
read -p "   Pipewire Installer

   This script will replace Pulseaudio as the audio server with Pipewire.
   This is an EXPERIMENTAL usage of Pipewire. Use at your own risk.

   https://wiki.debian.org/PipeWire 
   
   During installation, You will probably want to choose 'no' when asked 
   to 'enable realtime process priority'. 
   
   After installation a Pnmixer error warning box SHOULD come up. Choose 
   'yes' to re-initialize the audio connection.  If this warning doesn't 
   appear, you may need to right-click on pnmixer and 'Reload Sound'.
   
   -------------------------------------------------
   
   Please press enter to install and use Pipewire.
   
   -------------------------------------------------
 
   Or close this terminal window to quit the install." ;
echo "" 
sudo apt update && sudo apt install pipewire pipewire-audio-client-libraries \
libspa-0.2-bluetooth libspa-0.2-jack qjackctl jackd2-firewire jack-tools &&
sudo touch /etc/pipewire/media-session.d/with-pulseaudio &&
sudo touch /etc/pipewire/media-session.d/with-alsa &&
sudo touch /etc/pipewire/media-session.d/with-jack &&
sudo cp /usr/share/doc/pipewire/examples/systemd/user/pipewire-pulse.* /etc/systemd/user/ &&
sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/ &&
sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/ &&
systemctl --user daemon-reload &&
systemctl --user --now disable pulseaudio.service pulseaudio.socket &&
systemctl --user --now enable pipewire pipewire-pulse &&
systemctl --user mask pulseaudio &&
sleep 1
sudo ldconfig
echo ""
echo ""
echo "-----------------------------------------------------"
echo ""
LANG=C pactl info | grep '^Server Name'
echo ""
echo "-----------------------------------------------------"
echo ""
echo "If Pipewire is correctly set up, you should see above:"
echo ""
echo "'Server Name: PulseAudio (on PipeWire 0.3.XX)'"
echo ""
echo ""
echo "Remember if no Pnmixer warning box appeared, right-click" 
echo "on Pnmixer (sound icon) and 'Reload Sound'."
echo ""
echo "All Finished!"
echo ""
echo ""
echo "-----------------------------------------------------"

pipewire-remover

#!/bin/bash
echo ""
echo ""
read -p "   Pipewire Remover

   If you are using Pipewire, and want to switch back to Pulseaudio.

   After installation a Pnmixer error warning box SHOULD come up. Choose 
   'yes' to re-initialize the audio connection.  If this warning doesn't 
   appear, you may need to right-click on pnmixer and 'Reload Sound'.  

   -------------------------------------------------
   
   Please press enter to Switch back to Pulseaudio.
   
   -------------------------------------------------
   
   
   Or close this terminal window to quit." ;
echo "" 
sudo apt remove pipewire-audio-client-libraries \
libspa-0.2-bluetooth libspa-0.2-jack qjackctl &&
sudo rm /etc/systemd/user/pipewire-pulse.* &&
sudo rm /etc/alsa/conf.d/99-pipewire-default.conf &&
sudo rm /etc/ld.so.conf.d/pipewire-jack-*.conf &&
systemctl --user daemon-reload &&
systemctl --user --now disable pipewire pipewire-pulse &&
systemctl --user unmask pulseaudio &&
systemctl --user --now enable pulseaudio.service pulseaudio.socket &&
sleep 1
sudo ldconfig
echo ""
echo ""
echo "-----------------------------------------------------"
echo ""
LANG=C pactl info | grep '^Server Name'
echo ""
echo "-----------------------------------------------------"
echo ""
echo "If Pipewire has been sucessfully removed, you should see:"
echo "'Server Name: PulseAudio'" above.
echo ""
echo "Remember if no Pnmixer warning box appeared, right-click" 
echo "on Pnmixer (sound icon) and 'Reload Sound'."
echo ""
echo "All Finished!"
echo ""
echo ""
echo "-----------------------------------------------------"

Last edited by sleekmason (2021-11-10 16:40:29)

Offline

#2 2021-11-09 22:39:53

hhh
Meep!
Registered: 2015-09-17
Posts: 12,498
Website

Re: Pipewire on Bullseye

I upgraded my Buster/Lithium OS to Bullseye/Beryllium and Pipewire got automatically dragged in for my system...

❯ apt-cache policy pipewire*
pipewire-audio-client-libraries:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
pipewire:
  Installed: 0.3.19-4
  Candidate: 0.3.19-4
  Version table:
 *** 0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-tests:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
pipewire-bin:
  Installed: 0.3.19-4
  Candidate: 0.3.19-4
  Version table:
 *** 0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-doc:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages

~ 
❯ 

So far, so good. The integration with pulse and jack is getting better.

Offline

#3 2021-11-09 22:52:15

sleekmason
zoom
Registered: 2018-05-22
Posts: 651
Website

Re: Pipewire on Bullseye

hhh wrote:

I upgraded my Buster/Lithium OS to Bullseye/Beryllium and Pipewire got automatically dragged in for my system...

❯ apt-cache policy pipewire*
pipewire-audio-client-libraries:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
pipewire:
  Installed: 0.3.19-4
  Candidate: 0.3.19-4
  Version table:
 *** 0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-tests:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
pipewire-bin:
  Installed: 0.3.19-4
  Candidate: 0.3.19-4
  Version table:
 *** 0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-doc:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages

~ 
❯ 

So far, so good. The integration with pulse and jack is getting better.

Lol. Im going to wind up deleting this.  Are you saying it is integrated already for Bullseye (debian) or just for Bunsenlabs? If all I needed to do was add it to the install list . . .  go figure.

*edit - Looks like Berryllium does have Pipewire package with no extras installed, but not set up as the server.
You can check with:

pactl info | grep '^Server Name'

If Pipewire is set as the server, you should get:

Server Name: PulseAudio (on PipeWire 0.3.19)

Went ahead and removed the Pipewire package from the uninstall list since it is already present.

Last edited by sleekmason (2021-11-10 16:41:38)

Offline

#4 2021-11-10 03:00:36

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,390

Re: Pipewire on Bullseye

sleekmason wrote:
hhh wrote:

I upgraded my Buster/Lithium OS to Bullseye/Beryllium and Pipewire got automatically dragged in for my system...

❯ apt-cache policy pipewire*
pipewire-audio-client-libraries:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
pipewire:
  Installed: 0.3.19-4
  Candidate: 0.3.19-4
  Version table:
 *** 0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-tests:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
pipewire-bin:
  Installed: 0.3.19-4
  Candidate: 0.3.19-4
  Version table:
 *** 0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-doc:
  Installed: (none)
  Candidate: 0.3.19-4
  Version table:
     0.3.19-4 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages

~ 
❯ 

So far, so good. The integration with pulse and jack is getting better.

Lol. Im going to wind up deleting this.  Are you saying it is integrated already for Bullseye (debian) or just for Bunsenlabs? If all I needed to do was add it to the install list . . .  go figure.

Buster has an older version of pipewire and perhaps not as polished as the more recent versions so that's why it most likely why it doesn't work on Buster.

Last edited by DeepDayze (2021-11-10 03:01:20)


Real Men Use Linux

Online

Board footer

Powered by FluxBB