Pooh, I've gone through each part of my script manually, but everything seems to work fine. That is, until I actually put the laptop into hibernation ...
Both /etc/init.d/alsasound unload / start and rcalsasound produce no problems. The sound card seems to work fine after unloading the sound driver.
For some reason (unknown to myself), I also tried the commands not from root level but from my user account level.
I got the following errors:
Code:
homoludens@linux-chameleon:~> /etc/init.d/alsasound unload
Shutting down sound driverERROR: Removing 'snd_seq_dummy': Operation not permitted
ERROR: Removing 'snd_pcm_oss': Operation not permitted
ERROR: Module snd_mixer_oss is in use by snd_pcm_oss
ERROR: Module snd_seq is in use by snd_seq_dummy
ERROR: Module snd_seq_device is in use by snd_seq_dummy,snd_seq
ERROR: Removing 'snd_intel8x0': Operation not permitted
ERROR: Module snd_ac97_codec is in use by snd_intel8x0
ERROR: Module snd_pcm is in use by snd_pcm_oss,snd_intel8x0,snd_ac97_codec
ERROR: Module snd_timer is in use by snd_seq,snd_pcm
ERROR: Module snd is in use by snd_seq_dummy,snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
I added lines for snd_seq_dummy, snd_pcm_oss, snd_intel8x0 and snd_intel8x0m to my hibernation script, but didn't help. Below the script (I also changed the hibernation script order, putting the modprobe -r commands before alsasound unload, seems to make more sense to me):
Code:
#!/bin/bash
case "$1" in
****resume|thaw)
********modprobe snd-intel8x0
********modprobe snd-intel8x0m
********modprobe snd_pcm_oss
********modprobe snd_seq_dummy
********/etc/init.d/alsasound start
********kmix
********kmixctrl -r
****;;
****suspend|hibernate)
********kmixctrl -s
********killall kmix
********modprobe -r snd_seq_dummy
********modprobe -r snd_pcm_oss
********modprobe -r snd-intel8x0m
********modprobe -r snd-intel8x0
********/etc/init.d/alsasound unload
****;;
esac
exit $?
I think my next step will be to look into the system log file for error messages after invoking hibernation. Perhaps that'll help.