You are not logged in.
This works fine with just ALSA, but after installing PulseAudio I have this issue.
I start with headphones plugged in. In pavucontrol->"Output Devices"->"Built-in Audio Analog Stereo" the port is "Headphones (plugged in)", and in the drop down the other option is "Speakers (unavailable)". When I unplug my headphones the port switches to "Speakers". But no audio comes from the speakers. If I manually change the port to "Headphones (unplugged)" from the drop down menu the audio comes out from my internal speakers. Afterwards, plugging in my headphones plays sound from my headphones and we're back to the start.
Without PulseAudio, in alsamixer, I would see this work as expected, where unplugging headphones would automatically let sound play from the speakers. Any ideas? Laptop is an HP Envy 4 Ultrabook.
Offline
I do not use `pavucontrol` but I have edited `/etc/pulse/default.pa` and added these two lines in the end:
#In order to auto-connect a2dp for some devices
load-module module-switch-on-connect
Also I use GDM and to ake sure that it won't catch pulseaudio sink on the system start I added these lines to `/var/lib/gdm/.config/pulse/client.conf ` file:
autospawn = no
daemon-binary = /bin/true
and also make sure that this file has proper permissions
-rw-r--r-- 1 gdm gdm 41 Oct 3 13:28 /var/lib/gdm/.config/pulse/client.conf
With this setup Pulseaudio will auto switch when you connect speakers (no matter if they are bluetooth speakers or wired ones) and switch back when you disconnect them.
Last edited by Inixi (2016-10-21 08:24:55)
2020 ASUS Zephyrus G14
Offline
Disable/comment module-switch-on-port-available in your /etc/pulse/default.pa If any playback is restricted to the headphone port regardless, you might want to add at the end of that same file
set-sink-port $sinkname $portname #Use pacmd list-sinks to find the correct identifiers to fill in here
@Inixi Not quite, module-switch-on-connect only reacts to sources that make a new sink appear/disappear (bluetooth or usb soundcards most of the time), however in this case we are still on the same sink, simply the port switches, therefore this line will not help in this case.
Offline