[ltp] Re: 600X Sound After Resume

Chris Schumann linux-thinkpad@linux-thinkpad.org
Sat, 15 Jul 2006 21:03:26 -0500


Florian wrote:
> On Fre, 14 Jul 2006, Chris Schumann wrote:
> 
> > I'm running FC5 on two 600X's that exhibit the same problem: No sound after
> > a resume. I know I can rmmod the snd_cs46xx module and modprobe it, but I
> > can't do that (even as root) when I'm logged in an X session because it's in
> > use. lsmod shows that it's being used by one process, but gives no name.
> 
> lsof should give the names of processes...
> 
> lsof | grep /dev/snd | awk '{print $2}' | xargs kill
> sleep 2
> lsof | grep /dev/snd | awk '{print $2}' | xargs kill -9
> 
> after that you should be able to remove the module

Yep, and what's holding the device open is the mixer_app, the volume
control on the task bar.

> > As a work-around, I can log out, use a console session and stop and start
> > the module. When I log back in, sound is back.
> > Is there a way to 1) automate the work-around, 2) fix the driver or 3) use
> > some other driver/tool?
> > 
> > I'm afraid I might miss responses to the list, so please try to copy me.
> > I'll post any solution to thinkwiki.
> 
> the question is.. after resume, is the soundcard only silent, or do you get
> an error when trying to play some music? maybe a
> alsactl restore
> could do the trick after resume.

It is silent most of the time, and gives errors other times, and alsactl
restore gives no errors, but the sound is still silent.

Richard Neill wrote:

> Let me guess - you are using a sound server? Likely culprits are:
> 
>   KDE's arts
>   timidity

Uhm, I don't think so. The volume control has the device open. Neither
of those appears to be running.

> I don't know what gone does.
Me neither.

> The good news is, you don't need to run *any* sound servers now. We have 
> alsa + dmix.
> 
> 1)Disable the Desktop Environment's sound server. Tell it to play 
> notifications through an external player. Eg this
> -----------------
> #!/bin/bash
> #Play audio file immediately (alsa; avoid arts startup delay). Volume 
> decreased to 0.4
> sox "$1" -t wav -v 0.4 - | aplay
> ----------------------

Where do I put that? Why decrease volume?

> 2)Set all applications to output to alsa, rather than oss.
> Certainly you can do this with mplayer,vlc,xmms etc

I haven't used apps to play anything yet. It's all desktop sounds and
sounds from web pages.

> 3)Anything that can't should be wrapped in "aoss". eg
>      aoss /usr/bin/play  somefile.

See #2.

Thanks for the tips, guys, but there's still no joy. Is this
fundamentally a bug in the sound driver? Maybe it's a good way to get my
feet wet with Linux driver hacking?

Chris