[Intel HDMI LPE driver] Audio is not working; pulseaudio consumes 100% of a single CPU core
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PulseAudio |
Fix Released
|
Medium
|
|||
pulseaudio (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
On a krez ninja 1103 laptop audio is not working; pulseaudio consumes 100% of a single CPU core. Pulseaudio log atached.
According to perf, most CPU is consumed at __memset_erms.
Below is the GDB stacktrace of pulseaudio.
# gdb -p 1009 -batch -eval-command=
[New LWP 1028]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
0x00007fe2abb7e6d6 in futex_abstimed_
205 ../sysdeps/
Thread 2 (Thread 0x7fe2a7458700 (LWP 1028)):
#0 0x00007fe2ab063339 in _IO_str_
#1 0x00007fe2ab10515b in ___vsnprintf_chk (s=0x7fe2a7453b80 "", maxlen=<optimized out>, flags=1, slen=<optimized out>, format=
#2 0x00007fe2ac6601ca in pa_vsnprintf () from /usr/lib/
#3 0x00007fe2ac660366 in pa_snprintf () from /usr/lib/
#4 0x00007fe2ac66bda8 in pa_log_levelv_meta () from /usr/lib/
#5 0x00007fe2ac66b655 in pa_log_level_meta () from /usr/lib/
#6 0x00007fe2a52b36ae in ?? () from /usr/lib/
#7 0x00007fe2ac68c2a8 in ?? () from /usr/lib/
#8 0x00007fe2abb756db in start_thread (arg=0x7fe2a745
#9 0x00007fe2ab0f488f in clone () at ../sysdeps/
Thread 1 (Thread 0x7fe2acfe7500 (LWP 1009)):
#0 0x00007fe2abb7e6d6 in futex_abstimed_
#1 do_futex_wait (sem=sem@
#2 0x00007fe2abb7e7c8 in __new_sem_wait_slow (sem=0x56318e57
#3 0x00007fe2ac68c502 in pa_semaphore_wait () from /usr/lib/
#4 0x00007fe2ac8cca24 in pa_asyncmsgq_send () from /usr/lib/
#5 0x00007fe2a6841119 in ?? () from /usr/lib/
#6 0x00007fe2ac675ee2 in pa_pdispatch_run () from /usr/lib/
#7 0x00007fe2a6844695 in ?? () from /usr/lib/
#8 0x00007fe2ac678bef in ?? () from /usr/lib/
#9 0x00007fe2ac67b6ab in ?? () from /usr/lib/
#10 0x00007fe2ac67ba49 in ?? () from /usr/lib/
#11 0x00007fe2ac67c2cf in ?? () from /usr/lib/
#12 0x00007fe2ac40e0d8 in pa_mainloop_
#13 0x00007fe2ac40e4ae in pa_mainloop_iterate () from /usr/lib/
#14 0x00007fe2ac40e530 in pa_mainloop_run () from /usr/lib/
#15 0x000056318d445b82 in main ()
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: pulseaudio 1:11.1-1ubuntu7
ProcVersionSign
Uname: Linux 4.15.0-22-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version k4.15.0-22-generic.
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
ArecordDevices: **** List of CAPTURE Hardware Devices ****
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/pcmC0D0p: user 1009 F...m pulseaudio
/dev/snd/
Card0.Amixer.info:
Card hw:0 'Audio'/'Intel HDMI/DP LPE Audio'
Mixer name : ''
Components : ''
Controls : 15
Simple ctrls : 0
Card0.Amixer.
CurrentDesktop: LXDE
Date: Thu May 24 16:04:13 2018
InstallationDate: Installed on 2018-05-22 (1 days ago)
InstallationMedia: Lubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/18/2017
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 8.17
dmi.board.
dmi.board.name: TY1103B
dmi.board.vendor: KREZ
dmi.board.version: 1.0
dmi.chassis.
dmi.chassis.type: 30
dmi.chassis.vendor: KREZ
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: EMI30P3S6M12L25
dmi.product.name: TY1103B
dmi.product.
dmi.sys.vendor: KREZ
Changed in pulseaudio: | |
importance: | Unknown → High |
status: | Unknown → Invalid |
Changed in pulseaudio: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in pulseaudio: | |
status: | Confirmed → Fix Released |
It was reported[1] on alsa-devel that PulseAudio gets killed when trying to use the Intel HDMI LPE driver that was introduced in kernel version 4.11. That probably happens due to excessive CPU use in the IO thread. It's not known what causes the high CPU use, but the discussion revealed some definite shortcomings in PulseAudio when HDMI's underlying hw device is hw:x,0.
There are two bugs:
1) PulseAudio assumes that if the front:x device doesn't work but hw:x,0 does, then hw:x,0 is an analog stereo device.
2) PulseAudio assumes that HDMI devices are always mapped to certain hw:x,y devices, the first one being hw:x,3. When this assumption doesn't hold, jack detection and ELD reading don't work.
For the first bug, I propose trying hw:x,0 for analog stereo only if everything else fails, so if e.g. hdmi:x,0 is successfully opened, hw:x,0 won't be used.
For the second bug, I propose removing the hardcoded device numbers, and instead query the device number from an open PCM handle. That's not reliable for all PCM devices, but Takashi expects it to work for HDMI devices.
It's not obvious what would be the best way to modify the profile and path configuration syntax to support the new features. I'll prepare a more detailed proposal when I get around to it.
My impression is that the HDMI LPE driver will be widely used, so I think this should be fixed with high priority (I'll mark this as a release blocker).
[1] http:// mailman. alsa-project. org/pipermail/ alsa-devel/ 2017-March/ 118903. html