9

Similarly to Headphone jack not working?, I have a Dell XPS 13 and since I upgraded to Ubuntu 16.04, my headphones jack is not working anymore, while internal speakers work fine. when I plug in headphones I do not see any window that asks me whether it's microphone or headset like it used to.

I tried every solution on the mentioned link and none worked (even after reboot or sudo alsa force-reload): - modifying analog-output-headphones.conf in /usr/share/pulseaudio/alsa-mixer/paths/ - modifying /etc/modprobe.d/alsa-base.conf

I tried updating linux kernel to 4.6 but it didn't work as well.

It seems I'm not the only one who face this as I saw in comments on the mentioned link + Headphones is not working in 15.04 Dell XPS 13

  • // , Did you ever end up filing a bug report at bugs.launchpad.net/ubuntu – Nathan Basanese Mar 16 '18 at 20:39
  • very late to answer that, but good point Nathan, I don't have a dell xps 13 anymore (sic :( super sad) but if anyone faces it again, go ahead! – Jeremie Jul 2 '18 at 19:29
7

First I reinstalled everything from scratch nicely by following Ubuntu sound troubleshooting step 1: https://help.ubuntu.com/community/SoundTroubleshootingProcedure and ran:

sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop  linux-image-`uname -r` libasound2; sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop  linux-image-`uname -r` libasound2; killall pulseaudio; rm -r ~/.pulse*; ubuntu-support-status; sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`

then I managed to turn the volume on in the headphones with solution from Headphones is not working in 15.04 Dell XPS 13 answer:

after every boot and perhaps every suspend, I have to open the terminal and run alsamixer, which is a CLI app for volume adjustments. Use the arrow keys to select the "Headphone" column. Press "M" to unmute it, if it says "M" at the bottom. Press the up arrow to turn the volume all the way up in the headphone column. Then use the arrow keys to move to the "Speaker" column. You probably want to turn it all the way down unless you want sound to come out of the speakers and the headphone jack.

[UPDATE] I found a one command line to do that you can execute whenever I plug in my headphones:

amixer -c 1 set Headphone on;amixer -c 1 set Headphone 100%

so to get get to that, I had

to find the right card to use:

amixer controls

to use first card and see which controls are available on that card

amixer -c 1

to turn it on

amixer -c 1 set Headphone on

to set volume

amixer -c 1 set Headphone 100%
  • The final question is where the amixer command can be put so it re-triggers every time the volume settings get corrupted again. – Mark Stosberg Jul 19 '16 at 11:52
  • 2
    I'm having the same issue and my question is, why do I need this at all? :) – Evert Nov 3 '16 at 2:45
  • My first reaction would be to answer "to solve this issue that was really bothering me" but it might sound a bit aggressive :). If you found something simpler, please answer! – Jeremie Nov 7 '16 at 15:34
  • 1
    @Jeremie I guess Evert was asking a rhetorical question, or one addressed at the Dell/Ubuntu developers, about why we need these kind of 'hacks' to get basic things working, and I fully agree. Anyway, your solution worked for my XPS 13 9350 DevEd. It came with 14.04 preinstalled (for which the headphone was working correctly), but after doing a dist upgrade to 16.04 it was no longer working. – Bas Swinckels Dec 9 '16 at 18:03
3

After trying various different solutions on my Dell XPS 15 headphones still weren't detected, only got to use analog internal speakers (which weren't functioning before too).

I then tried the amixer commands from @Jeremy's answer, but nothing happened and right after I executed the following from a Launchpad's user suggestion:

rm -r ~/.config/pulse/
pulseaudio -k && sudo alsa force-reload
sudo reboot

I let the headphones connected to the jackport all the time while executing the commands and while laptop was rebooting.

After the reboot headphones were reproducing sound though they are still not listed in the output devices, only internal analog speakers are listed, but the sound actually comes through the headphones. I haven't plugged off my headphones nor restarted the system ever since.

Credit goes to user Camilo Prieto on this Launchpad bug comment.

3

I went to pulse audio volume control, input devices, and UNMUTED the INTERNAL MIC and my headphones worked again.

2016 XPS 13 Ubuntu 18.04

  • 2
    This worked for me too. In fact, I immediately muted the internal mic again afterwards but the headphones kept working. – Rien Heuver Dec 3 '18 at 14:32
  • ditto & weird -- dell issue or pulse issue i wonder? – nd34567s32e Dec 4 '18 at 16:11
  • 1
    This should be the accepted answer, atleast on 18.04. Worked for me as well. Very weird issue though – muyiscoi Dec 18 '18 at 19:02
0

I have a new Dell XPS 13 9360 running Ubuntu 16.04 and the way I fixed this problem is to set the second Headphone setting in alsamixer to 22 (there are only a few levels you can set it to).

0

I also have this problem with my slightly newer XPS 13 (9370), though in my case the issue is related to switching between laptop speakers and headphone output. For some reason the amplifier for the headphones doesn't always get turned on when a jack is connected. To fix this I have to forcibly enable the amplifier.

To figure out what to do I compared the output of cat /proc/asound/card0/codec#0 when it was working vs non-working, and noticed a difference in the Stereo Amp-Out / HP Out at Ext Right section:

Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
 Control: name="Headphone Playback Switch", index=0, device=0
   ControlAmp: chs=3, dir=Out, idx=0, ofs=0
 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
 Amp-Out vals:  [0x00 0x00]
 Pincap 0x0001001c: OUT HP EAPD Detect
 EAPD 0x2: EAPD
 Pin Default 0x04211020: [Jack] HP Out at Ext Right
   Conn = 1/8, Color = Black
   DefAssociation = 0x2, Sequence = 0x0
 Pin-ctls: 0xc0: OUT HP

The last value, Pin-ctls, is 0xc0 when the headphone jack is working, and 0x00 when it's not. So, when the output isn't working, I flip that bit:

sudo hda-verb /dev/snd/hwC0D0 0x21 SET_PIN_WIDGET_CONTROL 0xc0

The values may be different depending on the exact sound card, but this method may work for other people.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.