Headphone jack only works once

My headphones work fine the first time after booting up until I unplug them then plug them in again. The speakers work fine. I can run ‘rcalsasound restart’ to get the headphones going again, but I don’t want to do this everytime I want to use the headphones.

I’ve updated alsa & tried different models in /etc/modprobe.d/sound, but I get the same result: headphones only work once.

Any help is appreciated.

Laptop:
Gateway M-6862/snd-hda-intel/STAC9205

Are these USB headphones? If so, did you try creating a custom .asoundrc file?

No, they are regular headphones that plug in the headphone jack in the front of the computer.

You could try running a diagnostic script when your headphone jack works, and then run it again when your headphone jack does not work, and compare the differences. Ensure “wget” is installed, then with your PC connected to the internet, copy and paste the following script into a gnome-terminal or konsole:

wget http://home.cfl.rr.com/infofiles/tsalsa && su -c 'bash ./tsalsa' 

enter your root password when prompted. If you can’t answer the questions, just press enter. Each instance of running the script will give you a different URL when complete. Post here the output URL(s).

Also, copy and paste the following line into a gnome-terminal or konsole when your headphones work, and also when they don’t work.lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*

What player were you using when they last were used? Could that player be causing a problem?
and look for differences.

Greetings,

I too have been experiencing problems with my headphone jack as well. The only way I have managed to get my headphones working is to plug them into the jack and then restart the server. I have yet to get them working at boot. Once I have unplugged them, its lost, have to plug them back in and restart the server with rcalsasound restart. I have snooped around the web and tried numberous of things other have used to get their sound card working. Everyone does the same thing, plug in headphones and then restart the sound server to get sound in them if unplugged and plugged again the process must be repeated.

I did wander over to SDB:Intel-HDA sound problems - openSUSE
and tried both methods mentioned there.

The first yielded 4 options for the model option, ref, dell-m42,dell-m43,dell-m44. When tried with the ref option. Sound would work, and when the headphones where plugged in the sound would not cut off from the speakers and never could get sound in the headphones. Options dell-m42 and dell-m44 both acted the same as far as I could tell. Sound worked fine, plug the headphones in and the sound would cut off but there would be no sound in the headphones until you restart the sound server again(and yes, I restarted the sound server every time I made a change to /etc/modprobe.d/sound and sound.YaST2save). With dell-m43 there would be no sound at all from the speakers, plug the headphones in at first there was no sound in them, restart the sound server and there would be sound in them. I have also toyed around with the position_fix and enable_msi options using the model option as well. I have tried the model options by its self and with the others in numberous combos, nothing has worked. What else can I try?

I am on a Gateway M-6841 and as far as I can tell(Sorry, but the manufacturer supplied documentation isn’t worth the ink they used to print it) it has the Mobile Intel® GM965 Express Chipset
with the tech data here:
Intel ® -

snd-hda-intel with Sigmatel STAC9205 codec

Done while playing an mp3 in Amarok:

lsof /dev/snd/controlC0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
knotify4 3249 jboulet 11r CHR 116,8 0t0 63940 /dev/snd/controlC0
yauap 13474 jboulet 8u CHR 116,8 0t0 63940 /dev/snd/controlC0

lsof /dev/snd/hwC0D0
lsof /dev/snd/hwC0D1

lsof /dev/snd/pcmC0D0p
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
yauap 13474 jboulet mem CHR 116,4 63902 /dev/snd/pcmC0D0p
yauap 13474 jboulet 7u CHR 116,4 0t0 63902 /dev/snd/pcmC0D0p

lsof /dev/snd/pcmC0D0c
lsof /dev/snd/seq

lsof /dev/snd/timer
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
yauap 13474 jboulet 6r CHR 116,2 0t0 63853 /dev/snd/timer

lsof /dev/dsp
lsof /dev/mixer


With headphones:

tsalsa.txt - nopaste.com (beta)

Without Headphones:

