Big bang on poweroff if sound device is enabled.

Bug #23984 reported by Oleksij Rempel
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Wishlist
Unassigned
linux (Ubuntu Linaro Evaluation Build)
Invalid
Undecided
Unassigned

Bug Description

If power off and sound device is enabled it's make loud sound impuls wich can be
dangerous for hardware.
Kernel still can't disable sound devices before poweroff.
Resolution: unload snd-* module before poweroff. amixer mute das't help.
I made smole hack wich resole this problem on my laptop, it's may be wrong bat
it's working:
i aded "modprobe -r snd-maestro3" to halt script.

Tested and working realy good.

Revision history for this message
Oleksij Rempel (olerem) wrote :

i tested other posebility and added "alsactl power off" to alsa-utils script.
This one is working better, i don't need eny more to compile sound as module.

Please don't "unconfirm" this bug report is't realy importent.
"amixer mute" don't halp with this soundcard.

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

(In reply to comment #1)
> i tested other posebility and added "alsactl power off" to alsa-utils script.
> This one is working better, i don't need eny more to compile sound as module.

Interesting.

Any opinions on whether or not "alsactl power off" should be added to the
alsa-utils initscript "stop" method?

Revision history for this message
Oleksij Rempel (olerem) wrote :

I meid it derty, jast without eny check.

  stop)
        EXITSTATUS=0
        TARGET_CARD="$2"
        case "$TARGET_CARD" in
          ""|all) TARGET_CARD=all ; print_begin_msg "Shutting down ALSA..." ;;
          *) print_begin_msg "Shutting down ALSA card ${TARGET_CARD}..." ;;
        esac
        card_OK "$TARGET_CARD" || print_end_msg_and_exit "$( [ ! "$2" ] ; echo
$? ; )" "done (none loaded)" "failed (none loaded)"
        store_levels "$TARGET_CARD" || EXITSTATUS=1
        mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1
+ alsactl power off
        print_end_msg_and_exit "$EXITSTATUS" "done" "failed"
        ;;

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

Wouldn't this require a corresponding 'power off' in the start action to preserve the semantics of the init script?

Changed in alsa-utils:
status: Unconfirmed → Confirmed
Revision history for this message
Oleksij Rempel (olerem) wrote :

I use power off in the start action as workaround to Bug 17825.

Revision history for this message
James (chiisu81) wrote :

Same issue with a Klipsch ProMedia 4.1 speaker set connected to my M-Audio Revolution 7.1, and if I don't remember to turn down the volume on the control speaker all the way before shutting down it makes a very loud popping sound.

Daniel T Chen (crimsun)
Changed in alsa-utils:
assignee: nobody → ubuntu-audio
importance: Medium → Wishlist
status: Confirmed → Triaged
Revision history for this message
casualuser (mauro-tiz) wrote :

Same issue on HP Pavillion dv6000 series:
 - sound chipset 82801H (ICH8 Family) HD Audio Controller (Intel)
 - Ubuntu 8.04.1, kernel 2.6.24-19-generic
 - alsa 1.0.15
I tried to add the alsactl power off command but the "power" command is not available any more in alsactl v1.0.15.
Muting the speakers and/or lowering the volume won't help.
Any recipe to solve the problem (I wonder why I can find so little information on the web for a problem first signalled in 2005)?

Revision history for this message
Yoobin Jeong (eyeyoubin-gmail-deactivatedaccount-deactivatedaccount) wrote :

same issue on hp pavilion dv5
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Ubuntu 9.10 Karmic
Kernel Linux 2.6.30-10 generic

I can't believe this bug's been around for nearly 4 years...

Revision history for this message
Daniel T Chen (crimsun) wrote :

We're fixing this in the kernel.

affects: alsa-utils (Ubuntu) → linux (Ubuntu)
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Someone who is experiencing this on the latest build of Lucid, please provide this bug with the apport collected data to this bug.

Thanks!

~JFo

Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Oleksij Rempel (olerem) wrote : Re: [Bug 23984] Re: Big bang on poweroff if sound device is enabled.

May I ask why?. Ubuntudevs will newer fix it.
Or you will do it?
You can reproduce it on most systems. Plug speakers with amplifier set
it to 0dB and poweroff your PC.

Am Montag, den 26.04.2010, 14:21 +0000 schrieb Jeremy Foshee:
> Someone who is experiencing this on the latest build of Lucid, please
> provide this bug with the apport collected data to this bug.
>
> Thanks!
>
> ~JFo

