Pavucontrol shows Line-out as unplugged when Headphones are plugged in

audiofedorapulse-audio

I have my speakers plugged in to the Line Out jack. When I plug my headphones into the front headphone jack, the speakers are muted and sound is played in my headphones, as expected. However, when I open up pavucontrol and manually select to send sound to Line Out (which is listed as unplugged) it mutes the headphones (as expected) but does NOT play audio out the speakers.

I've tried many different permutations of pactl and pacmd, with set-sink-port and other commands, and every time, either nothing changes, or both the speakers and headphones are silent, as they are when I try to do it with pavucontrol.

TL;DR; I want to be able to switch between headphones and speakers while both are plugged in, but the speakers are ALWAYS silent when my headphones are plugged in.

I'm running up-to-date Fedora 23 with the KDE 5 desktop.

Best Answer

  1. Open up alsamixer. Then press F6 to select your sound card, most likely ending with PCH.
  2. Scroll right till you find the Auto-Mute option.
  3. Press up or down arrow to disable it. Press Esc to quit alsamixer. alsamixer settings

Use the following script to automate it.

#!/bin/sh

NAME=$(basename -- "$0")

command -v amixer >/dev/null 2>&1 || { echo >&2 "amixer not installed"; exit 1; }
command -v pacmd >/dev/null 2>&1 || { echo >&2 "pacmd not installed"; exit 1; }

amixer -c1 sset "Auto-Mute Mode" Disabled > /dev/null

if [ -z $1 ]; then
  echo -e "Usage:\nFront Speakers\t: $NAME 0\t\nHeadphones\t: $NAME 1\nBoth Speakers\t: $NAME 2"
  exit 1
elif [ $1 -eq 0 ] 2> /dev/null; then
  pacmd set-sink-port 1 analog-output-lineout
  amixer -c1 set Headphone 0% > /dev/null
  amixer -c1 set Front 100% > /dev/null
elif [ $1 -eq 1 ] 2> /dev/null; then
  pacmd set-sink-port 1 analog-output-headphones
  amixer -c1 set Front 0% > /dev/null
  amixer -c1 set Headphone 100% > /dev/null
elif [ $1 -eq 2 ] 2> /dev/null; then
  pacmd set-sink-port 1 analog-output-headphones
  amixer -c1 set Front 100% > /dev/null
  amixer -c1 set Headphone 100% > /dev/null
else
  echo -e "Invalid argument"
  exit 1
fi

This assumes that the card you are using is numbered 1. Also, it assumes that your PulseAudio ports are named analog-output-lineout and analog-output-headphones. Save it as something like speakers.sh and chmod to set execute bit.

Run speakers.sh 1 for Headphones and speakers.sh 0 for Speakers.

Related Question