audio output via DP/hdmi over jack only after restarting xserver?

"Peter P." <peterparker-97jfqw80gc5Wk0Htik3J/[email protected]> Wed, 27 May 2026 00:29:47 +0200
Newsgroups gmane.linux.audio.users
Message-ID <bf5eclwvbiav5unv46ofssvfjhwzdjucpbqxxjiv76lslhf6qq@r7nk57ucrkie>
Hi list,

I sometimes connect a miniDisplayPort to HDMI adaptor with an X230
thinkpad. In order to output audio via this connection using jack I have
to restart my Xserver (means: logging out and back into X). 

Here is how I am trying to debug this, first listing the respective
output (card 0, device 0):
$ aplay -l 
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]

I can start jackd with this output, its options being
$ jackd -v -t2000 -dalsa -dhw:0 -r48000 -p512 -n3 -Xseq -D -Phw:PCH,3 -i2 -o2
although there is no monitor connected to this output.

$ cat /proc/asound/card0/pcm3p/sub0/status 
shows the device as running after jackd start.

Next step: Connecting an external HDMI monitor via a miniDisplayPort adapter to the
laptop, this makes xrandr show that HDMI1 is connected.

Enabling the monitor output via xrandr will make aplay -l lists the
monitor model as well:
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [DELL U2410]

Playing back audio will not output sound.
If I exit my Xsession and log back in, while jackd keeps running, audio
output suddenly works, and I have no idea why.

I often have to switch back and forth between HDMI audio and other
outputs but having to log out and back into X is quite cumbersome.

If anyone has any ideas how I can got about debugging/fixing this
further, I'd be glad to hear!

best, Peter