So, I'm not sure what caused this because I haven't messed with the sound system at all. But, for some reason the sound keeps breaking, that is, no sound is produced. Sometimes just a Dummy output exists and sometimes it detects everything and it can be seen in pulseaudio and the sound application, but still no sound is produced.
Now this appears to occur quite often, as there are many fixes on this internet. This command usually works for me:
sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop linux-image-`uname -r` libasound2; sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop linux-image-`uname -r` libasound2; killall pulseaudio; rm -r ~/.pulse*; ubuntu-support-status; sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`
The problem is however, that this is very temporary usually after a reboot it's broken again.
Also, during the time that it is working the volume level doesn't change, it's either off or very loud. This appears to be because of PCM in alsamixer being set to 100%. So I turn that down, but if I change the volume it goes back up to 100%. I tried a solution which blocked it from going up to 100%, but the volume level stays fairly flat, it doesn't go from quiet to loud as it should.
Also my headphones are just not detected by my computer. They used to be until all this sound stuff started going wrong.
How can I just put everything back to normal?
I'm using a dell xps 13 with ubuntu 16.04. My soundcard is being detected by aplay -l.
Best Answer
Turns out that in my case, the
squeezelite
package was causing the issues.I disabled it with:
Now I am not seeing the problem anymore. There is an existing bug report for this, here: https://bugs.launchpad.net/ubuntu/+source/squeezelite/+bug/1636253
This was my original answer, not really relevant anymore but I'll leave it here for context