No sound output from headphone jack Ubuntu12.04

26,063

Solution 1

Unable to add comments; so here is an "answer" that is partially a question (I'll might delete it):

On my install I sometimes have an issue with this and to resolve it I go into sound settings and select "Output volume" to OFF then ON and sound gets OK.


Edit:

Have you tried

sudo apt-get install pavucontrol

Run pavucontrol and check settings. I.e. output device Headphones and ensure not muted.


Edit:

Have you disabled autospawn? If not pulseuadio might still be running (but got re-started). To check if PulseAudio daemon is running do i.e.:

pulseaudio --check && echo RUNNIG || echo DOWN

If it is running and everything is OK you should check system log files to see if there is something hinting about faults. As a hack, if restart of daemon is all that is needed, you could add pulseaudio -k to startup to re-start daemon.

If it is running and you want to disable it you'll have to turn autospawn off.

See Disabling PulseAudio

If it is not running you'll might get some useful information using debug.

This would also be useful if you add these settings temporarily to configuration.

Start pulseaudio with

pulseaudio --start --log-level=4 --log-target=file:pulse.log
# Level 4 is debug 

Then start some tune and:

tail -f pulse.log

Unplug jack. Take note of last log entry; should end in something like:

D  [alsa-sink] sink.c: Volume change to 52057 at 83909698687 was written 17 usec late

Insert jack; look for anything that can explain why there is no sound. I.e. my output (working) is:

D  [pulseaudio] module-alsa-card.c: Jack 'Front Headphone Jack' is now plugged in
D  [pulseaudio] device-port.c: Setting port analog-output-speaker to status no
D  [pulseaudio] module-switch-on-port-available.c: finding port analog-output-speaker
D  [pulseaudio] device-port.c: Setting port analog-output-headphones to status yes
D  [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D  [pulseaudio] module-switch-on-port-available.c: finding port analog-output-headphones
D  [alsa-sink] alsa-mixer.c: Activating path analog-output-headphones
D  [alsa-sink] alsa-mixer.c: Path analog-output-headphones (Headphones), direction=1, priority=90, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=31, min_dB=-93, max_dB=0
D  [alsa-sink] alsa-mixer.c: Element Master, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=yes
D  [alsa-sink] alsa-mixer.c: Element Headphone, direction=1, switch=1, volume=0, volume_limit=-1, enumeration=0, required=0, required_any=4, required_absent=0, mask=0x0, n_channels=0, override_map=yes
D  [alsa-sink] alsa-mixer.c: Element Speaker, direction=1, switch=2, volume=2, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=no
D  [alsa-sink] alsa-mixer.c: Element PCM, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes
D  [alsa-sink] alsa-mixer.c: Jack Front Headphone, alsa_name='Front Headphone Jack', detection possible
D  [alsa-sink] alsa-mixer.c: Jack Headphone, alsa_name='Headphone Jack', detection unavailable
I  [alsa-sink] alsa-sink.c: Successfully enabled deferred volume.
I  [alsa-sink] alsa-sink.c: Hardware volume ranges from -93.00 dB to 0.00 dB.
I  [alsa-sink] alsa-sink.c: Fixing base volume to 0.00 dB
I  [alsa-sink] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
I  [alsa-sink] alsa-sink.c: Using hardware mute control.
I  [pulseaudio] sink.c: Changed port of sink 0 "alsa_output.pci-0000_00_1b.0.analog-stereo" to analog-output-headphones
I  [pulseaudio] module-device-restore.c: Restoring volume for sink alsa_output.pci-0000_00_1b.0.analog-stereo.
D  [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D  [alsa-sink] alsa-sink.c: Requested volume: 0: 100% 1: 100%
D  [alsa-sink] alsa-sink.c:            in dB: 0: 0.00 dB 1: 0.00 dB
D  [alsa-sink] alsa-sink.c: Got hardware volume: 0: 100% 1: 100%
D  [alsa-sink] alsa-sink.c:               in dB: 0: 0.00 dB 1: 0.00 dB
D  [alsa-sink] alsa-sink.c: Calculated software volume: 0: 100% 1: 100% (accurate-enough=yes)
D  [alsa-sink] alsa-sink.c:                      in dB: 0: 0.00 dB 1: 0.00 dB
D  [alsa-sink] sink.c: Volume going up to 65536 at 83942385195
I  [pulseaudio] module-devic2 events suppRestoring mute state for sink alsa_output.pci-0000_00_1b.0.analog-stereo.
D  [alsa-sink] sink.c: Next volume change in 17483 usec
D  [alsa-sink] alsa-sink.c: Requested to rewind 65536 bytes.
D  [alsa-sink] alsa-sink.c: Limited to 2824 bytes.
D  [alsa-sink] alsa-sink.c: before: 706
D  [alsa-sink] alsa-sink.c: after: 706
D  [alsa-sink] alsa-sink.c: Rewound 2824 bytes.
D  [alsa-sink] sink.c: Processing rewind...
D  [alsa-sink] sink.c: latency = 1358
D  [alsa-sink] sink.c: Next volume change in 1358 usec
D  [alsa-sink] sink-input.c: Have to rewind 2824 bytes on render memblockq.
D  [alsa-sink] source.c: Processing rewind...
D  [alsa-sink] sink.c: Next volume change in 1249 usec
D  [alsa-sink] sink.c: Next volume change in 1221 usec
D  [alsa-sink] sink.c: Next volume change in 1201 usec
D  [alsa-sink] sink.c: Next volume change in 872 usec
D  [alsa-sink] sink.c: Next volume change in 842 usec
D  [alsa-sink] sink.c: Next volume change in 819 usec
D  [alsa-sink] sink.c: Next volume change in 799 usec
D  [alsa-sink] sink.c: Next volume change in 764 usec
D  [alsa-sink] sink.c: Next volume change in 744 usec
D  [alsa-sink] sink.c: Volume change to 65536 at 83942369199 was written 0 usec late

Another thing worth checking/hacking is gstreamer-properties (Alt+F2 gstreamer-properties Enter).

If you do not want pulseaudio you could try i.e. jack.

Solution 2

This happens to me occasionally, running

alsactl restore 

always fixes it (on an XPS computer)

Solution 3

I had the same problem with a dual boot (Ubuntu 16 / Windows 8.1)

This is what I have done, I hope it can help :

  • Shutdown the computer and start Windows
  • Change a bit the sound setting in Windows (volume was on 0 and I have put it higher)
  • Restart computer on Ubuntu -> sound was working in my headphones.

Solution 4

Try running pavucontrol and changing port to speakers in the Output Devices tab. That worked for me.

Solution 5

On my Dell laptop I could solve the problem by unmuting the Internal Microphone (under Input Devices). It seems like in the hardware, muting the microphone automatically mutes the headphones.

Some programs (such as Audacity) seem to mute that when they start, so I have to unmute it regularly.

Share:
26,063

Related videos on Youtube

Subcomfreak
Author by

Subcomfreak

Updated on September 18, 2022

Comments

  • Subcomfreak
    Subcomfreak over 1 year

    I have just bought a new ASUS u47vc computer. I have installed ubuntu 12.04 on it alongside windows 7 with no problems what so ever. Howevr, there is one issue that must be resolved. I can not get sound to come from the audio jack.

    The laptop's speakers work fine. It plays music and sound files fine with the internal speaks. However, when I plug in my headphones (or external speakers) the internal speakers mute (as they should) and nothing comes out of the headphones.

    Here are some outputs that might help: alsa information script: http://www.alsa-project.org/db/?f=82de5623cbdeeeae955cba02d7afe1a4b3fca965

    Hope this problem can be fixed!

    Thank you in advance!!!

    • thorstorm
      thorstorm over 11 years
      This may sound stupid, but make sure that the volume level did not change when you connect the headphones. On my system, it seems Ubuntu uses two different volume levels for internal speakers and headphone jack.
    • Subcomfreak
      Subcomfreak over 11 years
      Yes, I have tried muting and un-muting every single control.
  • Subcomfreak
    Subcomfreak over 11 years
    I tried this, and it did not work.
  • Subcomfreak
    Subcomfreak over 11 years
    nothing muted in the pavucontrol program.
  • Runium
    Runium over 11 years
    Hmmm. And everything looks OK in alsamixer? Looked at your "ALSA Information Script"-output and could not find any obvious faults ... How without pulseaudio? pulseaudio --kill (close any active apps before --kill / --start)
  • Runium
    Runium over 11 years
    And; as a note - you can use ALSA with several apps, but if you mute one - you mute all, change volume for one, you do it for all etc.
  • Subcomfreak
    Subcomfreak over 11 years
    Okay... this is really weird. So I follow the instructions for disabling pulse audio here. I even go so far as to uninstall the whole thing sudo apt-get autoremove pulseaudio. The sound from the laptop's speakers work fine. Plug in the jack... nothing again. I looked to see if pulse was running, and it wasn't. Might it be something with the detection on the jack? Is there some way to see if the jack is working properly in Ubuntu? (it does in windows)
  • Subcomfreak
    Subcomfreak over 11 years
    Now it works. I needed to re-start the computer. What an idiot I am!!!!! I must thank you very much for solving my problem. You have helped a lot!
  • Rien Heuver
    Rien Heuver over 7 years
    This worked for me (on Dell XPS 13 9350).
  • darkhipo
    darkhipo over 7 years
    How can this fix be made permanent!? Worked on Dell XPS 133 9333
  • JZL003
    JZL003 over 7 years
    I don't know, this is on an XPS 15. Usually it doesn't happen unless I'm messing with audio settings and running it once fixes it permanent (or until I mess with them again). You could just map to a keyboard shortcut or on boot
  • Ashton Baker
    Ashton Baker over 7 years
    This solved the issue on my XPS 13 9350. Seems like a common issue - I wonder what's causing it.
  • Mohammed Mounir
    Mohammed Mounir about 7 years
    Fixed for me as well on an XPS :)
  • a coder
    a coder about 6 years
    This did not work for me.