tsalsa.txt - nopaste.com (beta)

If you need any other info I will do what I can to provide it, i really want my headphone jack to work :slight_smile:

Oh, I am in openSuSE 11.0 that is up to date via the updater in kde and I have not tried to update alsa as of yet.

I did a computer comparison between the two HTML pages (with the script output) that you posted. I confess, it does not appear you gave me what I had asked for in the previous thead. What I want to see is a script output with the headphones working, and one with them not working. NOT one with them attached, and one with them not attached. There is a difference there in my mind, and if I did not make myself clear, please advise and I’ll try again.

Still what you posted gives this for differences::

With headphones:
Problem: headphone jack doesnt work properly
Lsof output:

        COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME        
        yauap   13474 jboulet  mem    CHR  116,4          63902 /dev/snd/pcmC0D0p        
        yauap   13474 jboulet    6r   CHR  116,2      0t0 63853 /dev/snd/timer        
        yauap   13474 jboulet    7u   CHR  116,4      0t0 63902 /dev/snd/pcmC0D0p        
        yauap   13474 jboulet    8u   CHR  116,8      0t0 63940 /dev/snd/controlC0  

============
Without Headphones:
Problem: headphone jack does not work properly

Lsof output:

        COMMAND    PID    USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME        
        knotify4  3249 jboulet   11r   CHR  116,8      0t0 63940 /dev/snd/controlC0        
        yauap    13474 jboulet  mem    CHR  116,4          63902 /dev/snd/pcmC0D0p        
        yauap    13474 jboulet    6r   CHR  116,2      0t0 63853 /dev/snd/timer        
        yauap    13474 jboulet    7u   CHR  116,4      0t0 63902 /dev/snd/pcmC0D0p        
        yauap    13474 jboulet    8u   CHR  116,8      0t0 63940 /dev/snd/controlC0  

Module Parameters:

snd_seq_dummy/parameters/duplex:N        
snd_seq_dummy/parameters/ports:1  

… where those module parameters are in the 2nd script (without headphones) but not in the 1st (with headphones). …

I have no idea what that means. It might help if you explained a bit better the difference between your PC’s headphone jack functionality when you ran those two scripts (and not just stating headphone attached/not-attached).

I also did a search on alsa for the stac9205 and did not see any new release info after your 1.0.16 alsa version:
Search results - AlsaProject

Can you show me the syntax you used when editing your /etc/modprobe.d/sound file? (so I can check it was correct) ?

You could also try raising a bug report on this:
Submitting Bug Reports - openSUSE

Sorry I did not clarify, When I had the headphones plugged in they were working. And I don’t have my /etc/modprobe.d/sound right in front of me but the options line is like this:


options snd-hda-intel model=dell-m42 position_fix=1 enable_msi=1 

Did you try all the possible model options for your stac9205 ? ie dell-m43 and dell-m44 ?

I recommend you raise a bug report on this …
Submitting Bug Reports - openSUSE

I tried so many things to get this working, and I still have the same “headphones work once” problem.

I tried alsa updates, modifying /etc/modprobe.d/sound many, many, many times etc.

I’ve wasted too much time on this so I’ve given up. I’m going back to Windows, at least for now.

Thanks, oldcpu, for your help.

Enjoy your windows. Most people I know use MS-Windows. (I don’t care for it myself).

I don’t like it either, but at least my sound works right in Windows.

I suspect your sound works right in Linux also, but it is not as user friendly to set up because the hardware manufacturers (for the hardware you choose) have refused to support Linux, and more specifically, refused to support openSUSE Linux. Hence it is left to volunteers to try and hack a solution, and such solutions take some time to setup if one is not a fairly experienced user.

If my sound works right in Linux then it would be working right. I’m not a Linux newbie. I’ve used Linux for several years, and have done my fair share of “hacking” to get things running correctly, but I’m simply tired of doing that. I haven’t given up on Linux completely, I’m just going to take a break.