Revision history for this message
Daniel T Chen (crimsun) wrote :

On Mon, Apr 26, 2010 at 10:55 AM, fishor wrote:
> May I ask why?. Ubuntudevs will newer fix it.

Assuming you meant "never" there, that's a pretty bold statement to make.

> Or you will do it?

Why do you think more information was requested?

> You can reproduce it on most systems. Plug speakers with amplifier set
> it to 0dB and poweroff your PC.

I certainly can't reproduce it, but my hardware isn't necessarily your
hardware. So really, please work with us.

Revision history for this message
Oleksij Rempel (olerem) wrote :

Am Montag, den 26.04.2010, 16:18 +0000 schrieb Daniel T Chen:
> > Or you will do it?
> Why do you think more information was requested?

Because of bad experience with launchpad. Mostly i get questions but newer fixes.
If i can, i fix things my self and send patches upstream. It is easier
than using launchpad, it frustrate me.

> > You can reproduce it on most systems. Plug speakers with amplifier set
> > it to 0dB and poweroff your PC.
>
> I certainly can't reproduce it, but my hardware isn't necessarily your
> hardware. So really, please work with us.

It's true. I will send more info after 1.5 moth, after i'll be back
home.
Every thing you'll find is my codec name and module i use, it is
standard ubuntu install.
What is you plan if it still broken?
If Im correct there is two ways to fix: kernel powermanagment, or
userspace workaround.

Regards,
 Alexey

Revision history for this message
Daniel T Chen (crimsun) wrote :

On Tue, Apr 27, 2010 at 11:09 AM, fishor <email address hidden> wrote:
> Because of bad experience with launchpad. Mostly i get questions but newer fixes.
> If i can, i fix things my self and send patches upstream. It is easier
> than using launchpad, it frustrate me.

Lots of us non-employees contribute to upstreams, so yes, our patches
tend to land upstream first.

> What is you plan if it still broken?
> If Im correct there is two ways to fix: kernel powermanagment, or
> userspace workaround.

If it's the symptom of "bang on powerdown," that's a driver bug, and
we need to fix it.

Revision history for this message
Francisco Veach (v64) wrote :

Experiencing this on a Dell Studio 14z, debug information from alsa-info.sh attached.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Francisco Veach, please file a separate bug using ubuntu-bug alsa-base.

Revision history for this message
BuF (pieterdebeuf) wrote :
Download full text (4.7 KiB)

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 ...

Read more...

Changed in linux (Ubuntu):
assignee: Ubuntu Audio Team (ubuntu-audio) → nobody
status: Incomplete → Confirmed
Revision history for this message
Oleksij Rempel (olerem) wrote :

Wow, i already forgot that this bug exist.

Revision history for this message
Délio Jesus (deliomblj) wrote :

Yes.. It still exists...
On 9 Oct 2013 07:31, "Thomas Hotz" <email address hidden> wrote:

> ** Changed in: linux (Ubuntu)
> Assignee: Ubuntu Audio Team (ubuntu-audio) => (unassigned)
>
> ** Changed in: linux (Ubuntu)
> Status: Incomplete => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/23984
>
> Title:
> Big bang on poweroff if sound device is enabled.
>
> Status in “linux” package in Ubuntu:
> Confirmed
> Status in “linux” package in Arch Linux:
> New
>
> Bug description:
> If power off and sound device is enabled it's make loud sound impuls
> wich can be
> dangerous for hardware.
> Kernel still can't disable sound devices before poweroff.
> Resolution: unload snd-* module before poweroff. amixer mute das't help.
> I made smole hack wich resole this problem on my laptop, it's may be
> wrong bat
> it's working:
> i aded "modprobe -r snd-maestro3" to halt script.
>
> Tested and working realy good.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/23984/+subscriptions
>

Revision history for this message
penalvch (penalvch) wrote :

Oleksij Rempel, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available (not the daily folder, but the one at the top) following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.13-rc4

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-kernel-logs needs-upstream-testing
Revision history for this message
dino99 (9d9) wrote :

#20 above not answered from 2 full years back; so no one seems to care about that problem anymore

Changed in linux (Ubuntu):
status: Incomplete → Invalid
affects: linux (Arch Linux) → linux (Ubuntu Linaro Evaluation Build)
Changed in linux (Ubuntu Linaro Evaluation Build):
status: New → Invalid
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.