[ltp] Redhat 9 and Alsa, no sound after suspend

Dugan Chen linux-thinkpad@linux-thinkpad.org
Tue, 10 Jun 2003 02:09:00 -0700


If you're like most Redhat users, you use up2date. Let up2date get
everything right now, and you'll end up with kernel 2.4.20-18.9.
No-one, as yet, has built Alsa drivers (needed by the T23, among other
machines) for Redhat 9. Therefore, you'll download the source RPM's
and compile your own (http://freshrpms.net/docs/alsa/).

I did that. One thing I noticed immediately was that the sound would
stop working after returning from suspend. The mixer settings would stay 
correct, the modules would stay loaded, and the software would
not give any error messages. However, they also wouldn't give any
sound, even though they worked before suspending.

If you have this problem, then one solution is to remove the Alsa
modules, load them, and then use the mixer to set the volume again.
It's easier than it sounds. Just create the following shell script as
/usr/local/bin/alsa-restart

--

/sbin/rmmod snd-intel8x0
/sbin/rmmod snd-pcm-oss
/sbin/rmmod snd-mixer-oss
/sbin/rmmod snd-seq-oss
/sbin/rmmod snd-seq-midi-event
/sbin/rmmod snd-seq
/sbin/rmmod snd-pcm
/sbin/rmmod snd-timer
/sbin/rmmod snd-ac97-codec
/sbin/rmmod snd-mpu401-uart
/sbin/rmmod snd-rawmidi
/sbin/rmmod snd-seq-device
/sbin/rmmod snd
/sbin/rmmod soundcore
/sbin/modprobe snd-intel8x0
/sbin/modprobe snd-pcm-oss
/sbin/modprobe snd-mixer-oss
/sbin/modprobe snd-seq-oss
alsamixer

--

Then, everytime you return from suspend, su to root and type
"alsa-restart". Is this the most elegant solution? I hope not. But it
works.

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus