No sound from laptop when using headphones, speakers work fine

I have an issue where my laptop speakers work just fine, but when I plug in headphones, I get no noise. I’m using openSUSE 11.4 … I found others with the same issue, but this guy’s solution looks like he might be using some different version and his solution doesn’t work (can’t find the file he edited).

https://justcheckingonall.wordpress.com/2011/03/09/no-sound-on-headphones-with-intel-hda-3400realtek-alc259-in-linux/

rpm -qa | grep alsa

alsa-plugins-pulse-1.0.24-6.1.x86_64
alsa-1.0.24.1-3.1.x86_64
alsa-plugins-pulse-32bit-1.0.24-6.1.x86_64
alsa-utils-1.0.24.2-3.1.x86_64
alsa-oss-32bit-1.0.17-32.1.x86_64
alsa-oss-1.0.17-32.1.x86_64
alsa-plugins-1.0.24-6.1.x86_64
alsa-plugins-32bit-1.0.24-6.1.x86_64

rpm -qa | grep pulse

alsa-plugins-pulse-1.0.24-6.1.x86_64
pulseaudio-module-bluetooth-0.9.22-6.9.1.x86_64
pulseaudio-0.9.22-6.9.1.x86_64
libpulse-mainloop-glib0-0.9.22-6.9.1.x86_64
alsa-plugins-pulse-32bit-1.0.24-6.1.x86_64
pulseaudio-module-lirc-0.9.22-6.9.1.x86_64
libpulse0-0.9.22-6.9.1.x86_64
libxine1-pulse-1.1.19-4.4.x86_64
pulseaudio-module-zeroconf-0.9.22-6.9.1.x86_64
pulseaudio-esound-compat-0.9.22-6.9.1.x86_64
pulseaudio-utils-0.9.22-6.9.1.x86_64
libpulse0-32bit-0.9.22-6.9.1.x86_64
libpulse-browse0-0.9.22-6.9.1.x86_64
pulseaudio-module-x11-0.9.22-6.9.1.x86_64
pulseaudio-module-jack-0.9.22-6.9.1.x86_64

Contents of my modprobe.d/sound file

options snd slots=snd-hda-intel

u1Nb.0KXjhfiYyx4:82801H (ICH8 Family) HD Audio Controller

alias snd-card-0 snd-hda-intel

alsamixer, kmixer, etc all show no signs of a headphone (looked to check if it’s just muted or something).

Thats because openSUSE uses the file /etc/modprobe.d/50-sound.conf.

But one should NOT blindly apply someone elses fix in sound unless one has 100% identical hardware … and sufficiently similar software.

Is that true ??? Or did you mean to type 50-sound.conf ? The difference IS important !

With your PC connected to the internet, can you please run the diagnostic script:


/usr/sbin/alsa-info.sh 

and select the share / upload option. Once that is 100% complete, it will give you a website/URL address where it uploaded the sound configuration. Please copy the website/URL-address and post it here so we can check exactly what hardware your computer has for audio.

Thankyou.

Yeah, I meant the 50-sound.conf, lol was just too lazy to write it out. Here are the results:

http://www.alsa-project.org/db/?f=67f85ff50dbfae0ae98f1b8c7bb253d0021fdd9a

Edit, I didn’t have the headphone plugged in just then for that run. Here is the results with the headphones plugged in:

http://www.alsa-project.org/db/?f=f820db84f8deeeb0deeae50f1aa23e3e413ae593

Ok thanks

I note a Gateway T series with openSUSE-11.4 and the 2.6.37.1-1.2-desktop kernel (ie you have not updated with any of the security fixes) running the alsa sound driver 1.0.23 version and alsa sound utilities version 1.0.24.2. Your gateway’s hardware audio codec is a STAC9205.

This should have just worked … and the fact it did not suggests to me that even if we get this to work, you are still in ‘bug reporting territory’.

I am going to speculate that your alsa sound driver automatic configuration is not configuring properly upon booting and so we can try to force a configuration by specifying a ‘model’ option. For your 2.6.37.1-1.2 kernel, if you look inside the directory (which is something like, but perhaps not exact) you will see the directory:


/usr/src/linux-2.6.37.1-1.2/Documentation/sound/alsa

and inside that directory you will see the file HD-Audio-Models.txt file.

That has the list of modules that can be forced (one at a time).

In the case of the STAC-9205 it has this list:


STAC9205/9254
=============
  ref		Reference board
  dell-m42	Dell (unknown)
  dell-m43	Dell Precision
  dell-m44	Dell Inspiron
  eapd		Keep EAPD on (e.g. Gateway T1616)
  auto		BIOS setup (default)

So what you could do is try each of those, one at a time,specifying the model in your /etc/modprobe.d/50-sound.conf file, restarting the alsa driver, restarting your mixer, and testing your sound headphone. If that makes things worse or does not make things better, then try a different model option. Keep doing this until all have been attempted. If nothing works, remove the change you made.

You can apply the model option (lets say you are trying ‘eapd’ ) with root permissions by adding a line to the front of your /etc/modprobe.d/50-sound.conf file such that it looks like:


options snd-hda-intel model=eapd
options snd slots=snd-hda-intel
# u1Nb.0KXjhfiYyx4:82801H (ICH8 Family) HD Audio Controller
alias snd-card-0 snd-hda-intel

and then save that change. Then restart your alsa sound driver by sending the command with root permissions:


rcalsasound restart

Then restart your mixer (kmix in KDE and alsamixer (?) in Gnome) and then test.

If that does not work, then replace ‘eapd’ with another setting (say ‘ref’) and save, restart alsa driver, restart your mixer and test.

Do that for each option.

If you wished to try the line you read about on the Internet you would try:


options snd-hda-intel model=auto position_fix=0
options snd slots=snd-hda-intel
# u1Nb.0KXjhfiYyx4:82801H (ICH8 Family) HD Audio Controller
alias snd-card-0 snd-hda-intel

restart your alsa sound driver restart your mixer and test.

If you look inside the file /usr/src/linux-2.6.37.1-1.2/Documentation/sound/alsa/Alsa-Configuration.txt you will see it reads:


Module snd-hda-intel
  --------------------

    Module for Intel HD Audio (ICH6, ICH6M, ESB2, ICH7, ICH8, ICH9, ICH10,
			PCH, SCH),
		ATI SB450, SB600, R600, RS600, RS690, RS780, RV610, RV620,
			RV630, RV635, RV670, RV770,
		VIA VT8251/VT8237A,
		SIS966, ULI M5461

    [Multiple options for each card instance]
    model	- force the model name
**    position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF)**
    probe_mask  - Bitmask to probe codecs (default = -1, meaning all slots)
    		  When the bit 8 (0x100) is set, the lower 8 bits are used
		  as the "fixed" codec slots; i.e. the driver probes the
		  slots regardless what hardware reports back
    probe_only	- Only probing and no codec initialization (default=off);
		  Useful to check the initial codec status for debugging
    bdl_pos_adj	- Specifies the DMA IRQ timing delay in samples.
		Passing -1 will make the driver to choose the appropriate
		value based on the controller chip.
    patch	- Specifies the early "patch" files to modify the HD-audio
    		setup before initializing the codecs.  This option is
		available only when CONFIG_SND_HDA_PATCH_LOADER=y is set.
		See HD-Audio.txt for details.
    beep_mode	- Selects the beep registration mode (0=off, 1=on, 2=
		dynamic registration via mute switch on/off); the default
		value is set via CONFIG_SND_HDA_INPUT_BEEP_MODE kconfig.
    
    [Single (global) options]
    single_cmd  - Use single immediate commands to communicate with
		codecs (for debugging only)
    enable_msi	- Enable Message Signaled Interrupt (MSI) (default = off)
    power_save	- Automatic power-saving timeout (in second, 0 =
		disable)
    power_save_controller - Reset HD-audio controller in power-saving mode
		(default = on)

    This module supports multiple cards and autoprobe.
    
    See Documentation/sound/alsa/HD-Audio.txt for more details about
    HD-audio driver.

with more detail in the HD-Audio.txt in the same directory.


HD-AUDIO CONTROLLER
-------------------

DMA-Position Problem
~~~~~~~~~~~~~~~~~~~~
The most common problem of the controller is the inaccurate DMA
pointer reporting.  The DMA pointer for playback and capture can be
read in two ways, either via a LPIB register or via a position-buffer
map.  As default the driver tries to read from the io-mapped
position-buffer, and falls back to LPIB if the position-buffer appears
dead.  However, this detection isn't perfect on some devices.  **In such
a case, you can change the default method via `position_fix` option**.

`position_fix=1` means to use LPIB method explicitly.
`position_fix=2` means to use the position-buffer.  0 is the default
value, the automatic check and fallback to LPIB as described in the
above.  If you get a problem of repeated sounds, this option might
help.

In addition to that, every controller is known to be broken regarding
the wake-up timing.  It wakes up a few samples before actually
processing the data on the buffer.  This caused a lot of problems, for
example, with ALSA dmix or JACK.  Since 2.6.27 kernel, the driver puts
an artificial delay to the wake up timing.  This delay is controlled
via `bdl_pos_adj` option. 

When `bdl_pos_adj` is a negative value (as default), it's assigned to
an appropriate value depending on the controller chip.  For Intel
chips, it'd be 1 while it'd be 32 for others.  Usually this works.
Only in case it doesn't work and you get warning messages, you should
change this parameter to other values.

Both the HD-Audio.txt and Alsa-Configuration.txt contain suggestions, but the instructions are complex and not for the faint hearted (I don’t understand 95% of what is in there).

If none of the above helps, advise, and we can try to update your alsa sound driver.

Awesome! This worked:

options snd-hda-intel model=eapd

Thanks for your help :slight_smile:

Excellent !!

Thankyou for sharing your solution.

Very nice since I was having the same kind of issue as well :slight_smile:

Just tried this with openSuse 13.1, 64-bit. Worked.