After some experimentation I think a better solution is this:
/etc/acpi/suspend.d/86-lanai-sound.sh: killall mixer_applet2 modprobe -r snd_hda_intel
/etc/acpi/resume.d/66-lanai-sound.sh: modprobe snd_hda_intel
This gets the sound module shut down and restored in the right order, and works for both hibernate and suspend. The Gnome mixer applet still annoys you on resume, but I'm not sure how to fix that in a user generic way.
After some experimentation I think a better solution is this:
/etc/acpi/ suspend. d/86-lanai- sound.sh:
killall mixer_applet2
modprobe -r snd_hda_intel
/etc/acpi/ resume. d/66-lanai- sound.sh:
modprobe snd_hda_intel
This gets the sound module shut down and restored in the right order, and works for both hibernate and suspend. The Gnome mixer applet still annoys you on resume, but I'm not sure how to fix that in a user generic way.