Bug 490017 - Laptop's built-in speaker not shown when connected to HDMI monitor with built-in speakers
Summary: Laptop's built-in speaker not shown when connected to HDMI monitor with built...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://gitlab.freedesktop.org/pipewi...
Keywords: multiscreen, regression
Depends on:
Blocks:
 
Reported: 2024-07-10 13:28 UTC by Iyán M. V.
Modified: 2024-08-29 10:17 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
journalctl logs (54.90 KB, text/plain)
2024-08-21 07:56 UTC, Iyán M. V.
Details
Output pactl list (without docking station) (64.25 KB, text/plain)
2024-08-29 05:54 UTC, Iyán M. V.
Details
Output pactl list (with docking station) (65.73 KB, text/plain)
2024-08-29 06:26 UTC, Iyán M. V.
Details
pactl list when HDMI monitor is connected (71.99 KB, text/plain)
2024-08-29 06:30 UTC, whites11
Details
pactl list when HDMI monitor is NOT connected (71.91 KB, text/plain)
2024-08-29 06:30 UTC, whites11
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iyán M. V. 2024-07-10 13:28:48 UTC
SUMMARY
The laptop built-in speaker is not shown when attached to docking station. This a recent regression as it used to work in previous 6.0 and 6.1 releases.

In addition, the HDMI audio output gets enabled every time the laptop is attached to the docking station, while in previous releases it would remember previous state and use it.

STEPS TO REPRODUCE
1. Connect laptop to docking station

OBSERVED RESULT
Built-in audio is gone. It is not even shown in the settings when activating the "Show Inactive Devices" toggle button.

