I have front and back audio output jacks on my pc. When I plug in my headset to the front jack, audio output line disappears from sound settings and it shows only headphones. I want to switch between headphones and speakers without unplugging the headset all the time. Please help me I am new with linux.
Make 2 scripts, like below, and run them to switch between headphone and speaker. Also, it would fail if you use gnome-volume controls to modify volume. This thing works purely from command line. You can change volume by fidgeting with percentage value in
amixer set Master playback 80% unmute
amixer set "Headphone" playback 0% unmute amixer set Master playback 80% unmute amixer set "Speaker" playback 100% unmute
amixer set "Speaker" playback 0% mute amixer set Master playback 80% unmute amixer set "Headphone" playback 100% unmute
If you only want one audio output for playback
go to Pulseaudio Volume Control, Playback tab.
A drop-down menu will display choices for switching audio output
If your sound device will support having both audio outputs:
alsamixer in terminal and find playback settings (F3) for correct sound card (F6)
Use left and right arrow keys to find "auto-mute" option
Up and down arrow keys change setting between disabled and enabled