Sound Issues on Linux Mint 20
Fix for sound not working on Mint 20 - and 21 (Ubuntu Focal 20.04)
Sound stopped working on my HP Pavilion laptop with Mint 20.
There are two situations I've seen
No Driver Loaded
Run
dmesg | grep snd
If no entry shows snd_hda_codec_generic (or _realtec) then try restarting the drivers.
Restart the audio drivers with
pulseaudio -k && sudo alsa force-reload
Realtek Driver Loaded and not Working
This option should be tried if the dmesg entry shows snd_hda_codec_realtek
I tried all the solutions identified by Google searches. This page is a very good summary of them https://forums.linuxmint.com/viewtopic.php?t=363010
Not only that, one of the pages it linked to had a solution!
http://mreen.epizy.com/SoundFixTips2.html
I'm extracting the solution here in case that page ever goes away.
Lately, the Realtek driver module has been quite flaky for some. To see if the following "fix" might be worth a try, look at the output of dmesg | grep snd and see if "snd_hda_codec_realtek" is in the output as seen here:
scott@scott-HP:~$ dmesg | grep snd
[ 19.302133] snd_hda_intel 0000:00:01.1: Force to non-snoop mode
[ 19.506862] snd_hda_codec_realtek hdaudioC1D0: ALC221: SKU not ready 0x411111f0
[ 19.507171] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC221: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[ 19.507173] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 19.507175] snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 19.507177] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
[ 19.507179] snd_hda_codec_realtek hdaudioC1D0: inputs:
[ 19.507181] snd_hda_codec_realtek hdaudioC1D0: Mic=0x1a
[ 19.507182] snd_hda_codec_realtek hdaudioC1D0: Line=0x1b
scott@scott-HP:~$
Assuming it's there, use this command in the terminal to prevent the module from loading:
sudo tee /etc/modprobe.d/blacklist-realtek.conf <<<'blacklist snd_hda_codec_realtek'
Fully shut down the system after running that. Many users found that simply rebooting didn't work. Wait a few minutes then power up and test the sound. And to be absolutely sure, I'd suggesting shutting down once more if the first attempt didn't work. And don't worry about this module being blacklisted as Linux has a generic parser that will take over in it's place.
For some, the above actually makes things worse. The simple remedy is to revert with this command and a reboot:
sudo rm /etc/modprobe.d/blacklist-realtek.conf
After rebooting the sound worked.
Running
dmesg | grep snd
Showed that the drivers changed from
[ 19.507182] snd_hda_codec_realtek hdaudioC1D0:
to
[ 5.741001] snd_hda_codec_generic hdaudioC0D0: