re-initialize soundcard after reboot (11.3)

Hi,

I have the problem that for working properly my soundcard needs sort of re-initialisation after every reboot (11.3, 64 bit).
I have to change a setting in the sound module of yast that causes the yast to rerun its final steps.

What is not working otherwise is audio playback from a usb TV-stick (recording is no problem, same as playing an audio/video file).

any idea what might be the problem?
if someone could tell me how to call the final steps of the sound module of yast from the command line, I could at least put that call into boot.local to avoid having to call yast.

thanks / regards
paul

rcalsasound restart

You can also try to update alsa and maybe this will be a permanent solution. Please read the instructions and follow them carefully. I would also recommend to export the current state of your packages using yast->software management->file->export in case You will have to revert the changes.
SDB:Alsa-update - openSUSE

Best regards,
Greg

It could be your system is sensitive to the order of sound devices, where after a regular boot your motherboard sound is sound-card-0 and your USB device is sound-card-1, and the setting you change in YaST is to reverse the order of sound devices.

Of course if you don’t tell us the “setting you change in the sound module of yast” we are forced to guess, which is not so efficient.

what I change is in fact the order of the soundcards.
I left it out on purpose in order not to mislead for the following reason:
at first, activating pulseaudio - what is required by the TV stick - also made sound work, up to the next reboot.
one soundcard is the one of the motherboard, the second is the one of the graphics card. (the TV provides no sound card)
if I change the order of the soundcards, IRRESPECTIVE OF WHAT CURENTLY IS THE PRIMARY SOUNDCARD, causes yast to run the setup and makes sound playback work.

“rcalsasound restart” makes it - THANKS!
but why is it necessary to call it after every reboot?

Your changing of sound cards also restarts alsa.

IMHO what your proved just now is that it is not necessary to change sound card order, and that may have had nothing to do with the problem, but rather the problem was an alsa restart was needed.

Possibly upon boot some application has seized your audio device, and the restart of alsa is necessary to free it. You could investigate this a bit more. Restart, and then use the “lsof” command to list open files in the directories where the sound device is located/accessed. You can do that by immediately after a boot (before trying to use your sound) run:

lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/* 

note that last entry is " /dev/snd/* " and NOT "/dev/snd* ".

Record what you get (easiest to copy and paste to a text file).

Then try an application to see if sound works. If no sound, again run:

lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/* 

and again record what you get.

Then restart alsa with: su -c ‘rcalsasound restart’

and again run:

lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/* 

and record what you get.

Then again run an app that plays sound, and assuming sound works, while the sound is being played run:

lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/* 

and again record what you get.

Then compare all 4. The output ‘might’ give you a hint as to what is going on.

finally I find some time to post the results.

The problem occurs not only after boot, but as well if I log in again after having logged of from KDE.

since KDE is already running, I assume that sound is already used for the login/startup sound.
nevertheless here’s the lsof output:

COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
kmix      2764 paul   12u   CHR  116,7      0t0 4171 /dev/snd/controlC0
kmix      2764 paul   14u   CHR 116,10      0t0 4181 /dev/snd/controlC1
pulseaudi 2799 paul   29u   CHR  116,7      0t0 4171 /dev/snd/controlC0
pulseaudi 2799 paul   36u   CHR  116,7      0t0 4171 /dev/snd/controlC0

kmix is listed, but the corresponding icon is not present in the panel

tvtime without sound

COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
kmix       2764 paul   12u   CHR  116,7      0t0  4171 /dev/snd/controlC0
kmix       2764 paul   14u   CHR 116,10      0t0  4181 /dev/snd/controlC1
pulseaudi  2799 paul  mem    CHR  116,8           4179 /dev/snd/pcmC1D3p
pulseaudi  2799 paul   22u   CHR 116,10      0t0  4181 /dev/snd/controlC1
pulseaudi  2799 paul   27u   CHR  116,8      0t0  4179 /dev/snd/pcmC1D3p
pulseaudi  2799 paul   29u   CHR  116,7      0t0  4171 /dev/snd/controlC0
pulseaudi  2799 paul   36u   CHR  116,7      0t0  4171 /dev/snd/controlC0
tvtime    12378 paul    6r   CHR   14,0      0t0 15458 /dev/mixer

now the kmix icon is back in the panel

COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 12467 paul  mem    CHR  116,5          37319 /dev/snd/pcmC0D0c
pulseaudi 12467 paul  mem    CHR  116,4          37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul  mem    CHR  116,8          37354 /dev/snd/pcmC1D3p
pulseaudi 12467 paul   21u   CHR 116,10      0t0 37356 /dev/snd/controlC1
pulseaudi 12467 paul   22u   CHR  116,8      0t0 37354 /dev/snd/pcmC1D3p
pulseaudi 12467 paul   27u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   28u   CHR  116,4      0t0 37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul   29u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   34u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   35u   CHR  116,5      0t0 37319 /dev/snd/pcmC0D0c
pulseaudi 12467 paul   36u   CHR  116,7      0t0 37321 /dev/snd/controlC0

tvtime this time with sound


COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 12467 paul  mem    CHR  116,4          37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul   21u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   22u   CHR  116,4      0t0 37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul   29u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   36u   CHR  116,7      0t0 37321 /dev/snd/controlC0
tvtime    12610 paul    6r   CHR   14,0      0t0 37422 /dev/mixer

any conclusions from the differences?
I ain’t got a clue from that…

I re-read that a couple of times.

Apologies, but the labelling you provided is not adequate for me. I’m too thick.

I can not tell when you had sound and EXACTLY what application was playing the sound when you had sound.

… nor can I tell when you did NOT have sound and EXACTLY what application should have been producing sound when it did not.

In some cases you have it labelled, but not in all. Sorry, if I missed it.

Without that being very clear, I don’t know how any conclusions can be attempted.

Further to my above post, I note you have pulse audio running.

Try installing the application ‘pavucontrol’ and then run ‘pavucontrol’ such that you can access its gui when you are trying to play an audio application. Check out the pavucontrol menus. Maybe it will shed some light.

directly after booting the system from within my KDE session, this is the output of
lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*

COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
kmix      2764 paul   12u   CHR  116,7      0t0 4171 /dev/snd/controlC0
kmix      2764 paul   14u   CHR 116,10      0t0 4181 /dev/snd/controlC1
pulseaudi 2799 paul   29u   CHR  116,7      0t0 4171 /dev/snd/controlC0
pulseaudi 2799 paul   36u   CHR  116,7      0t0 4171 /dev/snd/controlC0

kmix is listed here, but the corresponding icon is not present in the panel

then I started tvtime, which ran without sound
the lsof output while tvtime running is:

COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
kmix       2764 paul   12u   CHR  116,7      0t0  4171 /dev/snd/controlC0
kmix       2764 paul   14u   CHR 116,10      0t0  4181 /dev/snd/controlC1
pulseaudi  2799 paul  mem    CHR  116,8           4179 /dev/snd/pcmC1D3p
pulseaudi  2799 paul   22u   CHR 116,10      0t0  4181 /dev/snd/controlC1
pulseaudi  2799 paul   27u   CHR  116,8      0t0  4179 /dev/snd/pcmC1D3p
pulseaudi  2799 paul   29u   CHR  116,7      0t0  4171 /dev/snd/controlC0
pulseaudi  2799 paul   36u   CHR  116,7      0t0  4171 /dev/snd/controlC0
tvtime    12378 paul    6r   CHR   14,0      0t0 15458 /dev/mixer

then I called “rcalsasound restart” as root.
and called “lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*” again

COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 12467 paul  mem    CHR  116,5          37319 /dev/snd/pcmC0D0c
pulseaudi 12467 paul  mem    CHR  116,4          37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul  mem    CHR  116,8          37354 /dev/snd/pcmC1D3p
pulseaudi 12467 paul   21u   CHR 116,10      0t0 37356 /dev/snd/controlC1
pulseaudi 12467 paul   22u   CHR  116,8      0t0 37354 /dev/snd/pcmC1D3p
pulseaudi 12467 paul   27u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   28u   CHR  116,4      0t0 37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul   29u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   34u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   35u   CHR  116,5      0t0 37319 /dev/snd/pcmC0D0c
pulseaudi 12467 paul   36u   CHR  116,7      0t0 37321 /dev/snd/controlC0

then I started tvtime again. this time it ran with sound.
here’s the lsof output:


COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 12467 paul  mem    CHR  116,4          37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul   21u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   22u   CHR  116,4      0t0 37318 /dev/snd/pcmC0D0p
pulseaudi 12467 paul   29u   CHR  116,7      0t0 37321 /dev/snd/controlC0
pulseaudi 12467 paul   36u   CHR  116,7      0t0 37321 /dev/snd/controlC0
tvtime    12610 paul    6r   CHR   14,0      0t0 37422 /dev/mixer

when tvtime was running without(!) producing sound, pavumeter was reporting a signal.
is that what you wanted to know from pavucontrol?

I made a new login (without reboot).
same result: tvtime produced no sound.

then, whith tvtime running, I started pavucontrol.
there I could notice that instead of “internal audio analog stereo” the graphics card audio was selected.
when I selected “internal audio analog stereo” the sound was fine!

your had the right idea.

therefore, I called the KDE multemedia module.
there the graphics card audio was at the first position.

to solve the problem, is it correct, to move arts to the first position?
alternatives would be “Jack audio connection kit” or “Esound (ESD)”.

this gives me sound directly after login!
thanks alot for your help!!!

Congratulations on solving this.

In openSUSE-11.4 pulse audio was enabled in KDE, and I had problems myself. I found pavucontrol was quite useful in enabling me to tune away the problems. I do not know why the problems happen. I also track the Fedora forum a bit, and the sound guru’s there often recommend Fedora Gnome users install pavucontrol.