EXPECTED RESULT
Built-in speaker should always be shown, no matter what external devices are attached or used. Many external monitors might not even have speakers.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 22 × Intel® Core™ Ultra 7 155H
Memory: 30.9 GiB of RAM
Graphics Processor: Mesa Intel® Arc
Manufacturer: LENOVO
Product Name: 21KDS00600
System Version: ThinkPad X1 Carbon Gen 12
Comment 1 whites11 2024-07-17 15:22:00 UTC
+1 same identical issue.
audio card detected and working until I plug HDMI cable, then audio card disappears
Comment 2 Iyán M. V. 2024-07-17 15:25:35 UTC
If you switch to laptop screen only (either from the keyboard shortcut or from the display configuration applet in the system tray) while keeping the HDMI connected, do you recover the built-in speaker? In my case that works.
Comment 3 whites11 2024-07-18 06:23:12 UTC
(In reply to Iyán Méndez Veiga from comment #2)
> If you switch to laptop screen only (either from the keyboard shortcut or
> from the display configuration applet in the system tray) while keeping the
> HDMI connected, do you recover the built-in speaker? In my case that works.

Yes, same.
Comment 4 TraceyC 2024-07-18 20:24:48 UTC
Marking confirmed since it affects at least 2 people. 

As a data point, this bug does not affecte my Dell XPS laptop, when docked, with one HDMI and one DisplayPort monitor

Operating System: Solus 4.5
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.8-294.current (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 62.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
Manufacturer: Dell Inc.
Product Name: XPS 17 9710
Comment 5 Nate Graham 2024-08-20 18:19:40 UTC
This doesn't affect my setup either, with a Lenovo ThinkPad Yoga gen 4 hooked up to a USB-C dock with an HDMI monitor (that lacks built in speakers) plugged into it.

For those affected, does it happen if you plug in the screen directly, bypassing the dock?
Comment 6 whites11 2024-08-20 18:35:09 UTC
For me there is no docking station involved.
It's direct HDMI to a monitor with speakers
Comment 7 Nate Graham 2024-08-20 20:43:08 UTC
So basically, the laptop's built-in speakers disappear when the external screen with its own built-in speakers is connected over HDMI? Do I have that right? Can you confirm that as well, Iyán?

If so, I should actually be able to test this tomorrow, as I have a new screen arriving that's got both built-in speakers and an HDMI input. My current HDMI screen has no speakers and does not exhibit the issue. It's also pretty old, from 2014. So definitely a much older version of the HDMI protocol too.
Comment 8 whites11 2024-08-21 06:51:00 UTC
As a data point, my monitor is also pretty old. I bought it in 2019 and it was pretty much end of production sale.
It's this one if it matters https://www.newskillgaming.com/en/icarus-27-4k-refurbished
Comment 9 Iyán M. V. 2024-08-21 07:47:16 UTC
I can confirm that this happens to me with or without docking station, with old monitors and with new monitors. I have also tried different cables just to be sure. It happens also using DP to USB-C, with HDMI directly from monitor to laptop, and with the docking station using HDMI or DP. If you think of any logs that would be useful to share to debug this please let me know, today I have access to a (newish) monitor that I can connect directly to HDMI. Tomorrow I will have access to my usual setup with docking station as well.
Comment 10 Iyán M. V. 2024-08-21 07:56:45 UTC
Created attachment 172800 [details]
journalctl logs

This is the (truncated) output of journalctl --user -u plasma-plasmashell.service after I connect an external monitor via HDMI (built-in speaker is gone) and I disconnect it again (built-in speaker comes back). There are many lines from org.kde.pulseaudio.
Comment 11 Nate Graham 2024-08-28 17:06:47 UTC
Unfortunately I cannot reproduce this issue with two HP screens (27er and Z24m G3), both when connected to a USB-C dock with an HDMI port, or when plugged directly into my laptop's HDMI port. The Z24m G3 does have built-in speakers, while the 27er does not. In both cases, the audio output stays where it was before, and the laptop's built-in speakers remain visible.

I normally have the new Z24m G3 screen connected via USB-C/DisplayPort, and the issue doesn't happen with that configuration, either.

I think we need a PulseAudio or PipeWire expert to help diagnose the issue further.
Comment 12 Iyán M. V. 2024-08-28 20:32:33 UTC
I will be happy to provide more logs if needed. Just in case someone else tries to reproduce, here are the exact versions I'm using:

kpipewire 6.1.4-1
libpipewire 1:1.2.3-1
pipewire 1:1.2.3-1
pipewire-audio 1:1.2.3-1
pipewire-jack 1:1.2.3-1
pipewire-libcamera 1:1.2.3-1
pipewire-pulse 1:1.2.3-1
pipewire-session-manager 1:1.2.3-1
libwireplumber 0.5.5-1
wireplumber 0.5.5-1
Comment 13 Harald Sitter 2024-08-28 23:49:31 UTC
Does `pactl list` list the missing device?
Comment 14 Iyán M. V. 2024-08-29 05:54:37 UTC
Created attachment 173071 [details]
Output pactl list (without docking station)

Here is the output of pactl list with the laptop NOT connected to the docking station. I believe Sink #345 is what corresponds to the built-in laptop speaker. In some minutes I will upload the new output when attached to the docking station.
Comment 15 Iyán M. V. 2024-08-29 06:26:22 UTC
Created attachment 173075 [details]
Output pactl list (with docking station)

And this is the output after attaching the laptop to the docking station. It looks like "Speaker" is gone (alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink).
Comment 16 whites11 2024-08-29 06:28:50 UTC
At a first glance, it seems the same sinks are there before and after the HDMI monitor is connected:

```
$ cat disconnected_to_hdmi.txt | grep Sink
Sink #256
                media.class = "Audio/Sink"
Sink #257
                media.class = "Audio/Sink"
Sink #258
                media.class = "Audio/Sink"
Sink #259
                media.class = "Audio/Sink"
        Monitor of Sink: n/a
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI3__sink
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI2__sink
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink
                media.class = "Audio/Sink"
        Monitor of Sink: n/a
        Monitor of Sink: n/a



$ cat connected_to_hdmi.txt | grep Sink
Sink #48
                media.class = "Audio/Sink"
Sink #49
                media.class = "Audio/Sink"
Sink #50
                media.class = "Audio/Sink"
Sink #51
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI3__sink
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI2__sink
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink
                media.class = "Audio/Sink"
        Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink
                media.class = "Audio/Sink"
        Monitor of Sink: n/a
        Monitor of Sink: n/a
        Monitor of Sink: n/a
```
Comment 17 whites11 2024-08-29 06:30:04 UTC
Created attachment 173076 [details]
pactl list when HDMI monitor is connected
Comment 18 whites11 2024-08-29 06:30:27 UTC
Created attachment 173077 [details]
pactl list when HDMI monitor is NOT connected
Comment 19 whites11 2024-08-29 06:34:14 UTC
Interesting fact: when HDMI is connected, the built-in speaker becomes "headphones" ... 

```
$ cat disconnected_to_hdmi.txt | grep 'Sink #' -A3|grep Description
        Description: Meteor Lake-P HD Audio Controller HDMI / DisplayPort 3 Output
        Description: Meteor Lake-P HD Audio Controller HDMI / DisplayPort 2 Output
        Description: Meteor Lake-P HD Audio Controller HDMI / DisplayPort 1 Output
        Description: Meteor Lake-P HD Audio Controller Speaker

$ cat connected_to_hdmi.txt | grep 'Sink #' -A3|grep Description
        Description: Meteor Lake-P HD Audio Controller HDMI / DisplayPort 3 Output
        Description: Meteor Lake-P HD Audio Controller HDMI / DisplayPort 2 Output
        Description: Meteor Lake-P HD Audio Controller HDMI / DisplayPort 1 Output
        Description: Meteor Lake-P HD Audio Controller Headphones
```
Comment 20 whites11 2024-08-29 06:37:28 UTC
Possibly related pipewire issue https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2951
Comment 21 Harald Sitter 2024-08-29 07:24:40 UTC
Yup. Probably best to file a new bug report upstream and mention that it may be related to the one you've found (the issue there is subtly different by the looks of their pactl list)

The device in your cases appears to actively change type and with it the availability changes to unavailable which is probably why it doesn't show up in the UI.
Comment 23 Iyán M. V. 2024-08-29 10:16:48 UTC
Hey Christian! Thanks for creating the issue in the pipewire repo.