You are not logged in.

#1 2015-07-23 11:38:43

budkin
Member
Registered: 2015-01-24
Posts: 15

[SOLVED] Pulseaudio default output

Is there a way to set the default Pulseaudio output to headphones instead of speakers, even if they are not present? Whenever I log in I have to launch pavucontrol and switch this setting
ka8LN5C.png

Last edited by budkin (2015-07-25 03:08:56)

Offline

#2 2015-07-24 14:11:39

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [SOLVED] Pulseaudio default output

Are you trying to have sound always pointing to an unplugged device or are you having problems where it does not switch to Headphones when you plug them in ?

Offline

#3 2015-07-24 14:13:21

budkin
Member
Registered: 2015-01-24
Posts: 15

Re: [SOLVED] Pulseaudio default output

the former

Offline

#4 2015-07-24 14:31:20

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [SOLVED] Pulseaudio default output

to see what output you can set as default

 pacmd list-source-outputs | grep source

example command to set new default

pacmd set-default-sink alsa_output.Headphones

Offline

#5 2015-07-24 14:47:20

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [SOLVED] Pulseaudio default output

Keep in mind that pulse uses a Fallback feature to switch new streams to available outputs

You could disable it using the following, but i've never tried this

in your default.pa

load-module module-stream-restore restore_device=false

Last edited by Malkymder (2015-07-24 14:48:19)

Offline

#6 2015-07-24 15:04:27

budkin
Member
Registered: 2015-01-24
Posts: 15

Re: [SOLVED] Pulseaudio default output

pacmd list-source-outputs | grep source

only displays one source and it's neither headphones nor speakers

1 source output(s) available.
	source: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
		module-stream-restore.id = "source-output-by-application-name:ALSA plug-in [SoundWireServer]"

I played with pacmd a little and found this command

pacmd set-sink-port alsa_output.pci-0000_00_1b.0.analog-stereo analog-output-headphones

adding it to .xinitrc did not help, I assume pulseaudio starts after it. I've also tried to add it in the Application autostart in Xfce. Any ideas?

load-module module-stream-restore restore_device=false

this doesn't help either

Offline

#7 2015-07-24 17:41:52

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [SOLVED] Pulseaudio default output

This goes in either your '.config/pulse/default.pa' or your '/etc/pulse/default.pa'

load-module module-stream-restore restore_device=false

The pacmd can be called in a autostart script ....

Personally i would just plug in headphones ... set it to default for my apps and mute the speakers output... whenever headphones are plugged back in, it should switch to them by default.

Then again i'm not entirely sure i understand why you need it that way smile

Offline

#8 2015-07-24 19:37:12

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

Re: [SOLVED] Pulseaudio default output

module-stream restore won't help in this case, the device is correct the port isn't, which isn't covered in this case.

what you can do is add the set-sink command (without the pacmd) at the end of your /etc/default.pa (or ~/.config/default.pa) which should work

Last edited by V1del (2015-07-24 19:37:34)

Offline

#9 2015-07-25 03:07:45

budkin
Member
Registered: 2015-01-24
Posts: 15

Re: [SOLVED] Pulseaudio default output

Thank you, adding the line to default.pa solved it

Malkymder wrote:

This goes in either your '.config/pulse/default.pa' or your '/etc/pulse/default.pa'

load-module module-stream-restore restore_device=false

The pacmd can be called in a autostart script ....

Personally i would just plug in headphones ... set it to default for my apps and mute the speakers output... whenever headphones are plugged back in, it should switch to them by default.

Then again i'm not entirely sure i understand why you need it that way smile

The reason I don't do this is because I don't plug in my headphones. I use this program called SoundWire which transfers sound from my laptop to my android phone (my headphones input jack is not working)

Offline

#10 2015-07-25 05:59:50

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [SOLVED] Pulseaudio default output

Ah!! ... makes more sense now ...

Thanks for the info smile

Offline

Board footer

Powered by FluxBB