If you are using Ubuntu 12.04 LTS, Ubuntu 14.04 LTS, Ubuntu 15.10, or Ubuntu 16.04 LTS, then please execute this command and reboot:
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 same thing happened again... But only this cannot fix the whole thing.
I run the following commands in sequences and rebooted in between and solved the problem. I don't really know which is necessary and which don't...
killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*
the reinstall alsa
sudo apt-get remove --purge alsa-basesudo apt-get remove --purge pulseaudiosudo apt-get install alsa-basesudo apt-get install pulseaudiosudo alsa force-reload
then download kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8/ and
sudo dpkg -i linux-headers-4.8.0-040800_4.8.0-040800.201610022031_all.deb
then reinstall by aptitude
sudo aptitude --purge reinstall linux-sound-base alsa-base alsa-utils linux-image-$(uname -r) linux-image-extra-$(uname -r) libasound2
then follow the troubleshooting procedure
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`
and
sudo reboot
After the first time, follow the procedure again
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`
and shut down the computer then turn it back on. Do not reboot it, this is important and I don't know why.
Then the sound card is back.