Bug 207741 - HD-Audio Headphones not detected on Lenovo E495
Summary: HD-Audio Headphones not detected on Lenovo E495
Status: REOPENED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-14 19:21 UTC by pasternak.t
Modified: 2024-01-28 18:43 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.6.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments
screen from alsamixer when not working (38.66 KB, image/png)
2020-05-14 19:21 UTC, pasternak.t
Details
alsamixer when working (154.04 KB, text/plain)
2020-05-14 19:22 UTC, pasternak.t
Details
alsa mixer when working (45.33 KB, image/png)
2020-05-14 19:25 UTC, pasternak.t
Details
Log from alsa-info.sh when everything is OK (37.43 KB, text/plain)
2020-06-20 21:23 UTC, pasternak.t
Details
Log from alsa-info.sh when failing (35.31 KB, text/plain)
2020-06-20 21:24 UTC, pasternak.t
Details
Test fix patch (2.05 KB, patch)
2020-06-22 11:03 UTC, Takashi Iwai
Details | Diff

Description pasternak.t 2020-05-14 19:21:13 UTC
Created attachment 289135 [details]
screen from alsamixer when not working

Sometimes "HD-Audio Generic Headphone" device is not detected during kernel boot. As a result, headphones do work alongside with built-in speakers and it's not possible to enable auto-mute in alsamixer.

Attached screen from alsamixer.


The bug is not 100% reproducible, reboot usually helps.


DMESG when not working:
[   19.191827] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:08.1/0000:05:00.1/sound/card0/input10
[   19.192055] input: HD-Audio Generic HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:08.1/0000:05:00.1/sound/card0/input11
[   19.192249] input: HD-Audio Generic HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:08.1/0000:05:00.1/sound/card0/input12
[   19.199418] snd_hda_codec_conexant hdaudioC1D0: CX8070: BIOS auto-probing.
[   19.200336] snd_hda_codec_conexant hdaudioC1D0: autoconfig for CX8070: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   19.200338] snd_hda_codec_conexant hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   19.200340] snd_hda_codec_conexant hdaudioC1D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   19.200341] snd_hda_codec_conexant hdaudioC1D0:    mono: mono_out=0x0
[   19.200342] snd_hda_codec_conexant hdaudioC1D0:    inputs:
[   19.200345] snd_hda_codec_conexant hdaudioC1D0:      Internal Mic=0x1a
[   19.200347] snd_hda_codec_conexant hdaudioC1D0:      Mic=0x19
[   19.209160] input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:08.1/0000:05:00.6/sound/card1/input13
[   19.226055] input: PC Speaker as /devices/platform/pcspkr/input/input14


DMESG when working
[   31.659625] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:08.1/0000:05:00.1/sound/card0/input10
[   31.659742] input: HD-Audio Generic HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:08.1/0000:05:00.1/sound/card0/input11
[   31.659806] input: HD-Audio Generic HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:08.1/0000:05:00.1/sound/card0/input12
[   31.680364] snd_hda_codec_conexant hdaudioC1D0: CX8070: BIOS auto-probing.
[   31.681298] snd_hda_codec_conexant hdaudioC1D0: autoconfig for CX8070: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   31.681301] snd_hda_codec_conexant hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   31.681302] snd_hda_codec_conexant hdaudioC1D0:    hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
[   31.681303] snd_hda_codec_conexant hdaudioC1D0:    mono: mono_out=0x0
[   31.681304] snd_hda_codec_conexant hdaudioC1D0:    inputs:
[   31.681306] snd_hda_codec_conexant hdaudioC1D0:      Internal Mic=0x1a
[   31.681307] snd_hda_codec_conexant hdaudioC1D0:      Mic=0x19
[   31.702621] input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:08.1/0000:05:00.6/sound/card1/input13
[   31.702674] input: HD-Audio Generic Headphone as /devices/pci0000:00/0000:00:08.1/0000:05:00.6/sound/card1/input14
Comment 1 pasternak.t 2020-05-14 19:22:15 UTC
Created attachment 289137 [details]
alsamixer when working
Comment 2 pasternak.t 2020-05-14 19:25:21 UTC
Created attachment 289139 [details]
alsa mixer when working
Comment 3 Takashi Iwai 2020-05-29 15:24:37 UTC
Do you see any relevant kernel messages or such if the problem happens?  i.e. is it some codec communication error?

