Hi, I have been hearing an annoying popping sound every time I shut down or 
reboot my Compaq CQ40 laptop.
It sounds like the speakers get their power cut off before they are shut down, 
just like when you would cut off the power of desktop speakers without turning 
them off first. 

I'm using Debian Squeeze wicht I installed a week or so ago. I didn't
have this problem on Ubuntu 11.10, so I'm guessing it's a kernel issue
since my Ubuntu 11.10 was using a newer kernel 3.0. I'd like to keep
using Debian stable...

Anyway, I have been looking around for a few days now and tried several
things to fix this, including the options given here in this thread:



1. -- adding "+alsactl power off" in /etc/init.d/alsa-utils here (under start) 
and stop)):
---------------------------------------------------------------------------------------------------------------------------
case "$1" in
  start)
        EXITSTATUS=0


        TARGET_CARD="$2"
        case "$TARGET_CARD" in
          ""|all) TARGET_CARD=all ; log_action_begin_msg "Setting up ALSA" ;;
          *) log_action_begin_msg "Setting up ALSA card ${TARGET_CARD}" ;;
        esac
        card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; 
echo $? ; )" "none loaded"
        preinit_levels "$TARGET_CARD" || EXITSTATUS=1
        if ! restore_levels "$TARGET_CARD" ; then
                sanify_levels "$TARGET_CARD" || EXITSTATUS=1
                restore_levels "$TARGET_CARD" >/dev/null 2>&1 || :
        fi
+ alsactl power off
        log_action_end_msg_and_exit "$EXITSTATUS"
        ;;
  stop)
        EXITSTATUS=0
        TARGET_CARD="$2"
        case "$TARGET_CARD" in
          ""|all) TARGET_CARD=all ; log_action_begin_msg "Shutting down ALSA" ;;
          *) log_action_begin_msg "Shutting down ALSA card ${TARGET_CARD}" ;;
        esac
        card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; 
echo $? ; )" "none loaded"
        store_levels "$TARGET_CARD" || EXITSTATUS=1
        mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1
+ alsactl power off
        log_action_end_msg_and_exit "$EXITSTATUS"
        ;;
  restart|force-reload)
        EXITSTATUS=0
        $0 stop || EXITSTATUS=1
        $0 start || EXITSTATUS=1
        exit $EXITSTATUS
        ;;
  reset)
        TARGET_CARD="$2"
        case "$TARGET_CARD" in
          ""|all) TARGET_CARD=all ; log_action_begin_msg "Resetting ALSA" ;;
          *) log_action_begin_msg "Resetting ALSA card ${TARGET_CARD}" ;;
        esac
        card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; 
echo $? ; )" "none loaded"
        preinit_levels "$TARGET_CARD"
        sanify_levels "$TARGET_CARD"
        log_action_end_msg_and_exit "$?"
        ;;
  *)
        echo "Usage: $MYNAME {start [CARD]|stop [CARD]|restart [CARD]|reset 
[CARD]}" >&2
        exit 3
        ;;
esac
---------------------------------------------------------------------------------------------------------------------------



2. -- I also tried adding "modprobe -r snd_hda_intel" in /etc/init.d/halt here 
(before halt command):
I replaced "maestro3" with "snd_hda_intel" since this is what I found in 
/proc/asound/modules...
---------------------------------------------------------------------------------------------------------------------------
do_stop () {
        if [ "$INIT_HALT" = "" ]
        then
                case "$HALT" in
                  [Pp]*)
                        INIT_HALT=POWEROFF
                        ;;
                  [Hh]*)
                        INIT_HALT=HALT
                        ;;
                  *)
                        INIT_HALT=POWEROFF
                        ;;
                esac
        fi

        # See if we need to cut the power.
        if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
        then
                /etc/init.d/ups-monitor poweroff
        fi

        # Don't shut down drives if we're using RAID.
        hddown="-h"
        if grep -qs '^md.*active' /proc/mdstat
        then
                hddown=""
        fi

        # If INIT_HALT=HALT don't poweroff.
        poweroff="-p"
        if [ "$INIT_HALT" = "HALT" ]
        then
                poweroff=""
        fi

        # Make it possible to not shut down network interfaces,
        # needed to use wake-on-lan
        netdown="-i"
        if [ "$NETDOWN" = "no" ]; then
                netdown=""
        fi

        log_action_msg "Will now halt"
        modprobe -r snd_hda_intel
        halt -d -f $netdown $poweroff $hddown
        
}
---------------------------------------------------------------------------------------------------------------------------


I have also tried putting "modprobe -r snd_hda_intel" under stop) befor
"do_stop" instead... But that gives me a "alsa-utils... Failed" output
during boot. My Speaker is also muted when I log on. I can easily turn
on my speakers via the Volume control (GUI), though. So, it's doing
something, but not what I want. The speakers are still popping at
shutdown/reboot.

Neither solutions worked for me (so I put both scripts back to their
defaults for now). However, I'm not at all familiar with changing
scripts etc. I'm not a progammer. So, am I doing something wrong, or
will this just not work for me...


I'm amazed that so many people have been having this problem since many years 
ago, but that I haven't been able to find a solution to this. Well, maybe the 
solution is here and I'm just messing it up. 


Thanks for your help

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/23984

Title:
  Big bang on poweroff if sound device is enabled.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/23984/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to