My audio jack is damaged, since it is damaged it always show the headphone is up, even if there is headphone, Is there anyway to disable audio jack detection, I only need in-built speaker and Bluetooth headphone, I want to disable the audio jack, I am using Debian based Linux
You might want to disable the "auto-mute mode" in the ALSA sound driver instead; that way, the state of the headphone jack would have no effect to the speaker use.
First, you'll need to identify the (current) index number of your built-in sound chip: run "amixer info -c 0" to identify the first sound card/chip, then increment the number to see any other sound devices. Once you know the number of your system's built-in sound chip, run
amixer -c <N> sset 'Auto-Mute Mode' Disabled, replacing
<N> with the correct number. After this, if your internal speaker is currently muted, you should be able to un-mute it using a regular audio mixer tool even if the audio jack currently detects a plug. This would allow you to still easily use the headphone jack later by just adjusting the mixer settings if the need arises.
sudo alsactl store to make the new settings (disabling of auto-mute and unmuting of the speaker) persistent.
Or you might use the
hdajackretask tool in the
alsa-tools package to set the headphone jack to "Not Connected" and click on
Install Boot Override to make it persistent. This would completely disable the headphone jack.