0

I want to be able to use my internal speaker without unplugging the jack headphone so I set the Speaker Playback Switch to on:

$ amixer -c1 cset numid=4 on
numid=4,iface=MIXER,name='Speaker Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on

and also I'm sure it's not muted:

$ amixer -c1 cset numid=3 
numid=3,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0
  : values=50,50
  | dBscale-min=-65.25dB,step=0.75dB,mute=0

But I cannot hear any sound from the speakers even when I turn the Headphone Playback Switch off via amixer -c1 cset numid=2 off(2 is my Headphone Playback Switch control).

Needless to say I'm able to use the speakers when I unplug the headphone.

I use JACK server with PulseAudio on top of it(i.e bridged) if that matters.

OS: KDE Neon 5.19 which is based on Ubuntu 18.04

Any idea?

Parsa Mousavi
  • 1,090
  • 2
  • 17
  • 30
  • Have you seen this? https://unix.stackexchange.com/questions/602613/how-to-switch-between-headphones-and-speakers-without-disconnecting/602614#602614 – BlueManCZ Aug 04 '20 at 12:16
  • @BlueManCZ No.The suggestion system sometimes doesn't show similar questions properly because the title and the body differ significantly.And yes that works for me without the need to re-plugging the headphone.But how can I achieve that with command-line?(just for curiosity). – Parsa Mousavi Aug 04 '20 at 16:51
  • It is possible. You can use pactl, as explained here: https://unix.stackexchange.com/a/459246/220439 – BlueManCZ Aug 04 '20 at 19:06
  • @BlueManCZ PA is not connected to ALSA in my system and as I mentioned it has been bridged.How can I do that with jack_control? – Parsa Mousavi Aug 04 '20 at 21:13

1 Answers1

1

In modern notebooks, the speakers are often disabled (by the hardware controller) when you plug in your headphones. This is not Linux specific, but a feature of the machine itself.
This is, for example, the case with my ThinkPad T490s.

toydarian
  • 173
  • Interesting,but why? – Parsa Mousavi Aug 04 '20 at 08:55
  • 1
    It is probably just one device that selects the output itself and the jack takes precedence. For me this is quite convenient, as I do not accidentally play music on my speakers in the office. The UX person will probably have thought, that if you have headphones plugged in, you are wearing them and thus you are not able to hear anything from the speakers in any case, so just disable them so you don't play anything by accident. But this is just a wild guess. – toydarian Aug 04 '20 at 08:59