1

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.

  • It depends on your front-panel. I think it is impossible with older AC'97-front-panels, it is a question of the electronic circuit. With newer IntelHD Audio-front-panel it should be possible, but I've only old AC'97-front-panel, so I can not test anything. Also one difference between the two standards is that with an IntelHD Audio-front-panel we can retask the Jacks (we can choose if we want that jack used as input or output), this is not possible with old AC'97-front-panels. – mook765 Oct 22 '17 at 14:17
  • @mook765 I don't know what AC' 97 front panel is. I am not very good with tech. All I know is that it worked fine in windows 10 and linux mint 18.2 – Vasilis Kalfas Oct 22 '17 at 16:48
0

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

  1. Speaker_on.sh

    amixer set "Headphone" playback 0% unmute
    amixer set Master playback 80% unmute
    amixer set "Speaker" playback 100% unmute
    
  2. Headphone_on.sh

    amixer set "Speaker" playback 0% mute
    amixer set Master playback 80% unmute
    amixer set "Headphone" playback 100% unmute
    
  • You can make a short script to increase and decrease volume using amixer set Master playback 80% unmute and assign it to keyboard short-cuts for ease. Also, Speaker_on.sh and Headphone_on.sh can be assigned to keyboard shortcuts. – Legolas Oct 22 '17 at 13:31
0

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:
Run 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

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.