The problem:
No sound from built-in speakers, and can not connect bluetooth headset. Initially there was a dummy output when checking sound settings, after trying the various things as explained underneath, the sound settings are now just empty.
At the same time i noticed I could not wake up the laptop after suspend. If i press super+L and lock it, then it it wakes up fine - but if enough time has passed and it goes into hibernation, or it sits untouched for a while and goes to "automatic suspend" then i can not wake it up. I see the keyboard lit up, perhaps even hear the fans, but the screen remains black. Also the command pm-suspend
makes the laptop freeze and i need to hold down the power button for a manual restart. I have a swap with plenty of space and everything has been working fine for about a year.
All problems started at the same time, seemingly after a regular sudo apt-get update
followed by sudo apt-get upgrade
. I run these quite regularly and haven't had issues so far. I run Ubuntu 18.04.4 LTS with kernel 5.3.0-42-generic on a Lenovo x1 Carbon 7th gen. The sound specs from alsamixer were:
Card: HDA Intel PCH
Chip: Realtek ALC285
What I've tried:
Firstly i want to mention that plenty of similar questions exist on various forums. No one however mentions both hibernate/suspend and sound problems at the same time. I have read many posts and tried many of the suggestions. As i will explain i have learned more about my problem, but have not been able to fix it. As extra elaborations on my issues here are some of the most relevant posts i've found: Can't reinstall pulseaudio, Dependency errors, PulseAudio bug,
Initially i uninstalled pulseaudio, alsa-utils, alsa-base, linux-sound-base, then when i tried to reinstall those packages i was prompted with a message regarding libpulse0 and unmet dependencies:
pulseaudio : Depends: libpulse0 (= 1:11.1-1ubuntu7.4) but 1:11.1-1ubuntu7.5 is installed
if I then tried to install some of the other packages like alsa-utils, and later trying to remove any packages it would tell me that MANY other important packages would also be removed. I naturally aborted that process. Also here I found plenty of similar posts with similar issues. Then after trying out various suggestions from google searching nothing fixed my problem, but instead the "dummy output" at some point it changed to ... well nothing. Now the system does not respond on sound up/down buttons and the sound-trackbar looks like this: sound-trackbar from top right corner of screen
Then i finally came to this post and executing the command:
apt install libpulse-mainloop-glib0=1:11.1-1ubuntu7.4 libpulse0=1:11.1-1ubuntu7.4 libpulsedsp=1:11.1-1ubuntu7.4 pulseaudio=1:11.1-1ubuntu7.4 pulseaudio-module-bluetooth=1:11.1-1ubuntu7.4 pulseaudio-utils=1:11.1-1ubuntu7.4
While it did not fix my problem totally, i was at least back to "dummy output" instead of nothing - this however meant that i could now connect my Bluetooth headset which worked fine. During this time i did not test if suspending worked properly too (trying to focus on one issue at a time i guess...).
Then i tried what other posts suggested with going in BIOS turning off audio, booting into Ubuntu, then restarting, going into BIOS again and turning audio on (BUT keeping the microphone off !), then booting into Ubuntu.
This actually worked (sort of), and my sound card was recognized and the speakers worked - but if i then go back and turn the microphone on in BIOS, then we are back to the same problem. I can reproduce this effect consistently. I don't need to first turn audio off but simply if I turn of the microphone in BIOS, then my sound works almost as usual. I noticed that with the microphone off and sound working - i could even suspend without any problems: pm-suspend command works without freezing. How on earth can these things be related? Furthermore
systemctl suspend
works fine as expected, but systemctl hibernate
simply shuts down the laptop without storing anything from the session.
Simply turning off the microphone in BIOS is of course not a viable fix, it is also not working fully as before (regarding hibernate, bluetooth, etc.). So next thing I tried out was following this post with:
sudo chown -R $<USERNAME>:$<USERNAME> $HOME/
This was apparently a big mistake! Suddenly I lost sudo rights and did not have permission to run anything in the terminal as sudo. I am the one and only user of this laptop. I found this post suggesting to boot into recovery mode and execute the following in a terminal
usermod -a -G sudo <username>
which worked perfectly and restored my sudo rights. The problem is however not solved, we are just back to the starting point. I have finally made sure that all drivers and relevant packages are again installed and up to date:
sudo apt-get install build-essential linux-headers-`uname -r` alsa-base alsa-firmware-loaders alsa-oss alsa-source alsa-tools alsa-tools-gui alsa-utils alsamixergui
i furthermore tried to reinstall the kernel:
sudo apt-get install --reinstall linux-image-5.3.0-42-generic
which succeded without issues, but did also not solve the problems.
I also tried all the steps in this guide with no luck and many more suggestions from this forum in general-
Relevant command-outputs:
Here are some terminal outputs from commands that other users were asked for in similar questions:
sudo lspci -vv | grep -i audio
00:1f.3 Audio device: Intel Corporation Device 9dc8 (rev 11) (prog-if 80)
sudo dmesg | grep -i audio
[ 0.290640] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 6.483587] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 6.505430] skl_hda_dsp_generic skl_hda_dsp_generic: Unsupported HDAudio/iDisp configuration found
but if i run it with the microphone off in BIOS i get:
[ 0.290463] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 5.484223] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 5.553378] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC285: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker
[ 5.553380] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.553382] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 5.553383] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 5.553384] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 5.553385] snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
aplay -l
aplay: device_list:270: no soundcards found...
If i run the same when the microphone is off in BIOS, then i get
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
pacmd list-cards
No PulseAudio daemon running, or not running as session daemon.
If i run the same with microphone off in BIOS, then i get a long message with plenty of info that starts with
1 card(s) available
pavucontrol
opens up window with "Connection to PulseAudio failed. Automatic retry in 5s ..."
same thing works fine as expected when microphone is off in BIOS.
sudo modprobe -v snd-hda-intel
Returns nothing
same thing when microphone is off in BIOS.
Current status:
Now i am back to where i started, knowing a bit more about my problem, but running out of ideas. What boggles my mind is that i can find so many similar posts and people having the same issues. However some posts date back to 2014-2016 while some are quite recent. To me, this makes it much more unlikely that my problems should stem from a regular update/upgrade routine - i have not made any major changes on my system however, and the problem came very suddenly while doing ordinary work (answering emails and such, nothing intrusive to the system).
I dualboot with Windows10, and here the audio works as expected. If i run Ubuntu from a live-usb the audio also works as expected.
Lastly I am still quite new to Ubuntu and Linux in general, so please bear with me for probably needing things explained with a bit more than a simple one-liner.