Usually I use my headphone to listen a music (using the front port one). Sometimes, I plugged out the headphone jack, if I want to listen by speaker (using the back port). Now my question is, can I change the output without unplugging my headphone jack.
You can run alsamixer within a terminal :
You will see various faders (master, pcm ...) or switchs .
Navigate with left/right arrows to a switch called automute ,
change its value from "enable" to "disable" with up or down arrow :
Speaker should stay "on" with headphone connected.
Instead using Alsamixer, you can install the graphical mixer gnome-alsamixer which as the same controls.