You are not logged in.

#1 2017-07-02 06:12:24

Liam1895
Member
Registered: 2011-01-15
Posts: 15

SOLVED PulseAudio Question - How to switch sound output automatically?

Hey,

I am just trying to figure out how I can have pulseaudio switch the sound output from my laptop speakers automatically so that once I plug in a HDMI into my laptop it will automatically switch to HDMI analog output instead of me needing to go into pulseaudio settings to do it?

E.G When I play a video on my laptop with HDMI cable in the input I need to manually go into the settings and change to the HDMI sound output device to hear sound via HDMI speakers.

I have tried the udev script that is supplied in the arch wiki but cant seem to get it work, I also searched the forums but to no luck found a answer.

I'm only new to linux so dont have much clue what im doing with this problem.

Cheers!

Last edited by Liam1895 (2017-07-10 10:33:32)

Offline

#2 2017-07-02 13:26:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: SOLVED PulseAudio Question - How to switch sound output automatically?

If your hardware is well behaved it should be sufficient to add

load-module module-switch-on-connect

before the if...udev-detect block in your /etc/pulse/default.pa If after a restart (

systemctl --user restart pulseaudio

) that isn't sufficient, post the udev rule you created as well as

pacmd list-cards
pacmd list-sinks

Offline

#3 2017-07-05 09:04:05

Liam1895
Member
Registered: 2011-01-15
Posts: 15

Re: SOLVED PulseAudio Question - How to switch sound output automatically?

Cheers V1del for the help, it worked great.

Thanks!

Offline

#4 2017-07-05 09:19:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: SOLVED PulseAudio Question - How to switch sound output automatically?

Cool, please mark the thread as [SOLVED] by editing the title of your initial post.

Offline

Board footer

Powered by FluxBB