Cracking noises on shutdown

Bug #9365 reported by Ruben Vermeersch
4
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Fix Released
Low
LaMont Jones

Bug Description

When shutting down my Ubuntu system, I hear cracking noises coming from my
speakers. This can't be healthy. I don't have this problem on Gentoo (which
unloads it's alsa modules on shutdown).

Revision history for this message
Matt Zimmerman (mdz) wrote :

What kind of cracking noises? At what volume? At what point during the
shutdown sequence?

Revision history for this message
Ruben Vermeersch (ruben) wrote :

At the very end of shutdown, when the power is turned off. A bit like as if the
speaker loses it's signal in the middle of operating.

Revision history for this message
Matt Zimmerman (mdz) wrote :

This doesn't sound like a software problem. Does it make a difference if you
unload the module before shutting down?

Revision history for this message
Ruben Vermeersch (ruben) wrote :

If I rmmod snd_intel8x0 first, it gives no cracking noise at all.

Here is how Gentoo handles this:

unload_modules() {
    LOADED_MODULES="$(/sbin/lsmod | grep -E "^snd" | awk '{print $1}')"
    for MODULE in ${LOADED_MODULES}
    do
        /sbin/rmmod ${MODULE} >& /dev/null
    done
    /sbin/rmmod soundcore >& /dev/null
    /sbin/rmmod gameport >& /dev/null

    # Return success if the modules are unloaded
    test -z "$(/sbin/lsmod | grep -E "^snd" | awk '{print $1}')"
}

This is being executed at the end of alsa shutdown, after the mixer settings
have been stored

Revision history for this message
Matt Zimmerman (mdz) wrote :

It seems that if there is something which the driver ought to do at shutdown, it
should happen regardless of whether or not the module is unloaded. Herbert?

Revision history for this message
Herbert Xu (herbert-gondor) wrote :

The question is what. If we can identify exactly what operation resolves the
crackling problem then a shutdown method can be added.

Revision history for this message
Ruben Vermeersch (ruben) wrote :

Created an attachment (id=583)
Unloading code in stop function

Unloading the modules before shutdown fixes it (as the code in the diff does).
It however breaks restarting alsa (the modules should be reloaded when starting
alsa again)

Revision history for this message
Thomas Hood (jdthood) wrote :

We shouldn't have to unload modules at shutdown.

Does it suffice to mute the master volume?

Revision history for this message
Ruben Vermeersch (ruben) wrote :

This should suffice too, I have my master muted and it doesn't crackle (well, it
does, at a very unhearably low volume, which isn't harmful)

Muting sounds fine to me.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Sounds like we should mute everything in the "stop" action for the alsa init
script (after saving the mixer settings, of course).

Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 1.0.7-2ubuntu2

Revision history for this message
Matt Zimmerman (mdz) wrote :

Don't forget to file the patch upstream, if you haven't already

Revision history for this message
user (meta1729-deactivatedaccount) wrote :

I still get the cracking noise at the very last moments during shutdown in Xubuntu 12.04 Precise Pangolin.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.