# ThinkPad E490 - sound/audio only works after specific boot (from poweroff, not any connected plug)



## Neals (Jan 3, 2021)

Hi all together and a happy new year!
I am struggling already since several months with the sound/audio on my Lenovo ThinkPad E490. Because I am trying to find the cause since several weeks now, I hope to find some suggestions and help here.

If I boot the notebook after power off, without anything connected, no power supply, no headphone connected in the audio jack and the sound works. It is possible to switch between the notebook sound (pcm0) and the headphone (pcm1) without any issue.
But after a reboot, if anything is connected as e.g. the power supply on the USB-C connector and/or some headphone on the audio jack the notebook makes some very strange and loud noises while booting and after boot I am not able to get notebook to make any noise or sound on any output.

- FreeBSD 12.2-RELEASE-p1 GENERIC amd64
- Latest HW-Probe: https://bsd-hardware.info/?probe=1ffaf5420c

These files on gist are from the system, sndstat, dmesg, sysctl I grabbed with the script below: https://gist.github.com/NealsJoe/c940299c2b362381d254b34496ec1d66


```
#!/bin/sh

doas cat /dev/sndstat > sndstat.txt

doas pciconf -lv | grep -i audio -B2 > sound-pciconf.txt
doas dmesg | grep -e 'sound' -e 'audio' -e 'snd' -e 'pcm' -e 'hda' > sound-dmesg.txt
doas sysctl -a | grep -e 'sound' -e 'audio' -e 'snd' -e 'pcm' -e 'hda' > sound-sysctl.txt

doas sysctl dev.pcm > sound-sysctl-pcm.txt
doas sysctl dev.hdaa > sound-sysctl-hdaa.txt
doas sysctl dev.hdac > sound-sysctl-hdac.txt
doas sysctl dev.hdacc > sound-sysctl-hdacc.txt
doas sysctl hw.snd > sound-sysctl-snd.txt
```

Has anybody a clue why the sound does not work if the notebook boots with external connections? An issue of hardware or software? Is it related to the power supply mass connection whose differs in case the power supply is connected?

Any hints are welcome. ;-)
Thanks in advance, Neals


----------



## Alexander88207 (Jan 3, 2021)

Hello,

can you provide the log files with the problem and without the problem? Maybe then you can see a decisive difference.


----------



## Neals (Jan 4, 2021)

Alexander88207 said:


> Hello,
> 
> can you provide the log files with the problem and without the problem? Maybe then you can see a decisive difference.



Hi Alexander,
I have already added the files (provided above) into a Git Repo and checked them after several reboots for changes.... but there were no essential changes.


----------



## Alexander88207 (Jan 4, 2021)

Then I think rather that it is a hardware error, what happened with other operating systems?


----------



## pinned (Jan 4, 2021)

I get a loud and shrill whistle from my E490 with FreeBSD 12.x-RELEASE almost everytime after a reboot. This happens either with or without any external connections.  

I've stopped "rebooting" and instead, just power off and power on. This way there are no weird noises while booting up and audio works from any output - notebook speakers/headphones, usb headphones. I do have to switch the output manually though. 

This did not happen on Windows 10 which came installed on the E490.


----------



## Neals (Jan 5, 2021)

pinned said:


> I get a loud and shrill whistle from my E490 with FreeBSD 12.x-RELEASE almost everytime after a reboot. This happens either with or without any external connections.
> 
> I've stopped "rebooting" and instead, just power off and power on. This way there are no weird noises while booting up and audio works from any output - notebook speakers/headphones, usb headphones. I do have to switch the output manually though.
> 
> This did not happen on Windows 10 which came installed on the E490.



Thanks for this hint. So this issue not specific to my setup.
But I have not yet accepted this circumstance as you did already... ;-)


----------



## leanhtai01 (Jan 5, 2021)

My laptop is Lenovo Thinkpad E490 as OP. I have same problems with sound as OP (on FreeBSD 12.2-RELEASE, FreeBSD 13.0-CURRENT).
Intel backlight not working on this laptop too.
On Windows 10 and Arch Linux, audio work normally. So It definitely isn't a hardware error.


----------



## Alexander88207 (Jan 5, 2021)

I recommend you then to create a PR at Bugzilla.


----------



## George (Jan 5, 2021)

Maybe the driver fails to put the card in its proper state after a shutdown is issued. So the problem would reside in the drivers DEVICE_SHUTDOWN(9) method.

A cold reboot (power off) or unplugging the card resets the card, and it becomes functional again.

I'd also look at bugzilla.


----------



## Neals (Feb 21, 2021)

Just reproduced the issue on the same device with FreeBSD 13.0-BETA2 and 13.0-BETA3 as well.

See the hardware probes here:

__ https://twitter.com/i/web/status/1362803573701107712_View: https://twitter.com/NealsJoe/status/1362803573701107712_


__ https://twitter.com/i/web/status/1363514762999590912_View: https://twitter.com/NealsJoe/status/1363514762999590912_


See the bug at bugzilla here:
- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253744


----------



## lfm (Dec 15, 2022)

Hi there!
UEFI / BIOS seems to be related.
I'm using FreeBSD 13.1 and could reproduce the loud squeak issue at boot time, after entering the UEFI BIOS setup from grub (fwsetup entry). I removed the menuentry for UEFI Firmware Settings, updated / reinstalled grub and the problem is now gone.
It's been weeks using, suspending, resuming and rebooting the laptop without issues. No need to disconnect or cold boot.


----------

