Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#73783 - Linux kernel 5.16.8 cause process stuck when headset is connected

Attached to Project: Arch Linux
Opened by Kenneth Chin (kenchin) - Monday, 14 February 2022, 15:12 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 27 February 2022, 08:49 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After upgrade Linux kernel from 5.16.7.arch1-1 to 5.16.8.arch1-1, when plug in headset to laptop, accessing any audio functions will cause processes to crash and become defunct, e.g. open YouTube in Firefox browser, or open Zoom app. Once this happens, the system cannot shutdown properly, system is stuck in a loop trying to terminate the defunct processes, the only way is to force shutdown the laptop. If headset not connected, audio can work without issue.

Additional observation: when plug in headset to laptop and then disconnect, the GNOME audio icon changed to headset when connect but unable to revert to system speakers and microphone when disconnect.

All packages are up-to-date.

When downgrade Linux kernel from 5.16.8.arch1-1 to 5.16.7.arch1-1, the audio functions and headset detection works properly.

Device: Dell Latitude E7470

# dmesg | grep snd_hda_codec_realtek
[ 38.765117] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC3235: line_outs=1 (0x16/0x0/0x0/0x0/0x0) type:line
[ 38.765123] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 38.765126] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x15/0x0/0x0/0x0/0x0)
[ 38.765129] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 38.765131] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 38.765132] snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x1a
[ 38.765134] snd_hda_codec_realtek hdaudioC0D0: Dock Mic=0x19
[ 38.765136] snd_hda_codec_realtek hdaudioC0D0: Headphone Mic=0x18
[ 38.765138] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x13

Packages:
* linux 5.16.8.arch1-1
* xorg-server 21.1.3-2
* gnome-shell 1:41.3-1
* pulseaudio 15.0-1
* pulseaudio-alsa 1:1.2.6-2
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Sunday, 27 February 2022, 08:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  Problem resolved after updated to Linux kernel 5.16.11-arch1-1.
Comment by Daniel Bartlau (Bluesman) - Tuesday, 15 February 2022, 20:09 GMT
I can confirm, the same problem happens on my device as well. If i go back to a former version (e. g. 5.16.7) or using linux-lts, everything works properly.
I have added the trace from dmesg.


Specs:
Dell XPS 13 (9360):
CPU: Intel i7-7560U
Sound: Realtek ALC3246

Packages:
* linux 5.16.9.arch1-1
* pulseaudio 15.0-1
* alsa-lib 1.2.6.1-1
Comment by Daniel Bartlau (Bluesman) - Tuesday, 15 February 2022, 21:01 GMT
It seems linux-lts (5.15.23-2) is also affected.
Comment by Kenneth Chin (kenchin) - Tuesday, 22 February 2022, 01:16 GMT
I also tested with Linux kernel 5.16.9.arch1-1 and 5.16.10.arch1-1, both versions also giving the same results as reported earlier: after headset connected, unable to play audio, processes crashed and defuncted, system stuck while shutting down. System working properly after reverted to back to Linux kernel 5.16.7.arch1-1. All other packages up-to-date.
Comment by Marcell Meszaros (MarsSeed) - Thursday, 24 February 2022, 18:52 GMT
Do you still experience the issues with the latest kernels?
- linux 5.16.11.arch1-1
- linux-lts 5.15.25-1
Comment by Daniel Bartlau (Bluesman) - Thursday, 24 February 2022, 21:01 GMT
The last few days i checked the kernellogs and potential changes who could be responsible for the problem. There were a few changes with the realtek drivers introduced
in the versions 5.16.9 and 5.15.22-lts.

The change "ALSA: hda: realtek: Fix race at concurrent COEF updates" (commit: 1dcfc5eeaba3d87a77bc6f2e77a3e13782be15f3) is responsible for the problem.
I built the affected versions without this commit and everything worked fine. Maybe the new versions (linux 5.16.11 and linux-lts 5.15.25) will solve the problem.
According to the logs, there are a few fixes for the COEFF change.
Comment by Marcell Meszaros (MarsSeed) - Thursday, 24 February 2022, 21:17 GMT
That's a very useful find. So you were able to narrow the problem down to one commit.

Could you maybe try out the latest vanilla Arch kernels?
If the problem is still there, the breaking commit can be reported to kernel devs if no bug report exist yet.
Comment by Daniel Bartlau (Bluesman) - Friday, 25 February 2022, 10:19 GMT
I have tested the latest kernels (5.16.11 / 5.15.25-lts) and everything works fine now. :)

Comment by Kenneth Chin (kenchin) - Saturday, 26 February 2022, 14:50 GMT
After I have updated to Linux kernel 5.16.11-arch1-1, it is working fine now. Able to connect headset and play audio normally.

Loading...