No audio with headphones, but audio works with integrated speakers

7,490

Solution 1

My solution may seem the dumbest but it worked great for me: put your laptop in suspend closing the lid, open it up again and it's fixed.

Solution 2

HPG2t Help: Speakers don't work - check post #4:

I think I've managed to solve this problem. At least for the moment, my speakers are working. What I did was install the drivers from the realtek site. Specifically, the Unix driver on their page for High Def Audio Codecs. Here's the link:

http://218.210.127.131/downloads/dow...onn=3&DownType ID=3&GetDown=false

I downloaded the tar ball, unpacked it, and followed the instructions in the file Readme.txt. I had previously installed the packages necessary for compiling I think ("build-essential"). I rebooted once and it still didn't work but then I noticed my gnome-alsamixer was missing, so I reinstalled that, and then on reboot the speakers began to work. Hopefully, it stays that way.

Solution 3

i have a vaio. i tried this from "hdaintelsoundhowto" and it worked. this command shows model no. of the sound chip.

cat /proc/asound/card0/codec* | grep Codec

output:

Codec: Conexant CX20590

Codec: Intel CougarPoint HDMI

then i typed: sudo nano /etc/modprobe.d/alsa-base.conf

and added this to the file at end: options snd-hda-intel model=CougarPoint HDMI

then: sudo alsa force-reload

it worked.

Solution 4

This Might be a similar issue I just fixed in my laptop give it a try, here are the details of the fix:

I would say first undo all the other changes you made.

Sound not coming out of speakers, only headphones, on laptop FIXED.

The speakers on my laptop Dell Studio XPS 1640 were not working after experimenting with several modules and models, I decided to give it a try on Windows (should've try it sooner, try it first if you are doing double boot), I was expecting them to work but they did not, which meant it was a problem in the hardware not the codecs, module or model.

The codec of my sound card is using on ubuntu 11.10 is 'STAC92HD73', I added the following option to my alsa-base.conf file and rebooted.

#add this at the end of /etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=no-jd

After reboot sound is comming out from both laptop speakers and headphone jacks (at the same time, but no biggie just go to sound settings and select 'analog headphones' for output when only listening to headphones, also make sure analog speakers is selected for output after reboot), it seems the headphone jack-detection broke and that is why sound was not comming out of the speakers. Adding the no-jd (no jack detection) fixed the issue.

Hope this helps, it was driving me nuts for the last two weeks.

Solution 5

If you have an Intel audio card, as it seems,you can try this:

  • Open /etc/modprobe.d/alsa-base.conf
  • Add this line at the end options snd-hda-intel model=z71v position_fix=1
  • Restart and check if it works.

I had this issue on a Asus laptop and this solution worked fine.

Share:
7,490

Related videos on Youtube

Pedro
Author by

Pedro

Updated on September 17, 2022

Comments

  • Pedro
    Pedro over 1 year

    My speakers work correctly, but when I plug in my headphones, they don't work. I am running Ubuntu 10.04.

    My audio card is Realtek ALC259 My laptop model is a HP G62t a10em

    In another thread someone fixed a similar issue (headphones work, speakers not) folowing this:

    sudo vi /etc/modprobe.d/alsa-base.conf (or some other editor instead of Vi) Append the following at the end of the file:

    alias snd-card-0 snd-hda-intel options snd-hda-intel model=auto

    Reboot

    but it doesnt work for me.

    Before making and changes to alsa, this was the output:

    alsamixer gives me this: alsamixer output Audio card is a HDA ATI SB

    Things I did: followed this HowTo but now no hardware seems to be present (before, there were 2 items listed): sound preferences - hardware tab is empty

    Now, alsamixer gives me this:

    alsamixer: relocation error: alsamixer: symbol snd_mixer_get_hctl, version ALSA_0.9 not defined in file libasound.so.2 with link time reference

    I guess there was and error in the alsa-driver install so I began reinstalling it.

    cd alsa-driver*            //this works fine//
    sudo ./configure --with-cards=hda-intel --with-kernel=/usr/src/linux-headers-$(uname -r)   //this works fine//
    sudo make    //this doesn't work. see ouput error below//
    sudo make install
    

    Final lines of sudo make:

    hpetimer.c: In function ‘snd_hpet_open’:
    hpetimer.c:41: warning: implicit declaration of function ‘hpet_register’
    hpetimer.c:44: warning: implicit declaration of function ‘hpet_control’
    hpetimer.c:44: error: expected expression before ‘unsigned’
    hpetimer.c: In function ‘snd_hpet_close’:
    hpetimer.c:51: warning: implicit declaration of function ‘hpet_unregister’
    hpetimer.c:52: error: invalid use of undefined type ‘struct hpet_task’
    hpetimer.c: In function ‘hpetimer_init’:
    hpetimer.c:88: error: ‘EINVAL’ undeclared (first use in this function)
    hpetimer.c:99: error: invalid use of undefined type ‘struct hpet_task’
    hpetimer.c:100: error: invalid use of undefined type ‘struct hpet_task’
    hpetimer.c: At top level:
    hpetimer.c:121: warning: excess elements in struct initializer
    hpetimer.c:121: warning: (near initialization for ‘__param_frequency’)
    hpetimer.c:121: warning: excess elements in struct initializer
    hpetimer.c:121: warning: (near initialization for ‘__param_frequency’)
    hpetimer.c:121: warning: excess elements in struct initializer
    hpetimer.c:121: warning: (near initialization for ‘__param_frequency’)
    hpetimer.c:121: warning: excess elements in struct initializer
    hpetimer.c:121: warning: (near initialization for ‘__param_frequency’)
    hpetimer.c:121: error: extra brace group at end of initializer
    hpetimer.c:121: error: (near initialization for ‘__param_frequency’)
    hpetimer.c:121: warning: excess elements in struct initializer
    hpetimer.c:121: warning: (near initialization for ‘__param_frequency’)
    make[1]: *** [hpetimer.o] Error 1
    make[1]: Leaving directory `/usr/src/alsa/alsa-driver-1.0.9/acore'
    make: *** [compile] Error 1
    

    And then sudo make install gives me:

    rm -f /lib/modules/0.0.0/misc/snd*.*o /lib/modules/0.0.0/misc/persist.o /lib/modules/0.0.0/misc/isapnp.o
    make[1]: Entering directory `/usr/src/alsa/alsa-driver-1.0.9/acore'
    mkdir -p /lib/modules/0.0.0/misc
    cp snd-hpet.o snd-page-alloc.o snd-pcm.o snd-timer.o snd.o /lib/modules/0.0.0/misc
    cp: cannot stat `snd-hpet.o': No such file or directory
    cp: cannot stat `snd-page-alloc.o': No such file or directory
    cp: cannot stat `snd-pcm.o': No such file or directory
    cp: cannot stat `snd-timer.o': No such file or directory
    cp: cannot stat `snd.o': No such file or directory
    make[1]: *** [_modinst__] Error 1
    make[1]: Leaving directory `/usr/src/alsa/alsa-driver-1.0.9/acore'
    make: *** [install-modules] Error 1
    
    [SOLUTION]
    
    After screwing it all up, someone mentioned why not trying using the packages in Synaptic - so I did. 
    I have reinstalled the following packages and rebooter:
    -alsa-hda-realtek-ignore-sku-dkms
    -alsa-modules-2.6.32-25-generic
    -alsa-source
    -alsa-utils
    -linux-backports-modules-alsa-lucid-generic
    -linux-backports-modules-alsa-lucid-generic-pae
    -linux-sound-base
    -(i think i listed them all)
    
    After rebooting, the audio worked, both in speakers and headphones.
    I have no idea which is the package that made my audio work, but it certainly was one of them.
    
    [/SOLUTION]
    
    • skalka
      skalka over 13 years
      Can you tell me which audio card do you have on your pc?
    • pranay
      pranay over 13 years
      @Pedro: I didn't have any sound at all, speakers or headphones. I think my solution will work only with intel sound cards, you should probably remove those lines from your alsa-base.conf.
    • Pedro
      Pedro over 13 years
      OK, I've removed the lines.
    • Marek Grzenkowicz
      Marek Grzenkowicz over 13 years
      Why don't you try to use files from the repository first (Synaptic)?
    • Pedro
      Pedro over 13 years
      Woow, I have solved it. Thans Marek Grzenkowicz and all the others who helped. I have updated the question with the solution.
    • Admin
      Admin over 13 years
      @Pedro: If there's an answer below which led you to the solution, could you accept it? You can also post an answer yourself (instead of leaving that in the question), but that's up to you. Stack Exchange uses "accepted answers" instead of including "[SOLVED]" in the title.
    • Michael Gundlach
      Michael Gundlach over 13 years
      Also if you came about this answer on your own please "answer your own question" putting the answer in the body of your question isn't how this site's workflow is. Please remove your answer from your question and answer your question using the "Post an Answer" button at the bottom.
  • nem75
    nem75 over 13 years
    As is the mixer looks ok. Maybe there's a channel missing because your sound chip needs some module options set. I'd highly recommend working your way through help.ubuntu.com/community/HdaIntelSoundHowto to find that out.
  • Pedro
    Pedro over 13 years
    I did all the step, but on reboot there is no audio at all. However the howTo say: "if you have no sound, run dmesg and look for the string 'snd_'". I guess this should reload the driver, but i tried dmesg in terminal and in Alt+F2 without anything changing - nothing window opened
  • Pedro
    Pedro over 13 years
    I have an HP G62t-a10m. I have followed <a href="help.ubuntu.com/community/HdaIntelSoundHowto">this HowTo</a> and installed all of those (of course the latest version).
  • Pedro
    Pedro over 13 years
    Unfortunately it doesnt, but it may be because no more hardware is detected after following a HowTo (see question). I have to figure out how to detect the hardware now :(
  • Pedro
    Pedro over 13 years
    I updated the question with outputs during installation. Please check.
  • Pedro
    Pedro over 13 years
    Thanks, however, first I need to fix the alas-driver installation (see updated question) in order to follow those steps.
  • skalka
    skalka over 13 years
    Maybe model entry is wrong. I had this problem with a Asus and I solved with this procedure.
  • Alessandro Cuttin
    Alessandro Cuttin about 13 years
    well, this was my case, too. Suspend has a really behavior...
  • Pitto
    Pitto about 13 years
    I have to add that my problem was never completely solved: I get squeaky crazy sounds at startup and my laptop hangs up :/ I just wait for the next release to be available and test it. In the meanwhile I'll stick to windows 7 :(
  • squallbayu
    squallbayu over 8 years
    I have the same problem and it's fixed with suspend. Btw, how it works?
  • hytromo
    hytromo over 7 years
    An update on my Lubuntu 16.04 broke my sound and nothing worked. This did. Weird.