You are not logged in.

#1 2015-10-11 19:55:50

Utini
Member
Registered: 2015-09-28
Posts: 219
Website

Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

Hey there,

is there a way to automatically switch the audio output to/over HDMI when connected? I couldn't find anything with google. Doing the manual way isn't much of a deal but having an automatic way would be more comfortable wink

If there is no option for that, a simply script should do it?


www.whymacsucks.com - Just the truth about why Mac sucks !

Setup: Dell XPS15 9530, 15.6" QHD Touchscreen - i7-4702HQ 2.2-3.2Ghz - 16GB RAM - NVIDIA GT 750M 2GB - Samsung SSD SM841 512GB
Accessories: Filco Majestouch Tenkeyless MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD600 + Audio-GD NFB-12.1

Offline

#2 2015-10-11 21:25:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,677

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

Add

load-module module-switch-on-connect

before the if... udev-detect - block in your /etc/pulse/default.pa

Last edited by V1del (2015-10-12 11:36:37)

Offline

#3 2015-10-12 07:14:10

Utini
Member
Registered: 2015-09-28
Posts: 219
Website

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

V1del wrote:

Add

load-module module-switch-on-connect

before the if... udev-detect - block in your /etc/default.pa

Mhh that file is empty, according to the wiki to load modules per user/system wide I just have to enter that line into the file. I did it in

~/.config/pulse/default.pa:

load-module module-switch-on-connect

Thanks for helping !


www.whymacsucks.com - Just the truth about why Mac sucks !

Setup: Dell XPS15 9530, 15.6" QHD Touchscreen - i7-4702HQ 2.2-3.2Ghz - 16GB RAM - NVIDIA GT 750M 2GB - Samsung SSD SM841 512GB
Accessories: Filco Majestouch Tenkeyless MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD600 + Audio-GD NFB-12.1

Offline

#4 2015-10-12 11:36:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,677

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

/etc/pulse/default.pa my bad, and it is pretty important that it is at the position I've mentioned otherwise it won't work

Offline

#5 2015-10-12 12:37:03

Utini
Member
Registered: 2015-09-28
Posts: 219
Website

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

V1del wrote:

/etc/pulse/default.pa my bad, and it is pretty important that it is at the position I've mentioned otherwise it won't work

Oh okay thanks again. The wiki said it is recommended to loda modules in the user-specific config file and not system wide.


www.whymacsucks.com - Just the truth about why Mac sucks !

Setup: Dell XPS15 9530, 15.6" QHD Touchscreen - i7-4702HQ 2.2-3.2Ghz - 16GB RAM - NVIDIA GT 750M 2GB - Samsung SSD SM841 512GB
Accessories: Filco Majestouch Tenkeyless MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD600 + Audio-GD NFB-12.1

Offline

#6 2015-10-12 13:20:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,677

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

You can do that if you want, but be sure to copy the whole file from the system and not just create a new file with just that in there, iirc pulseaudio simply doesn't look into the system wide file if it finds one in the home dir. Which would lead to it not starting.

If you are the only user of the system it doesn't matter anyway. Do the config wherever

Last edited by V1del (2015-10-12 13:20:30)

Offline

#7 2018-06-14 06:31:31

wolvieh
Member
From: Austria
Registered: 2008-04-01
Posts: 42

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

Whats the current way to do this? I don't have an /etc/default.pa

Is there an article in the wiki about this topic?

Offline

#8 2018-06-14 07:37:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,677

Re: Pulseaudio/Pavucontrol automatic switch to HDMI audio when connected?

As mentioned three times over the course of this thread, the correct place is /etc/pulse/default.pa and this method and option haven't changed. However depending on your setup the solution might not be applicable (it won't work if your HDMI is not a dedicated card)

However if you still want help with this you are advised to open up your own thread about it, include the output of

pacmd list-cards
pacmd list-sinks
pulseaudio --dump-conf

Don't necrobump: https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB