I run Fedora and KDE. Tags: #linux #audio #pulseaudio #alsamixer.
If I reboot with the headphones plugged in, they are not detected. Fix:
https://superuser.com/questions/1047666/headphone-jack-stops-working-after-suspend-reboot
I couldn't figure out how to easily switch between speakers and headphones. I have the speakers plugged in to the rear IO panel, my headphones are in the front jack. I want a simple way to switch them, but the default behavior is to mute the line out if the headphone jack is plugged.
Finally settled on scripts to switch them:
$ cat headphones
#!/bin/bash
amixer set 'Auto-Mute Mode' Enabled > /dev/null
pacmd set-sink-port alsa_output.pci-0000_0d_00.4.analog-stereo analog-output-headphones
$ cat speakers
#!/bin/bash
pacmd set-sink-port alsa_output.pci-0000_0d_00.4.analog-stereo analog-output-lineout
sleep 0.1
amixer set 'Auto-Mute Mode' Disabled > /dev/null
The sleep 0.1 is to give the lineout change time to settle before disabling auto-mute,
otherwise the speakers kick in at headphone volume for a moment.
(You can find your sinks with pactl list short sinks.)