[RESPONDED] Have to switch audio to HDMI manually *before* plugging in cable?

This seems weird to me, but:

  • Plugging in an HDMI cable makes audio output switch to HDMI as expected
  • Receiving device detects no audio

If instead I:

  • Switch to HDMI output (pavucontrol > Configuration > ‘Digital Surround 7.1 (HDMI) Output (unplugged) (unavailable)’) first manually
  • Then plug in the cable
  • Receiving device detects audio as expected

Also, the receiving device must be turned on already when the cable is plugged in.

I’m using pipewire, and pipewire-pulse. I’ve reproduced this with two different AVRs - neither detects any audio stream if it’s not switched first, it’s like it’s detecting the presence of HDMI and switching on that basis, but not actually doing any negotiation? Still surprising then that it somehow does if it’s already active though.

Anyone else noticed this, and have a fix or better workaround?

1 Like

Didn’t catch which distro this was. Anything interesting in dmesg or journalctl?

Also, have you tested this with a Live USB of your distro to see if the issue happens there as well (Fedora or Ubuntu for example)?

Well that was out of character of me wasn’t it - it’s Arch, btw. :sweat_smile:

Nothing really in dmesg, just logs of the connection like:

[322616.442059] Registered IR keymap rc-cec
[322616.442140] rc rc0: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc0
[322616.442211] input: DP-2 as /devices/pci0000:00/0000:00:02.0/rc/rc0/input44

In journalctl, pipewire gives me two of:

pw.link: 0x560debcf97d0: port 0x560dec154160 can't set io:1 (Spa:Enum:IO:Buffers): Invalid argument

when I do switch it manually first (and it works) - that doesn’t appear when I don’t and the audio doesn’t work. when I connect the cable regardless of whether I switch first or not.

When it wasn’t working, and I seeked the video back, I got:

driver 0x560deb6290a8: timerfd error: Resource temporarily unavailable

which I haven’t seen when it is working (having manually switched).

I also at some point gotget a lot of:

pw.core: 0x560deb5ce0d0: error -2 for resource 3: port_set_io failed: No such file or directory
mod.client-node: 0x560deb857910: error seq:495 -2 (port_set_io failed: No such file or directory)

but I think that occurred on disconnecting the cable.

I will test some more and see what’s consistent. Thanks for the reply.

(Did some more testing now after all - there’s nothing really that seems related to plugging it in without switching, no errors as it tries to play but there’s no audio.)

I did do a bit more digging on this, seems to be an ongoing issue some Arch installs. Using stuff like module-switch-on-connect and so forth hasn’t helped most folks I’ve seen.

Ideally, it should bow to the fallback preference set in Pavucontrol. I’ve even seen Arch users creating scripts with mixed results. Short of this, you could try another kernel (as it has its own bits to pull from), but it may not be worth it.