HDMI Audio "Did you try unplugging it and plugging back in?"

Problem Summary: Occasional loss of audio over HDMI that is restored only by unplugging the HDMI cable and plugging it back in. Problem can be recreated by running speaker test.

Hardware:
Framework Laptop, i7-1185G7, Mesa Intel® Xe Graphics (TGL GT2), Framework HDMI adapter

PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port

USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller (rev 01) (prog-if 30 [XHCI])

Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20) (prog-if 80)

dmesg | grep -C1 -E 'ALSA|HDA|HDMI|snd[_-]|sound|hda.codec|hda.intel'

[    0.127297] ACPI: Added _OSI(Linux-Dell-Video)
[    0.127297] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.127297] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
--
[    1.845092] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.845093] usb 3-6: Product: HDMI Expansion Card
[    1.845094] usb 3-6: Manufacturer: Framework
[    1.845095] usb 3-6: SerialNumber: 11AD1D004E6B2E0E0F1F0B00
[    1.853173] hid-generic 0003:32AC:0002.0003: hiddev96,hidraw2: USB HID v1.11 Device [Framework HDMI Expansion Card] on usb-0000:00:14.0-6/input1
[    1.881457] i915 0000:00:02.0: [drm] VT-d active for gfx access
--
[    8.483787] iTCO_wdt iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[    8.511364] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    8.511416] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    8.511682] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    8.542157] intel_tcc_cooling: Programmable TCC Offset detected
[    8.579346] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC295: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    8.579349] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    8.579350] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    8.579351] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    8.579352] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    8.579352] snd_hda_codec_realtek hdaudioC0D0:      Headset Mic=0x19
[    8.579353] snd_hda_codec_realtek hdaudioC0D0:      Headphone Mic=0x1a
[    8.579353] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12
[    8.605419] iwlwifi 0000:aa:00.0: Detected Intel(R) Wi-Fi 6 AX210 160MHz, REV=0x420
--
[    8.879762] iwlwifi 0000:aa:00.0 wlp170s0: renamed from wlan0
[    9.284946] input: HDA Intel PCH Headphone Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
[    9.285476] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
[    9.286044] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input22
[    9.286195] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input23
[    9.286325] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input24
[    9.286461] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input25
[    9.287124] input: HDA Intel PCH HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input26
[    9.288642] input: HDA Intel PCH HDMI/DP,pcm=12 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input27
[    9.288725] input: HDA Intel PCH HDMI/DP,pcm=13 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input28
[    9.288796] input: HDA Intel PCH HDMI/DP,pcm=14 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input29
[    9.288845] input: HDA Intel PCH HDMI/DP,pcm=15 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input30
[    9.289865] input: HDA Intel PCH HDMI/DP,pcm=16 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input31
[    9.290008] input: HDA Intel PCH HDMI/DP,pcm=17 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input32
[    9.309342] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.

** OS: **
Fedora Linux 36 (Workstation Edition), 64-bit, GNOME 42.4, Wayland

** Troubleshooting: **

systemctl --user status session.slice
<snippet>
├─pipewire-pulse.service
│ └─ 1976 /usr/bin/pipewire-pulse
├─pipewire.service
└─ 1666 /usr/bin/pipewire
├─wireplumber.service
│ └─ 1667 /usr/bin/wireplumber
systemctl --user status pipewire.service
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/user/pipewire.service.d
             └─00-uresourced.conf
     Active: active (running) since Mon 2022-08-22 11:40:22 EDT; 2h 15min ago
TriggeredBy: ● pipewire.socket
   Main PID: 1666 (pipewire)
      Tasks: 2 (limit: 18884)
     Memory: 18.0M
        CPU: 2.954s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─ 1666 /usr/bin/pipewire

Aug 22 11:40:22 fedora systemd[1647]: Started pipewire.service - PipeWire Multimedia Service.
systemctl --user status pipewire-pulse.service
● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; vendor preset: disabled)
     Active: active (running) since Mon 2022-08-22 11:40:25 EDT; 2h 17min ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 1976 (pipewire-pulse)
      Tasks: 2 (limit: 18884)
     Memory: 36.7M
        CPU: 4.848s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─ 1976 /usr/bin/pipewire-pulse

Aug 22 11:40:25 fedora systemd[1647]: Started pipewire-pulse.service - PipeWire PulseAudio.
Aug 22 11:40:25 fedora pipewire-pulse[1983]: 536870912
systemctl --user status wireplumber.service
● wireplumber.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-08-22 11:40:22 EDT; 2h 19min ago
   Main PID: 1667 (wireplumber)
      Tasks: 4 (limit: 18884)
     Memory: 6.0M
        CPU: 763ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
             └─ 1667 /usr/bin/wireplumber

Aug 22 11:40:22 fedora systemd[1647]: Started wireplumber.service - Multimedia Service Session Manager.
Aug 22 11:40:22 fedora wireplumber[1667]: Failed to set scheduler settings: Operation not permitted
Aug 22 11:40:22 fedora wireplumber[1667]: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
Aug 22 11:40:22 fedora wireplumber[1667]: PipeWire's libcamera SPA missing or broken. libcamera not supported.
Aug 22 11:40:22 fedora wireplumber[1667]: reserve-device plugin is not connected to D-Bus, disabling device reservation
aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pipewire
    PipeWire Sound Server
default
    Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC295 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC295 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, DENON-AVRHD
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
hdmi:CARD=PCH,DEV=4
    HDA Intel PCH, HDMI 4
    HDMI Audio Output
hdmi:CARD=PCH,DEV=5
    HDA Intel PCH, HDMI 5
    HDMI Audio Output
hdmi:CARD=PCH,DEV=6
    HDA Intel PCH, HDMI 6
    HDMI Audio Output
hdmi:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 7
    HDMI Audio Output
hdmi:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 8
    HDMI Audio Output
hdmi:CARD=PCH,DEV=9
    HDA Intel PCH, HDMI 9
    HDMI Audio Output
hdmi:CARD=PCH,DEV=10
    HDA Intel PCH, HDMI 10
    HDMI Audio Output

Note: After the following command executes, HDMI Audio no longer works.

speaker-test -Dhdmi:CARD=PCH,DEV=0 -c 2

speaker-test 1.2.7

Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy

Does it work again if you run systemctl --user restart wireplumber?

I ran the speaker test again and it did NOT break the HDMI audio this time.
Don’t know what changed, if anything.

speaker-test -Dhdmi:CARD=PCH,DEV=0 -c 2

speaker-test 1.2.7

Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 10.946702
 0 - Front Left
^C 1 - Front Right
Time per period = 1.515764

I will try restarting wireplumber as you asked and see if the audio still works.
After restarting wireplumber using systemctl --user restart wireplumber

speaker-test output the same messages, but no sound is produced.
Also, system settings Sound Output Test produces no sound, nor VLC Media Player.

systemctl --user restart wireplumber
[bebopspeaks@fedora ~]$ speaker-test -Dhdmi:CARD=PCH,DEV=0 -c 2

speaker-test 1.2.7

Playback device is hdmi:CARD=PCH,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 10.946078
 0 - Front Left
^C 1 - Front Right
Time per period = 4.552003

Restarted the computer and still no audio.
I will try unplugging and plugging back in the HDMI cable.

system setting Sound Output Test now DOES produce sound.

I really have no idea what is causing this problem.

However, I did try changing the HDMI cable, now using a different cable, audio/video is still working.

1 Like

There are different quality HDMI cables. As with any other computer cable you get the quality you select and pay for.

1 Like

What you said is true but doesn’t really contribute anything to the discussion, as I stated changing the hdmi cable made no difference.