/audio_switch

Install PipeWire and easy switch between PipeWire and PluseAudio

Primary LanguageShell

audio-switch:

Install PipeWire and easy switch between PipeWire and PulseAudio

With this tool you can install PipeWire on Debian based systems. It also provides an easy way to switch between PulseAudio and Pipewire and debug the installation.

Switching to PipeWire

$ audio_switch pipewire
-- Disable PulseAudio
    [OK] Service pulseaudio.socket is dead
    [OK] Service pulseaudio.service is dead
-- Enable Pipewire
    [OK] Service pipewire.socket is running
    [OK] Service pipewire.service is running
    [OK] Service pipewire-pulse.socket is running
    [OK] Service pipewire-pulse.service is running
    [OK] Service wireplumber.service is running
-- Testing Server Name: PulseAudio (on PipeWire 0.3.48)
Did you hear the sound?
-- Sink and volume info
-- Default Sink: analog-surround-51
-- Volumes
      front-left: 56% 
     front-right: 56% 
       rear-left: 56% 
      rear-right: 56% 
    front-center: 56% 
             lfe: 56% 

Switching to PulseAudio

$ audio_switch pulseaudio
-- Disable Pipewire
    [OK] Service pipewire-pulse.socket is dead
    [OK] Service pipewire.socket is dead
    [OK] Service wireplumber.service is dead
    [OK] Service pipewire-pulse.service is dead
    [OK] Service pipewire.service is dead
-- Enable PulseAudio
    [OK] Service pulseaudio.socket is listening
    [OK] Service pulseaudio.service is running
-- Testing Server Name: pulseaudio
Did you hear the sound?
-- Sink and volume info
-- Default Sink: analog-surround-51
-- Volumes
      front-left: 56% 
     front-right: 56% 
       rear-left: 56% 
      rear-right: 56% 
    front-center: 56% 
             lfe: 56% 

Check service status

$ audio_switch services --all
● Sockets:
LISTEN                      UNITS                 ACTIVATES             
/run/user/1000/pipewire-0   pipewire.socket       pipewire.service      
/run/user/1000/pulse/native pipewire-pulse.socket pipewire-pulse.service
/run/user/1000/pulse/native pulseaudio.socket     pulseaudio.service    

● Services:
  UNIT                           LOAD   ACTIVE   SUB     DESCRIPTION                       
  pipewire-media-session.service loaded inactive dead    PipeWire Media Session Manager    
  pipewire-pulse.service         loaded active   running PipeWire PulseAudio               
  pipewire.service               loaded active   running PipeWire Multimedia Service       
 pulseaudio.service             masked inactive dead    pulseaudio.service                
  wireplumber.service            loaded active   running Multimedia Service Session Manager

Quick check if everything working and view the sound daemon used

$ audio_switch check
*** Running on PulseAudio...Did you hear the sound?

Show default sink and volume info

$ audio_switch vinfo
-- Default Sink: analog-surround-51
-- Volumes
      front-left: 56% 
     front-right: 56% 
       rear-left: 56% 
      rear-right: 56% 
    front-center: 56% 
             lfe: 56% 

Other options

Type audio_switch without parameters for other options

audio_switch: Install pipewire and sound switcher source
   repos:       Enable PPAs
   install:     Install Pipewire
   pipewire:    Use Pipewire
   pulseaudio:  Use PuleAudio
   restart:     Restart audio service
   check:       Check sound
   music:       Play some music
   vinfo:       Show sink and volume info
   services:    Show services status

Installation

Run the command wget -O - https://raw.githubusercontent.com/jtsagata/audio_switch/master/install.sh | sudo bash and follow instructions. It won't change anything on your system if you don't.

Troubleshooting and more Info