Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)?
share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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 '11 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 '11 at 17:39
    
After upgrade to 12.04, this stopped from happening. I consider it fixed for now. –  adam May 28 '12 at 20:44
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.