Hi
The commands below that have "hda" in them come from alsa-utils for debian based distros.....YMMV
THIS IS A POSSIBLE FIX FOR A SPECIFIC make and model and only the headphone wrong pin. Do not follow this guide for your device unless you have an EXACT MATCH.
YOU HAVE BEEN WARNED.
after running
Code:
sudo su
(input local user password ( a member of sudoers)
hdajacksensetest
without headphone lead....and wants analog headphone sound
then repeating root powered hdajacksensetest with headphones inserted we have the following results
no headphone
Pin 0x18 (Pink Mic, Rear side): present = No
headphone inserted
Pin 0x18 (Pink Mic, Rear side): present = Yes
I do NOT have same hardware so modified my screenshot to suit.
Note the steps as per the image.
https://imgur.com/QX3SIVk
steps run as a local user
step 1 pulldown and change HDMI to ALC298
step 2 Tick the box for Advanced override. This has more options.
If you are altering an output to output, you may be able to avoid this box
but we are altering an input to output pin.
step 3 Next go to the wrong pin ID=0x18
You will notice it claims to be an input device.
step 4 pulldown the Device and choose Headphone
OPTIONAL change the color from pink to green. This optional step only affects results for root powered command hdajacksensetest
step 5 Click on Apply Now.
A popup will ask you to enter the root password (Not the sudo password)
##############
You must test sound now. Do not skip ahead!
If and only if you hear sound through the headphones....we go to the next step
We need this new setup to persist over reboot so
step 6 Click on Install boot override
A popup will ask you to enter the root password (Not the sudo password)
If you get an error and can not proceed past step 5 after entering the root password,
you may have a distro where pulseaudio (PA) is interfering so follow step as below
Note you can also use text editors but this attempts to automate the steps
open a terminal as a local user (not root)
copy and paste code box into the terminal
Code:
DIR=.config/pulse
# config to no autospawn (re-spawn)
A=client.conf
[ -f $DIR/$A ] || cp /etc/pulse/$A $DIR
sed 's|; autospawn = yes|autospawn = no|' -i $DIR/$A
# config to daemonize so when we stop PA its truly stopped
B=daemon.conf
[ -f $DIR/$B ] || cp /etc/pulse/$B $DIR
sed 's|; daemonize = no|daemonize = yes|' -i $DIR/$B
# now stop pulseaudio
pulseaudio --kill
If you use htop in the terminal and press F3 and start typing
pulseaudio....it should show up in red letters because its not found!
image shows pul is being typed and in red...therefore pulseaudio is not running
https://imgur.com/tYIYl3B
then go back to original steps to see if you can progress past step 5
#########################
Once your pins are working, for those who use firefox....you need pulseaudio running if you want to hear audio
in youtube and such....
restarting your PC should start PA because I have made no attempt to stop systemd service but I use a non-systemd distro can not test fully....try this first though.
As a local user in the terminal
If you are having problems with PA....redo the command as
pulseaudio -vvv and do research on it please.
Only users with the above hardware....and having troubles killing PA can post to this thread please