Try these commands:
sudo add-apt-repository ppa:ubuntu-audio-dev/ppa; sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-'uname -r' libasound2; sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-'uname -r' libasound2; killall pulseaudio; rm -r ~/.config/pulse*; rm -r ~/.pulse*; 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'
Restart and this should be solved; at least in theory, because it did not work for me in the first instance.
What I did next was to install the latest version of the ubuntu 16.04 kernel (I think this is optional, I did it more than anything in case something got corrupted or corrupted with everything I tried). I used the following command:
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04
It's from the official wiki from ubuntu.
Then I followed the steps detailed in this answer from askubuntu , that I translate, first execute these commands:
pulseaudio -k && sudo alsa force-reload
Then:
pacmd list-cards
If this shows you the available audio cards that would be all, but verify that the system finds them with the following command:
lspci -nnk | grep -A2 Audio
If this returns results and you see the audio cards listed, perform the following steps:
Reboot the machine and enter the bios
Within the bios settings it disables the audio driver.
Save the changes and log in to ubuntu, if you click pulseaudio and list the sound cards but they are disabled.
Restart again, enter the bios and enable the audio driver.
Save the changes and sign in to ubuntu.
Buala !!! the audio already works !!!
Anything you comment and I answer you, because before doing this I first had to repair alsa since the audio system did not show any sound card, not even "Exit for clumsy".
In case anyone happens to him I recommend you to follow this post and then, when you arrive at the part that says "repair press" follow the steps that I detail here.
I hope it helps you.
Greetings.