13

I am having sound issues in Ubuntu 14, mostly underruns causing skips and ugly noises and I want to remove pulse audio in an attempt to debug.

But when I do this breaks system settings in ubuntu. Fixing this by installing 'ubuntu-desktop' or 'unity' result in pulse being reinstalled.

I have blacklisted a few drivers I'm not using with not positive or negative effect. I have also tried removing pulse and removing the ~/.pulse folder before reinstalling.

Any help appreciated.

Noki
  • 932
  • 2
    You should try to disable it instead. – CameronNemo Jun 29 '14 at 15:24
  • This is a good guide for alsa configuration http://wiki.xbmc.org/index.php?title=Archive:HOW-TO:Setup_audio_over_HDMI_on_nVidia_GeForce/nForce_controller – Noki Jun 30 '14 at 01:23
  • 1
    Just so you know: if PulseAudio isn't working, most media players can use ALSA directly. (Preferences > Simple > Audio > Output Module in VLC; MPlayer can be run with -ao alsa.) PulseAudio doesn't work on my Netbook, but using those audio woks without a problem. – JamesTheAwesomeDude Jan 05 '15 at 17:03
  • 1
    if you found any working solution for your problem, please mention it as an answer so that it could be of need for someone. Actualy, I am also having the same issue on my Ubuntu 14.04. – Anuj TBE Feb 12 '15 at 16:24
  • No solution, sorry about that. It is also a shame that you are also having the same problem. I thought it was my amplifier but hadn't been able to try another. Since you have it too it may be a software bug. Do you know how to go about reporting such an intermittent issue? – Noki Feb 13 '15 at 20:35
  • I have now reproduced similar happenings in my Windows 8.1 installation on the same machine. I think for me the problem is with my Onkyo TX-SR308 Amp. – Noki May 01 '15 at 14:04
  • 1
    The only good pulse audio is a dead one. – Owl Mar 15 '21 at 22:41

3 Answers3

14

You can't remove Pulseaudio in Ubuntu 14.04 without breaking some dependencies. The sound indicator and the sound options panel, even the control center itself, are dependent on Pulseaudio.

Pulseaudio is just a userspace daemon. But you can't simple kill Pulseaudio since it will be respawned by the init system.

jorge@den:~$ ps aux | grep pulseaudio
jorge     3797  0.0  0.1 440464  7360 ?        S<l  17:40   0:00 /usr/bin/pulseaudio --start --log-target=syslog
jorge     3803  0.0  0.0  98392  3028 ?        S    17:40   0:00 /usr/lib/pulseaudio/pulse/gconf-helper
jorge     4057  0.0  0.0  23900   924 pts/0    S+   17:51   0:00 grep --color=auto pulseaudio
jorge@den:~$ pkill -f pulseaudio
jorge@den:~$ ps aux | grep pulseaudio
jorge     4063  6.0  0.1 440680  7236 ?        S<l  17:51   0:00 /usr/bin/pulseaudio --start --log-target=syslog
jorge     4067  0.0  0.0  98392  3028 ?        S    17:51   0:00 /usr/lib/pulseaudio/pulse/gconf-helper
jorge     4069  0.0  0.0  23900   924 pts/0    S+   17:51   0:00 grep --color=auto pulseaudio

You can tell Pulseaudio not to respawn itself by issuing this command:

echo "autospawn = no" > $HOME/.config/pulse/client.conf

You can now kill pulseaudio:

jorge@den:~$ pkill -f pulseaudio
jorge@den:~$ ps aux | grep pulse
jorge     6310  0.0  0.0  23900   916 pts/1    S+   18:11   0:00 grep --color=auto pulse

Pulseaudio should be restarted on session startup, but it might be terminated if there is no sound activity, so after you are done, remember to remove the file you have created before, so Pulseaudio can be respawned when needed.

rm $HOME/.config/pulse/client.conf
  • Thanks for the information. I will now work on ALSA to see if I can get audio working without pulse to see if that's my problem. – Noki Jun 30 '14 at 00:31
  • You can kill pulseaudio with pulseaudio -k. If autospawn is disabled, pulseaudio will not be started during system startup because the autospawn feature is needed to do that., you have to start pulseaudio manually with pulseaudio --start. – mook765 Apr 30 '18 at 21:06
  • 1
    "it will be respawned by the init system." Not exactly. The respawning of pulseaudio is (maddeningly) more 'magical' than that. See https://unix.stackexchange.com/a/245799/11592 – pestophagous Jun 01 '18 at 22:19
5

You can easily remove pulseaudio with apt-get:

apt-get remove --purge pulseaudio

or with apt:

apt purge pulseaudio
  • 1
    Did you actually try that command? – guntbert Nov 28 '15 at 19:35
  • Yes, but it seems the problem is hardware, not software. – Noki Nov 29 '15 at 20:56
  • It is definitely my amp, and the command did work for removing pulse. – Noki Jan 30 '16 at 23:26
  • 8
    Proceed with care to this solution. By default (answering yes, yes) it may also remove ubuntu-desktop and unity-control-center packages and at least leave you with broken System Settings. @Noki - please consider marking another answer as accepted. – Ilia Barahovsky Feb 08 '17 at 05:14
  • Perfect, I just had tu reinstall the drivres following this: https://askubuntu.com/questions/722685/realtek-audio-drivers-for-ubuntu – Chuox Mar 14 '22 at 19:44
1

The above answer is a good solution. To ease the process one could put it in a practical script. For example:

echo autospawn = no > $HOME/.config/pulse/client.conf
pulseaudio --kill
read -p "Press enter to enable pulseaudio again."
rm $HOME/.config/pulse/client.conf
pulseaudio --start

I didn't think of it, merely adapted it. This script works for me in Ubuntu 16.04.

karel
  • 114,770