You are not logged in.
Hi there,
I've been fighting with a friend's laptop that is sometimes connected to a Samsung TV over HDMI. Whenever he plugs it in, he wants all audio streams to switch over to the HDMI sound device, and then switch back automatically to the laptop's integrated Intel sound device upon disconnecting the HDMI. But I can't get it to work. Instead I have to manually switch the Pulseaudio output device every time I connect the TV, and upon disconnecting it there is no audio device selected and I have to re-select the Intel integrated.
I also tried this suggestion...
https://bbs.archlinux.org/viewtopic.php?id=203694
Add
load-module module-switch-on-connectbefore the if... udev-detect - block in your /etc/pulse/default.pa
... but it also doesn't help. Any idea what I'm doing wrong? Thanks!
Last edited by sb56637 (2015-11-03 23:39:58)
Offline
Have you set the fallback device explicitly to your internal card? Check in pavucontrol to confirm, can you post the current default.pa that is used as well as the outputs of
pacmd list-cards
pacmd list-sinksafter/before plugin/replug of your HDMI?
In general you should also make sure that module-rescue-streams is loaded as well, this should, however already be part of the standard default.pa
There also might be a possibility that plugging in your HDMI doesn't trigger the correct events for detection.
Offline
Thanks V1del for the reply.
Yes, the internal Intel audio was set as the fallback device in Pavucontrol.
default.pa:
https://pastebin.mozilla.org/8851243
pacmd list-cards, unplugged, after a few plug/unplug cycles:
https://pastebin.mozilla.org/8851244
pacmd list-sinks, unplugged, after a few plug/unplug cycles:
https://pastebin.mozilla.org/8851245
(I don't have access to the HDMI TV at the moment, but I'll update this later with plugged output.)
Last edited by sb56637 (2015-11-04 02:57:42)
Offline
Hello sb56637 and V1del,
I think these commands might help, judging from the logs it looks like you have card 0 as your main audio source, and card 1 as the HDMI TV.
I found that 'pacmd set-default-sink 1' without the quotes sets sound to the HDMI TV; while 'pacmd set-default-sink 0' without the quotes sets the sound to your main audio source.
If you ever need to toggle the sound when watching a movie to the TV, then back to the computer after finished; I was able to come up with this about a week ago: https://bbs.archlinux.org/viewtopic.php?id=204153
Hope this helps,
HaloSlayer255
Offline
Hi HaloSlayer255, thanks for the tip. I tried a similar toggle switch according to these instructions:
http://jeffhoogland.blogspot.com/2014/0 … o-out.html
The "hdmi_sound_toggle" script did work correctly when I manually ran it, but I couldn't get the udev rule to switch it automatically on the cable plug/unplug event.
Last edited by sb56637 (2015-11-04 20:05:25)
Offline
Thanks V1del for the reply.
Yes, the internal Intel audio was set as the fallback device in Pavucontrol.
default.pa:
https://pastebin.mozilla.org/8851243pacmd list-cards, unplugged, after a few plug/unplug cycles:
https://pastebin.mozilla.org/8851244pacmd list-sinks, unplugged, after a few plug/unplug cycles:
https://pastebin.mozilla.org/8851245(I don't have access to the HDMI TV at the moment, but I'll update this later with plugged output.)
And here the HDMI TV is connected:
pacmd list-cards
https://pastebin.mozilla.org/8851327
pacmd list-sinks
https://pastebin.mozilla.org/8851328
Offline