Archive:PulseAudio/HOW-TO: Disable PulseAudio and use ALSA (without removing PulseAudio) for Ubuntu

From Official Kodi Wiki
Jump to navigation Jump to search

How does this PulseAudio configuration change work?

What these changes do is stop the PulseAudio daemon for autospawning and taking over control of the sound devices on your Ubuntu system.

Removing PulseAudio from Ubuntu - why it may not be such a good idea

In desktop versions of Ubuntu, PulseAudio is a dependency for a lot of software packages.

Removing or purging PulseAudio from a Ubuntu system can break other installed software and potentially cause errors and broken dependencies.

The method described below will allow users to turn off PulseAudio and use the Advanced Linux Sound Architecture (ALSA) instead.

The advantage of this method is the changes can be reversed when PulseAudio needs to be turned on/enabled again.

There are two methods described in this guide for disabling PulseAudio on Ubuntu:

  • How to disable PulseAudio for a specific user
  • How to disable PulseAudio globally (for all users)
Important Notes
  • The following steps should be done via the terminal or via SSH (Secure Services Host) on
the Ubuntu system to be configured.
  • The user account used to edit/modify the files needs to have sudo rights.

How to disable PulseAudio for a specific user

  • Open a terminal window or SSH into your Ubuntu system.
  • Copy the global PulseAudio configuration file to your user's local PulseAudio configuration directory:
cp /etc/pulse/client.conf /home/yourusername/.config/pulse
  • Make a backup copy of the global configuration file, as per the following example:
cp /etc/pulse/client.conf /home/yourusername/.config/pulse/client.confbackup


  • Open the local configuration file with a text editor such as nano:
nano /home/yourusername/.config/pulse/client.conf
Where yourusername is the Ubuntu user account where PulseAudio is to be disabled.
  • Scroll through the configuration file, then uncomment (remove the ; character) and edit the following line:

From:

; autospawn = yes

To:

autospawn = no
  • Save the file, then exit the text editor.
  • Restart/reboot your Ubuntu system.
  • PulseAudio should now be turned off. ALSA will now be used instead.

How to disable PulseAudio globally (for all users)

  • Open a terminal window or SSH into your Ubuntu system.
  • Make a backup copy of the global configuration file, as per the following example:
sudo cp /etc/pulse/client.conf /etc/pulse/client.confbackup
  • Open the global configuration file with a text editor such as nano:
sudo nano /etc/pulse/client.conf
  • Scroll through the configuration file, then uncomment (remove the ; character) and edit the following line:

From:

; autospawn = yes

To:

autospawn = no
  • Save the file, then exit the text editor.
  • Restart/reboot the Ubuntu system.
  • PulseAudio should now be turned off. ALSA will now be used instead.

How to enable PulseAudio again

  • Follow the editing steps for either the local user or globally (all users) and instead of
using the line:
autospawn = no

in the relevant configuration file, change the line to either:

; autospawn = yes

or alternatively:

autospawn = yes
  • Save the file and exit the text editor.
  • Restart/reboot your Ubuntu system.
  • PulseAudio should now be turned back on.

References

This guide was developed from the information obtained by the following resources: