Lost Prg audio not Sys audio

I Get this Error on Boot (Not sure if this has anything to do with it but)

qemu-kvm.service loaded failed failed LSB: QEMU KVM module loading script

so the short is I always have system sound i.e. click on menu and sound works
but when I open up an application like VLC, SMPlayer or Rhythmbox I will get

Audio output failed
The Audio device “default” could not be used:
Connection refused.

but here is the kicker some times it happens on re-boot but 90% of the time it happens after I close the app and then re-open it again is when I get this msg. The only way I know to get it audio back is reboot.

I still have web8update pulse eq installed.
I’m not sure where to find error logs to post

Is there a way to purge all my audio and re-install again?
or do need a new install? If I do will I loose all my data? I did set up my partitions correctly so my home directory is not mixed in with everything else.

sys info Desktop Tower
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

Linux version 4.4.0-24-generic (buildd@lgw01-12)
(gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #43-Ubuntu SMP Wed Jun 8 UTC 2016
Thanks for any help!

I have always had issues with sound not working alongside, simultaneously, streaming web video locking up following the use of certain sound applications such as Qjackctl and Qsynth. I have found the way to fix this is with the following sound-reset command:

pulseaudio -k && sudo alsa force-reload

I have placed this command in a panel launcher and so, following the use of any problematic apps, I just press the launcher before doing anything else. At which point the sound and streaming web video works again. I don’t know for certain if this will help you, but thought I might mention it.

1 Like

Thanks Steve for the command that seems to work! (Twice so far no reboot needed)
I will now keep this handy for quick deploy.

You may have saved my sanity.:scream: (For now :grin:)

1 Like

I take it you will have probably used that command in a terminal. In which case, it will requires your password for the sudo part of the command. Bear in mind that if you set this up as a launcher, it will not show a terminal and so you wont be able to enter the sudo password when required and so the command would fail. You can get round that problem in one of two ways:


A) Have the command in a bash script that you then double click to execute. The dialogue box that comes up asks if you want to run it in a terminal. You should choose “yes”. This will then allow you to enter your sudo password when required.


B) Edit your sudoers file and add a line in it that causes you to no longer have to enter your sudo password. However, I should add the following caveat here that many people would discourage you from doing that. Firstly, because if you mess up while editing the suduers file, you will bork your system and may have to rewrite it. I know that because I have done it!. Secondly, some people argue that it represent a breach of security. For myself, I do not consider it a serious security breach. But, obviously, it would be your choice. To edit the suders file:

  1. Open up a terminal. Type “sudo visudo” and press the “Enter” key. After typing in your password at the prompt, press “Enter”. You will be taken into something called the “sudoer” file.

  2. Hold the down arrow key and you will see the cursor move to the bottom of the file. Paste the following line below all other lines (in order to paste using only the keyboard in a terminal, you need to press the CTRL/SHIFT/V keys simultaneously):

yourusername ALL=NOPASSWD: ALL

where “yourusername” should be replaced with your actual user-name (mine, for example, is “stephen”)

  1. You now need to save and close the file. To do this you need to:
  • Press CTRL and X
  • You will be prompted to type Y or N in order to save or discard the modifications. You must type Y
  • You will be given another prompt for the name that is given. Simply press the “Enter” key.

You should now find you have dropped out of the sudoer file and are back at the normal terminal prompt. That’s it, you can close the terminal at that point

From now on, whenever any command you execute would ordinarily require a sudo password (including inside a launcher), you will be no longer be required to enter it and the command will simply execute.

Hmm, well not sure about the bash script but I did understand your sudoers file and the risk by editing it. Thanks for the info

this is what I did (this did not work but am I on the right track?)

I just opened up menu editor and added a new item
changed Type: Application in Terminal
Gave it a Name:
then added your command: pulseaudio -k && sudo alsa force-reload

when I launch it opens a terminal and asks for PW then closes with nothing being done. so right now my only option is to run it in a terminal.
Oh I also tried changing the sudoers file with success then tried the above with the same result. nothing
am I close?

When you launch it in a terminal and then enter the password and it closes, this does not mean it has failed. In all likelihood, it means it has successfully executed the command.

Following changing the suduers file, this will mean that, even if you have set it to run in an open terminal, because you are no longer required to enter your sudo password the terminal will flash for merely a fraction of a second before automatically closing once the command has been executed. So, again, it is in all likelihood successfully executing.

The only way you can be certain of this is to wait for your sound to die, then run the launcher. If the sound comes back, it's working


To make a bash script with this command, do the following:

  1. open a new pluma document.

  2. paste the following into it:

pulseaudio -k && sudo alsa force-reload

  1. Save the file as reload-sound.sh

  2. Open Caja and navigate to where you have saved the file and right click it and select "properties"

Go to the "permissions" tab and check the "allow executing file as program" checkbox. You can now close the properties dialogue box.

Now, whenever you double click this bash script, it will give you the following dialog box:

If you had not edited your suduer file, you would need to choose "run in terminal". But since you have edited your suduer file, you could simply choose "run".

Yeah, I checked and re-checked and this did not seem to be the case. For one reason or another id simply did nothing for my audio issue.

Thanks for info it helped a lot! After thinking about my audio issues I remember that they started happening right after installing Kdenlive Video. I never could get it to work correctly so I removed it via Synaptic, I think. My audio has never been the same since.

Thanks again Steve for the script

Although I don’t think this is relevant to your problem, just in case it might be, I also use the following command after using any jack dependant app

jack_control exit