If you have headphones actually plugged in while it says "Headphones (unplugged)", that indicates the plug detection is not working correctly. Either it's detecting your audio output as detection-capable when it actually is not, or it's failing to detect that your headphones are actually plugged in.
And why an unplugged output is disabled? That is most likely to achieve power savings on laptops. When working on battery, every bit of power counts. And it does no harm on desktops either, assuming that the plugged/unplugged information is correct, which is not true in your case.
The plug detection works using a firmware table that describes which input plug detection pins of the audio chip are associated with which physical connectors. Unfortunately, vendors sometimes have discrepancies between the firmware table and actual hardware wiring, which are then corrected in the released Windows drivers. Linux users will then need to determine the hardware-model-specific wiring errors and report it to the driver developers, so that the audio driver can apply a model-specific quirk to the information read from the firmware table.
While waiting for the driver quirk to be added to your distribution's kernel, there might be module options that can achieve the same effect if the wiring error is similar to another already existing case. Please specify your hardware model as accurately as possible, so we might be able to identify if this is a known issue with a module option workaround already available.
The HD-Audio audio chip may also have an auto-mute feature that will optionally mute the speaker/line outputs when it detects that headphones are plugged in. You can usually access the feature by using alsamixer -c 0
(you may need the -c 0
option to explicitly specify that you want the mixer of the actual audio chip and not the PulseAudio layer on top of it). If there is a toggleable setting labeled "Auto-Mute Mode", that's it. In Debian 10 it seems to be usually disabled by default, but you might want to check it.
If your chassis has an older AC-97 style audio output, that may have the mute-other-outputs-when-headphones-connected function implemented in hardware, in which case it cannot be easily disabled.
Debian's alsa-tools-gui
package includes a hdajackretask
tool that can be used to (among other things) manipulate the plug detection information. If you find the settings that make your plug detection work correctly (or just disables the non-working plug detection, if that's the best you can do) in your hardware, please report the fix and your system/motherboard model to the Linux audio developers so that your system's model-specific quirk can be added to the drivers and automatically compensated for.
There is one more thing with the headphone output: back when this was discussed in the alsa-developers mailing list, it was decided that requiring headphone users to go into the mixer settings and adjust the headphone output to a suitable volume and save the settings would be less bad that potentially sending out audio over the headphones at full, potentially hearing-damanging volume by default.