Have a look at '/etc/pm/hooks'. You could use one of the existing scripts as a template to create a script that restarts your sound system with 'modprobe snd_intel8x0' command upon resume (thawing). Note: You may need to pass additional options when loading the driver as per your '/etc/modprobe.d/sound' configuration. Name the script file 'sound' or similar.
Example:
#!/bin/bash
case "$1" in
resume|thaw)
modprobe snd_intel8x0
;;
suspend|hibernate)
modprobe -r snd_intel8x0
;;
esac
exit $?
I've seen similar approaches used to restart network hardware.
EDIT: Some more thoughts...
1) Now that I think about it, maybe you just need to add additional options specific to your hardware here. As mentioned before, look at cat '/etc/modprobe.d/sound' for these options. For example, I need to do:
linux:/home/dean # modprobe snd-hda-intel enable=1 index=0 position_fix=1
2) This may (or may not) be relevant. I know that kmix must be terminated before attempting to unload the sound driver. Demonstrated here:
linux:/home/dean # modprobe -r snd-hda-intel
FATAL: Module snd_hda_intel is in use.
I wonder if this might be an issue...
[/b]
Bookmarks