Unless we see it as an error, it's hard to debug, unfortunately.

In anyway, please give alsa-info.sh output.  Run the script with --no-upload option and attach to Bugzilla.  A best, give the outputs on both working and non-working cases.
Comment 4 pasternak.t 2020-06-20 21:23:27 UTC
Created attachment 289757 [details]
Log from alsa-info.sh when everything is OK
Comment 5 pasternak.t 2020-06-20 21:24:06 UTC
Created attachment 289759 [details]
Log from alsa-info.sh when failing
Comment 6 pasternak.t 2020-06-20 21:25:59 UTC
Thanks for looking at this! Sorry for the delay, I just attached the logs from alsa-info.sh. In the meantime I've found a 100% repro for this: the problem occurs always when I reboot computer from Windows to Linux. If I reboot from Linux to Linux it's always ok. I know that's weird, but it's 100% reproducible.
Comment 7 Takashi Iwai 2020-06-22 11:02:46 UTC
It looks like that the BIOS doesn't initialize the pin 0x16 properly when rebooted from Windows.  Maybe Windows turn off the power of the pin, and BIOS skips the pin initialization.

It's a bit messy to restore the behavior.  Could you try the following patch?
Comment 8 Takashi Iwai 2020-06-22 11:03:15 UTC
Created attachment 289783 [details]
Test fix patch
Comment 9 pasternak.t 2020-06-22 22:13:02 UTC
Just tested, it's perfect, thank you!
Comment 10 Takashi Iwai 2020-06-23 06:26:30 UTC
OK, I'll submit and merge the fix to upstream.  It'll be backported to stable kernels once after it landed in Linus tree.
Comment 11 pasternak.t 2020-06-23 07:46:53 UTC
Oh, sorry for the mess. Yesterday I was checking it late at night and I didn't chceck the audio, only the "mute" led that was not working before the bug. Now, the "mute" LED works ok, but there's no sound at all, so it's even worse.
.
Comment 12 pasternak.t 2020-06-23 08:01:23 UTC
Reopening due to the previous comment
Comment 13 pasternak.t 2020-06-23 08:17:02 UTC
Just to clarify - there's now a silent noise. I looks like a single sound that "hanged" and is played in a loop.
Comment 14 Takashi Iwai 2020-06-23 10:35:15 UTC
Hrm, then it's difficult to get through.  Basically it's a BIOS bug that doesn't initialize the stuff, and hard to know what's still missing behind the scene...
Comment 15 bcampbell 2020-09-25 23:58:17 UTC
Just to add another report - I experience this bug on my E495 too.

If I boot into Windows, then reboot to Linux without shutting down first, the headphones don't work.
It works fine when I boot to Linux from powered off.

Like pasternak.t, I get the same hp_outs lines in dmesg:

working:
[    3.212571] snd_hda_codec_conexant hdaudioC1D0:    hp_outs=1 (0x16/0x0/0x0/0x0/0x0)

not working:
[    3.891088] snd_hda_codec_conexant hdaudioC1D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
Comment 16 pasternak.t 2020-10-02 06:59:14 UTC
@bcampbell good to know :) Maybe we should submit this bug to Lenovo?
Comment 17 Dominik 2020-10-20 05:55:10 UTC
@pasternak.t i am probably affected too (209761), so i am willing to do what's neccessary in order to have this bug patched out. Is forums.lenovo.com apropriate place to fill a bug report to hardware vendor?
Comment 18 pasternak.t 2020-10-20 18:07:52 UTC
I have no idea
Comment 19 Wojciech Muła 2024-01-28 18:43:59 UTC
Sorry for digging out this quite old bug, but I observed exactly the same issue as described in comment #15. I have Lenovo ThinkPad E16 and kernel 6.1 (from Debian stable).

Note You need to log in before you can comment on or make changes to this bug.