3

I have Ubuntu 11.04 (Natty Narwhal) and the sound indicator in the panel sometimes breaks down. I assume it is probably because the sound system crashes or something.

When this happens, The sound indicator shows just three dashes instead of the current volume, I can't change the volume using the Volume Up/Volume Down keys on my keyboard, not can I change it using the slider that shows when I click on the sound indicator.

When I click on the sound indicator and then click on the "Sound preferences" in the popup menu, a message box appears, saying something like "Waiting for sound system to respond". I found that this is due to crashed pulseaudio (whatever that is) and I should type pulseaudio --start to start it again. After I do that, I can open the sound preferences and adjust the volume from there, but I still can't change the volume using the multimedia keys on my keyboard, nor using the volume slider in the sound indicator.

So my questions:

  1. Is there a way to stop pulseaudio from crashing (assuming this is the cause for the indicator to break down)?
  2. If not, is there at least a way to restore the volume indicator after the pulseaudio system has been restarted, so the volume keyboard shortcuts and the slider work (maybe a way to restart the indicator itself)?

2 Answers 2

3

PulseAudio is an audio system that, among other things, enables multiple applications to use the audio interface at the same time. It can also be used for things like sharing audio over the network. So, PulseAudio is a good thing.

  1. If PulseAudio keeps crashing, then something is wrong. The best way for you to prevent that from happening, is to file a bug on http://Launchpad.net and get the developers attention. We don't exactly have a configuration option to enable or disable application crashes. :)

  2. Yes, restarting the indicators might be a successful workaround. In order to do that, you'll press AltF2 and type killall unity-panel-service

If restarting PulseAudio and then restarting the panel service works, then you might want to combine them in a script so you can do both things at once. You can then create a new text file in Gedit, paste the following and make the file executable. You do that by right clicking on the file, selecting properties > permissions > Allow execution of file. Afterwards, you can run that script as a normal program.

This is the script itself:


#!/bin/sh
pulseaudio --start
killall unity-panel-service

So, if you call the file fix_audio.sh and place it in your home directory, you'll be able to run it by pressing alt+f2 and typing ~/fix_audio.sh.

However, even if this workaround works, you should still file a bug on Launchpad so that the problem itself gets fixed for you and everyone else.

3
  • Thanks for the reply, but killing unity-panel-service does not kill the sound indicator. It seems it restarts some of the indicators (wifi, keyboard layout, ...), but not the sound one. Any other suggestion?
    – adam
    Sep 26, 2011 at 17:34
  • 1
    Hm, there is an indicator-sound process and when I kill it, the sound indicator goes back to normal - it shows the current volume and I can move the slider to adjust it. The multimedia keys still don't work though.
    – adam
    Sep 26, 2011 at 17:39
  • After upgrade to 12.04, this stopped from happening. I consider it fixed for now.
    – adam
    May 28, 2012 at 20:44
1

A fast and efficient way to restart a hanging pulseaudio server is running the following command in a terminal:

pulseaudio -k

In a standard Ubuntu setup this will kill pulseaudio sound server and restart it automatically.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .