Comment 9 for bug 450652

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 450652] Re: [karmic] Sound muted after boot

On Wed, Oct 14, 2009 at 9:28 AM, a.tom <email address hidden> wrote:
> Daniel, what has been changed in this new alsa-utils? I needed a script which restarted alsa-utils after suspend/resume, it was quite simple:
> ~$ cat /etc/pm/sleep.d/99sound
> #!/bin/sh
> # Restarts sound
>
> start ()
> {
>        exec /etc/init.d/alsa-utils restart
> }
>
> stop ()
> {
>        exec /etc/init.d/alsa-utils stop
> }
>
> case "$1" in
>        hibernate|suspend) stop;;
>        thaw|resume) start;;
>        *) exit $NA ;;
> esac
>
> and now it blocks suspend, and when i comment out the stop part, it
> doesn't bring back sound, not even with alsa-utils restart

This is absolutely the wrong way to do it. If you have problems with
volumes being restored upon resume, it's a sound driver bug, and you
should file a bug affecting linux. You can work around it by
explicitly specifying your driver as needing to be unloaded prior to
suspend.