MASTER storing ALSA mixer element values during shutdown hangs nondeterministically due to internal alsa-plugins pulse check

Bug #274995 reported by astroman
424
This bug affects 44 people
Affects Status Importance Assigned to Milestone
NetworkManager
Invalid
Undecided
Unassigned
alsa-utils (Ubuntu)
Fix Released
Medium
Daniel T Chen
Intrepid
Fix Released
Undecided
Unassigned
linux (Fedora)
Fix Released
Medium
linux (Gentoo Linux)
Fix Released
Medium
linux (Ubuntu)
Invalid
Undecided
Daniel T Chen
Intrepid
Invalid
Undecided
Unassigned
network-manager (Ubuntu)
Invalid
Medium
Unassigned
Intrepid
Invalid
Undecided
Unassigned
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned

Bug Description

SRU information follows:

Impact: A subset of users with a default Ubuntu 8.10 install (with libasound2-plugins installed) experience nondeterministic hangs of up to several minutes on shutdown (or startup) when the sound card's mixer control state is (re)stored. This hang is due to a variable, PULSE_INTERNAL, in the pulse ALSA plugin having a non-NULL value when amixer and alsactl are called so that PulseAudio is probed preferentially, triggering name resolution over potentially partially configured network interfaces.

Resolution: In the alsa-utils initscript, unconditionally export PULSE_INTERNAL=0 to prevent native ALSA applications from probing PulseAudio while querying and (re)storing sound card state.

Jaunty patch: http://launchpadlibrarian.net/19941444/alsa-utils_1.0.18-1ubuntu2.debdiff
Intrepid SRU patch: http://launchpadlibrarian.net/19941520/alsa-utils_1.0.17-0ubuntu3.debdiff

TEST CASE: From an active GNOME session in a default Ubuntu 8.10 install, choose to reboot or shutdown. Note the erratic hang while attempting to store ALSA's mixer control state.

Regression potential: No regressions have been identified in production, and only users with both pulseaudio and libasound2-plugins packages installed have the potential to experience this nondeterministic hang.

Original report follows:

Ubuntu 8.10 beta 4 version updated.
When going for reboot or shutdown the system freezes on shuting down alsa.
The only way is to use the power off button of the computer.

My laptop is Insys GameForce.8761SU

Chipset:
• SiS© 671DX + SiS968

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Description of problem:

If the snd_hda_intel module is loaded into the kernel (for example after
starting X), the computer will not power off when "poweroff" command is called.
My computer has an Asus P5GD1 motherboard.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Start computer at runlevel 5
2.Log in into X and play some sound just to be sure sound module is loaded
3.System -> Shut down.

Actual results:
The computer doesn't power off and hangs after a message "ACPI power down
called" is displayed.

Expected results:
The computer shoud poweroff

Additional info:

I added a 'modprobe -r snd_hda_intel' line in the stop) section of
/etc/init.d/kudzu and the computer shuts down correctly therafter.

Revision history for this message
In , David (david-redhat-bugs) wrote :

Changing to proper owner, kernel-maint.

Revision history for this message
In , Dave (dave-redhat-bugs) wrote :

A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed. See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Even with kernel-smp 2.6.18-1.22000.fc5 the problem persists. I tried booting
with the 'acpi=ht' boot option, but the system still doesn't poweroff, the only
thing changed is the last message printed: "System halted" instead of
"acpi_power_off called".
The only way to let the computer shutdown automatically is to call modprobe -r
snd_hda_intel somewhere during the shutdown process (I moved it from kudzu to
the halt script just after the "saving mixer settings" lines).

Revision history for this message
In , Stefan (stefan-redhat-bugs) wrote :

I can confirm the problem still exists in Fedora 7 with the Asus P5GD1
motherboard. I've had this annoying shutdown problem for five months and finally
I have found a workaround here, thanks Davide!! Unfortunately I found the bug
still exists in Fedora 8 Test 2 as well.

Revision history for this message
In , Jon (jon-redhat-bugs) wrote :

Changing version to F7 since that it the last released version that this problem
is reported in. You mention F8T2, does it exist in released F8?

Revision history for this message
In , Jon (jon-redhat-bugs) wrote :

*** Bug 212726 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

This bug is still present in F8 - kernel 2.6.23.9-85.fc8

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

Davide,

Could you try booting with acpi=off and then try powering off. Could you also
attach the following from a normal boot as separate attachments to this bug
(type text/plain):

# dmidecode
# lspci -vvxxx
dmesg

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Created attachment 291992
dmidecode, lspci and dmesg output

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Comment on attachment 291992
dmidecode, lspci and dmesg output

The system with acpi=off still does not power off.

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

Hello Davide,

Some more things to try:

Could you try unloading your vmware modules before powerdown. Could you also
attach the output (separate files please) of:

lsmod
/etc/modprobe.conf

Cheers
Chris

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Created attachment 292123
lsmod

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Created attachment 292124
/etc/modprobe.conf

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

(In reply to comment #11)
> Could you try unloading your vmware modules before powerdown.

It doesn't power off even without loading vmware and virtualbox modules.

the previous lsmod attachment is without vmware and vbox modules loaded and the
system did not power off.

Revision history for this message
In , Christopher (christopher-redhat-bugs) wrote :

Found the following which you should be able to use as a workaround:

If you edit /etc/init.d/halt and add “rmmod snd-hda-intel” this will unload the
module and poweroff completely.

I'm assigning anyway and adding ALSA blocker. Lowering severity and priority as
a workaround is available.

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

(In reply to comment #15)
> Found the following which you should be able to use as a workaround:
>
> If you edit /etc/init.d/halt and add “rmmod snd-hda-intel” this will unload the
> module and poweroff completely.

I'm already using that workaround since first reporting this bug, so it issn't a
big problem if it persists... :)

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Bug still present in Fedora 9 - kernel 2.6.25.3-18.fc9.i686

Revision history for this message
Luke Faraone (lfaraone) wrote :

What is the exact message that is displayed?

Revision history for this message
astroman (astrosousa) wrote :

The message is:

Shuting down ALSA...

The [OK] never apears... and freezes

Revision history for this message
astroman (astrosousa) wrote :

I notice that when I shutdown the network then this problem disapears and the pc shuts down normally.

My network is not operating correctly. How can I check for errors on this?

My internet connection is now very slow and cannot connect to several servers proprely, including the repositories servers. It happens both in ethernet and wireless.

I also notice that on the ethernet connection I notice several errors on:
Reception Errors, I have ethernet SIS 191 ubuntu 8.10‏.

any help?

Revision history for this message
Solitaire (bill-s0l) wrote :

Running a Dell Inspiron 8200 with Ubuntu 8:10 beta (Fully up to date)

Sound Card: Intel 82801CA-ICH3
Kernel : 2.6.27-5-generic

My network Wired and Wireless are fine.

Getting the "Shutting down ALSA..."
Have to wait 5 mins for ALSA to timeout for Shutdown to continue.

Revision history for this message
Alan Hartless (harty83) wrote :

Is anyone's sound actually working with this problem?

I've got the same problem and I just noticed that all I get when there is suppose to be sound is static. For example, play something with sound and all I hear is a scratchy noise.

Revision history for this message
Michael Rooney (mrooney) wrote :

I have had this happen as well on my Intrepid A5 install, Confirming.

Revision history for this message
Solitaire (bill-s0l) wrote :

@ Alan Hartless

My Audio is fine, no distortion or static to be heard.

Revision history for this message
Petrus Gomes (petrusgomes) wrote :

same problem here...Desktop

updated from hardy to 8.10 alpha6
issue with "shutting down ALSA" started with last beta updates...(kernel 2.6.27.5 and 2.6.27.6 generic)

sound and network are OK.

Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

Revision history for this message
dieterv (dieterv77) wrote :

Just wanted to report that i'm seeing the same problem

Updated to 8.10 beta from up to date 8.04

sound card: Multimedia audio controller: C-Media Electronics Inc CM8738
kernel: 2.6.27-5-generic

I am able to get sound via ALSA, but shutdown hangs on "shutting down ALSA"

Feel free to let me know if there is other info i can provide.

Revision history for this message
Michael Rooney (mrooney) wrote :

dieterv and anyone else who can duplicate this bug (I've only had it happen once), you can help by removing the 'quiet' and 'splash' options from your boot entry (I think you hit 'e' when the grub timer is going to edit the option). Then when you shut down, it should hopefully give some more output when it gets stuck, such as perhaps the step it is getting stuck on. If you do this and post the output here, we will have a lot more information to go on. Thanks!

Revision history for this message
Solitaire (bill-s0l) wrote :

Mike

I removed 'quiet' and 'splash' then rebottede the machine twice.
Both times shutdown pauses on 'ALSA' for 5 mins before continuing.

No other message / error / warning was shown.

Anyone know if the shutdown messages kept in a logfile? or is logging stopped before that point?

Revision history for this message
Michael Rooney (mrooney) wrote :

Okay, if there is no extra info gained without quiet splash, I will mark to Confirmed until someone else can suggest what other information might be useful. I'll ask around.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi All,

First, this bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . This bug should be classified against the 'linux' kernel package so I am reassigning it there.

The second thing to note is that even though everyone here may be experiencing the same issue, it really is likely hardware specific. Unless you have the same hardware as the original bug reporter you should probably open a separate report.

@astroman, since you are the original bug reporter, per the kernel team's bug policy, can you please attach the following information. Please be sure to attach each file as a separate attachment.

* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . I'm also curious if you try booting with the "reboot=b" boot option if that helps at all. Thanks again and we appreciate your help and feedback.

Revision history for this message
Michael Rooney (mrooney) wrote :

Hi Solitaire, thanks for filing a separate bug as Leann suggested, I'll link it here for reference, bug 280305.

Revision history for this message
Alan (mrintegrity) wrote :

Please note that this bug does not appear to be hardware specific, as previously noted, as it is seen with at least the following hardware configurations:

Intel Corporation 82801CA/CAM AC'97 Audio Controller [8086:2485] (rev 02) (Cirrus Logic Device)
VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller
ATI Technologies Inc SBx00 Azalia (Intel HDA)
Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

The alsa-utils init script does not appear to be the culprit either as it starts and stops fine without problem although it is killing this script that will allow the shutdown process to continue.

In the Alpha6 release it was possible to switch to a virtual console, log in and "killall -9 K50alsa-utils" which immediately allowed the shutdown to continue however in the current beta it seems that keyboard login is disabled earlier and this is no longer possible, forcing the user to wait for the script to time out.

I installed ubuntu from an Alpha 6 desktop CD image and immediately ran update manager to get the latest packages.

Cheers,

Alan

Revision history for this message
Alan (mrintegrity) wrote :

I changed the affected package to alsa-utils as it seems to be related to the init script for this package. Also set status as confirmed.

Changed in linux:
status: Incomplete → Confirmed
Revision history for this message
Josh Heidenreich (josh-sickmate) wrote :

Could this bug be related to x64 or does it effect 32 bit users as well?

Revision history for this message
Alan (mrintegrity) wrote :

I am on 32bit here.

Revision history for this message
Solitaire (bill-s0l) wrote :

I'm running 32 bit here as well.

Revision history for this message
Biji (biji) wrote :

32bit here.. probably when pulseaudio get hang but not crashes

Revision history for this message
eric.zhu5121 (simonz5121) wrote :

Same problem on my desktop with intel duo core 2. the mother board is asus p5ne-sli. the audio is using nvidia mcp55 hda.
each time when shutdown computer, it hangs there at ALSA. My workaround currently is to remove the pulseaudio package, then it's ok.

Revision history for this message
karlatsaic (krudnick) wrote :

I upgraded to 8.10 and have the exact same issue on a 32-bit Compaq Presario 2100 (circa 2003)

Revision history for this message
stu (sgeorge) wrote :

I'm on amd64 and same, I have an Asus xonar dx. After about 5 minutes I get something like "bad switch with amixer" and then after about another 5 minutes machine shuts down.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Same here with my Acer 5520G. Opened duplicate bug #285589 before finding this one. Weird bug.

Revision history for this message
J (jcastillob) wrote :

Same here with Intel 82801CA/CAM AC'97 Audio Controller, but I think the hang is network related: running "ifconfig wlan0 down" before shutdown allows the computer power off without any problem.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

So, it looks like power off is blocked by a problem to "kill" wifi connection process. Could it be related in some way to network manager ?

http://changelogs.ubuntu.com/changelogs/pool/main/n/network-manager/network-manager_0.7~~svn20081015t224738-0ubuntu1/changelog

"* new upstream snapshot Wed 2008-10-15 22:47:38 +0000 (bzrrev 3641)
  - a few more follow up fixes for routing routing/subnet/vpn handling."

Could be the culprit here ?!

Revision history for this message
Lê Kiến Trúc (le-kien-truc) wrote :

Insert
ifconfig wlan0 down
at the begin of /etc/init.d/alsa-utils to turn off wireless before shutdown alsa.

Revision history for this message
Lister (jojo-ditadres) wrote :

Same problem here on an AMD64 64bit system.
However, Network-manager is not installed and no wlan in use/availabe.

If I bring eth0 down before restarting I do not have to wait the 5 minutes for ALSA to shutdown.

Seems like it is not wifi or network-manager related...

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Le Kien : your trick doesn't work for me.

Lister : laptop or fixed pc ?

If it is not wifi or network related, why does some people fix this bug by tweaking network connections ?

Revision history for this message
Lister (jojo-ditadres) wrote :

Fixed pc, a MSI K9N SLI, 6400+.
Tried the trick from Le Kien truc several times now with eth0 instead of wlan0 and it works everytime. If I don't use it, I have to wait a long time for a reboot.
So it does seem to be related to networking somehow.

Revision history for this message
Lister (jojo-ditadres) wrote :

btw, I do:
sudo ifconfig eth0 down
on the commandline, not via a line in /etc/init.d/alsa-utils.

Revision history for this message
bitstate (bitstate) wrote :

The fix with shuting down the network interface is confirmed. I experience the same problem with haning on alsa shutdown on a hp laptop with a usb 3g modem. But if i disconnect it using the network manager menu option ( below the list of available networks when left clicking on the network manager icon ) prior to shuting down the laptop it shuts down normally.

Revision history for this message
J (jcastillob) wrote :

The trick works inserting "ifconfig wlan0 down" (or the active network interface in use) at the begining of the stop) section of /etc/init.d/alsa-utils.
I'm sure it's not network-manager related, my laptop also hangs uninstalling the package and starting wifi via wicd.
Btw, if your alsa-mixer is always mute at system start, and does not remember the last settings, the trick also fixes it.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Well, it looks like it is related to network in a way.

I looked at var/log/syslog while trying to shutdown and when i asked for shutdown, I got this :

Oct 20 11:07:10 fred-laptop kernel: [ 214.557848] __ratelimit: 6 callbacks suppressed
Oct 20 11:07:10 fred-laptop kernel: [ 214.557875] compiz.real[5938]: segfault at 120 ip 000000000041024e sp 00007fff3fabc160 error 4 in compiz.real[400000+3b000]
Oct 20 11:07:11 fred-laptop init: tty4 main process (4660) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty5 main process (4661) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty2 main process (4667) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty3 main process (4669) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty6 main process (4670) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty1 main process (5729) killed by TERM signal
Oct 20 11:07:11 fred-laptop NetworkManager: <info> (wlan0): device state change: 8 -> 3
Oct 20 11:07:11 fred-laptop NetworkManager: <info> (wlan0): deactivating device (reason: 38).
Oct 20 11:07:11 fred-laptop NetworkManager: <info> wlan0: canceled DHCP transaction, dhcp client pid 6104
Oct 20 11:07:11 fred-laptop kernel: [ 215.153613] wlan0: disassociating by local choice (reason=3)
Oct 20 11:07:11 fred-laptop kernel: [ 215.179213] wlan0: authenticate with AP 00:1a:6b:1b:15:e5
Oct 20 11:07:11 fred-laptop kernel: [ 215.186362] wlan0: authenticated
Oct 20 11:07:11 fred-laptop kernel: [ 215.186374] wlan0: associate with AP 00:1a:6b:1b:15:e5
Oct 20 11:07:11 fred-laptop kernel: [ 215.188443] wlan0: RX AssocResp from 00:1a:6b:1b:15:e5 (capab=0x411 status=0 aid=1)
Oct 20 11:07:11 fred-laptop kernel: [ 215.188449] wlan0: associated
Oct 20 11:07:11 fred-laptop NetworkManager: <WARN> check_one_route(): (wlan0) error -34 returned from rtnl_route_del(): Sucess
Oct 20 11:07:11 fred-laptop avahi-daemon[4926]: Withdrawing address record for 192.168.1.12 on wlan0.
Oct 20 11:07:11 fred-laptop avahi-daemon[4926]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.12.
Oct 20 11:07:11 fred-laptop avahi-daemon[4926]: Interface wlan0.IPv4 no longer relevant for mDNS.
Oct 20 11:07:11 fred-laptop kernel: [ 215.205718] wlan0: disassociating by local choice (reason=3)

And a little later :

[Bluetooth shutdown]
Oct 20 11:07:16 fred-laptop kernel: [ 219.787126] Bluetooth: RFCOMM ver 1.10
Oct 20 11:07:16 fred-laptop avahi-daemon[4926]: Got SIGTERM, quitting.
Oct 20 11:07:17 fred-laptop exiting on signal 15

And when I took a screenshot, it was blocked on acpi exiting.

So I'm kinda lost. Anyway, I'm adding the log I have.

Revision history for this message
Gianni Centonze (gianni-centonze) wrote :

Same problem here on a fixed Pc Dell Vostro 200, audio Intel. The "shutting down alsa" takes several minutes before halt the pc. At th startup instead, some times alsa won't start.

Revision history for this message
astroman (astrosousa) wrote :

Hi,
sorry for the late reply.

I send in attachment the log required, please take note that i made all the updates.
The freeze is now less frequent, and i notice that disabling the network will prevent the freeze to happen.
 This
I have also a diferent bug. the nm-applet do not show up and i had to install a previous version to apear in order to disable the network through it.

Another thing that may help, or not, my boot on the kernel only operates using the nohz=off option.
I notice that Ubuntu is quite slow opening software and operating it. This is strange since the computer his new:

Chipset:
• SiS© 671DX + SiS968
Intel Pentium Dual Core T2390 1.86Mhz
Nvidia 9300M GS 256Mb
4Gb RAM

Revision history for this message
Rodney Gordon II (meff) wrote :

Confirming that this bug still exists via asus-utils 1.0.17-0ubuntu2 on a SB Audigy2.

Revision history for this message
humufr (humufr-deactivatedaccount) wrote :

still exist on a fresh update. Less that 10 days to fix it...

Revision history for this message
varanus (bobiras12) wrote :

i had the same problem with alsa at shutting down, i had to wait 3-4 minutes to reboot or shutdown. i tried the same thing with the network manager. Before rebooting/shutting down pc i switched to offline mode from the network manager and it shut/rebooted normally without any problems.

Revision history for this message
frapell (frapell) wrote :

This started to happen to me a couple of days ago... i'm using 8.10 (amd64).
anyway, i changed the first line of the /etc/init.d/alsa-utils file to:
#!/bin/sh -x

so i noticed when "freezing" at shutdown, actually does not freeze, is doing something... now i don't know if all that, is logged somewhere, but i tried doing a sudo /etc/init.d/alsa-utils stop and copying the output to this file i'm attaching.

The part that goes from line 75 to line 190 is the part that takes forever... at least when the system is going to reboot (or shutdown)... i'm seeing each part of that (Master, PCM, Synth, etc) that takes like 30 seconds. (when doing /etc/init.d/alsa-utils stop didn't happened, ie it took like 5 seconds to finish everything)

ok, hope this helps...

Regards,
Franco

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Could be related to version 1.0.17-0ubuntu1 (replaced then by 1.0.17-0ubuntu2)

1.0.17-0ubuntu1
Superseded in intrepid-release on 2008-09-25

alsa-utils (1.0.17-0ubuntu1) intrepid; urgency=low

  * New upstream release.
  * Merge from Debian unstable.
  * Packaging:
    - no alsaconf;
    + lpia arch, maintainer and Vcs fields munging;
    + toggle additional mixer elements in initscript;
    + asoundconf{,.1}: Update asoundconf-trunk from bzr adding
      {,un}set-oss convenience macros as per requests for OSSv4
      routing.
    + Mute 'Jack Detect' as per user request.
  * debian/control: Updated libasound2 build dep.
  * debian/init: Mute the PC speaker volume by default when any card's levels
    are sanified.

Maybe alsaconf removing is guilty here ?!

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

alsaconf cannot be the culprit, because it does not do anything on system shutdown. It is a utility to probe free resources in an effort to load the appropriate ALSA driver. Furthermore, alsaconf has not been shipped in Ubuntu's alsa-utils package since dapper (6.06).

NOTE: THE SUGGESTION BELOW IS ONLY FOR TESTING PURPOSES!!

Guys/gals, please try commenting out lines 50-52 of /etc/init.d/alsa-utils:

while [ ! -d /usr/bin -o ! -d /var/lib/alsa ]; do
        sleep 0.2
done

NOTE: THE SUGGESTION ABOVE IS ONLY FOR TESTING PURPOSES!!

The potential regression with the above three lines commented out is that ALSA mixer state is not stored or restored correctly. (On the other hand, PulseAudio, on desktop systems, restores volumes for sinks and sources upon GNOME session login, so the effect is mitigated.) However, the shutdown sequence should no longer hang IF AND ONLY IF alsa-utils's test condition is faulty (which is what we're attempting to isolate).

Changed in alsa-utils:
assignee: nobody → crimsun
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Daniel T Chen (crimsun) wrote :

Not a kernel issue.

Changed in linux:
status: New → Invalid
Revision history for this message
Daniel T Chen (crimsun) wrote :

To follow on, I don't anticipate the script failing due to /var/lib/alsa or /usr/bin being unavailable. Rather, I suspect alsactl is bugging out, so please also change line 84 from:

if MSG="$(alsactl store $CARD 2>&1)" ; then

to:

if MSG="$(alsactl -d store $CARD)" ; then

(Note the addition of the debugging option and the removal of the stdout and stderr redirection.)

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Daniel : I was just guessing. But I think it is a network (or network manager) related issue.

I opened another bug, #286308 because I think - and I could be wrong - that Network manager is kinda culprit here.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote :

I didn't do the fix as reported by Daniel, because I my case the bug is surely in another part of the script. In my case it's in mute_and_zero_levels_on_card() called during mute_and_zero_levels. I've added debugging to test.

In the for loop all kind of devices are muted and almost all entries take a few seconds. The error I get is "amixer: Unable to find simple control '....', 0". The first error I get is "Synth", so amixer works fine for Master, PCM etc which are first in the list. For non working devices, amixer wait a couple of seconds and the whole for loop takes ages.

So, (in my case) the real problem is that amixer is too slow if non-existing devices are muted. By the way, the step store_levels() takes only a few seconds.

Revision history for this message
humufr (humufr-deactivatedaccount) wrote :

a bug which has the effect to not stop correctly and not unmounted the partitions cleanly is just a medium level one?????

I'm more and more sceptic about Intrepid... I don't think that I'll install it on my computer. I have it on my external hard drive to test, I report different bug and none are taking care and one is because I was unable to start on the new kernel (post 2.6.27-3) and this one which hang the shutdown...

Revision history for this message
Michael Rooney (mrooney) wrote : Re: [Bug 274995] Re: shutdown freeze on alsa shutdown

Nicolas, keep in mind that while the issue is large for us
experiencing it, it is only affecting a small percentage of users, not
to mention it seems to have an easy workaround (just wait a few
minutes, or use the magic sysreq keys). See
https://wiki.ubuntu.com/Bugs/Importance for more information regarding
Importances. Though if you think from there you can make the case for
High importance, feel free to do so.

Revision history for this message
humufr (humufr-deactivatedaccount) wrote : Re: shutdown freeze on alsa shutdown

Perhaps it's a small percentage but it's a small percentage that are doing an effort to test Intrepid and the fact that the shutdown will be badly done are increasing the risk for the file system and by consequence for the data of the user. Don't think that anyone will wait 10 or 15 minutes (at least for me it's the time I wait for nothing) to have a system cleanly stop. The magic sysreq keys don't work on my laptop (an ibm one), never did, so it's not a solution and I don't think that a lambda user will now how to use them (a new linux user for example) and that he will appreciate this kind of behaviour but perhaps I'm doing a mistake... I don't think so.

I'm sorry to insist but the quality, one week before the launch, of intrepid is not good. I'm using linux since 96 and ubuntu since the first version. I pass all my lab on it but honestly I cannot vouch for this version and the fact that the priority of a bug like this is just decided because of the small percentage of people affected is a little bit strange. There are a big risk to mess up the filesystem (hard shutdown has never been good for it!) but it's seems that it's not important now...

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

If you're not happy with Ubuntu, you're free to go. Beta is beta, and you're not tied to ubuntu after all.

Do you have a gun on your head with somebody to force you to upgrade to intrepid ?

I think I'm facing another bug (long shutdown but a key pressed help a lot), and I don't have any mess on my computer.

Instead of crying, why don't you try to help and test some of the workaround provided before ?

Just my 2 cents of course. I'm using linux only since 1997.

Revision history for this message
humufr (humufr-deactivatedaccount) wrote :

Sorry to have tried to repport bug and to improve the quality of this distribution. I am really sorry to tried to be a little bit helpful for new user. I completly forgot how it's cool to loose data it's perhaps I'm thinking that it's a big deal and not something a little bit painful.

And yes when I'm seeing this king of very nice message I'm thinking to switch to another distribution. Personally I'm not in hurry myself but I'll probably do a bad publicity for Intrepid if this kind of problem are not solved for every new user who will ask for advice.

Revision history for this message
Luke Faraone (lfaraone) wrote : Re: [Bug 274995] Re: shutdown freeze on alsa shutdown

On Thu, Oct 23, 2008 at 10:22, FredBezies <email address hidden> wrote:

> If you're not happy with Ubuntu, you're free to go. Beta is beta, and
> you're not tied to ubuntu after all.
>
> Do you have a gun on your head with somebody to force you to upgrade to
> intrepid ?
>

To maintain a respectful atmosphere, please follow the code of conduct -
http://www.ubuntu.com/community/conduct/ . Bug reports are handled by
humans, the majority of whom are volunteers, so please bear this in mind.

Revision history for this message
Rafik Elouerchefani (rafik) wrote : Re: shutdown freeze on alsa shutdown

Hello,

I'm also affected by this shutdown issue and I also hear no sound.
I tried the changes suggested by Daniel. Nothing changed.

In : System > Preferences > Sound, when I hit thetTest button while "ALI 5451 ALI 5451 (Alsa)" is selected I have this error :

audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink profile=music: Could not open audio device for playback.

I hear no sound when choosing any other option including PulseAudio.

It may be related to something else than to alsa-utils.

Version : 8.10 : 2.6.27-7.13-generic

In "sudo lspci -v":
00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)
 Subsystem: Compaq Computer Corporation Device 005a
 Flags: bus master, medium devsel, latency 64, IRQ 11
 I/O ports at 3000 [size=256]
 Memory at a0080000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: [dc] Power Management version 2
 Kernel driver in use: ALI 5451
 Kernel modules: snd-ali5451

Thanks

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Luke : sorry for being "rude", but I answered to the kind of unuseful comment. If I had to leave ubuntu, I will. But Intrepid will be in some part a bad release, such as the worst idea I've seen for a long time : removing ath5k module from kernel because it helped me having wifi working flawlessly.

See bug #288148 for ath5k issue.

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

Please replace /etc/init.d/alsa-utils with this version, and attempt to reproduce the bug during reboot/shutdown.

Changed in alsa-utils:
status: Incomplete → In Progress
Revision history for this message
dAF2000 (david-daf2000-nl) wrote :

The alsa-utils file by Daniel didn't work for me.
I didn't add extra debugging so I don't know now if the "amixer $CARDOPT sget "$1" >/dev/null 2>&1" causes the delay now.

Some more info:
Running /etc/init.d/alsa-utils stop from the command line while Ubuntu is running causes no delay. Also, I thought it used to work a long time (months) ago so can we check the differences between the versions? (Or can you tell me how to view previous alsa-utils versions? I'm a Linux developer too, but not a Ubuntu developer ;))

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

@dAF2000 We may be able to work around the hang by a more hackish method that doesn't test for the existence of the problematic simple controls. Please try the newer attached initscript.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote : Re: [Bug 274995] Re: shutdown freeze on alsa shutdown

That one didn't work too. It may take some time for me to have time to
add debugging again and to see if the "amixer set" command itself or
just the "amixer scontrols" causes the delay. Unless you are really sure
we can use the return value of "amixer scontrols" to check if a channel
is present.

Daniel T Chen wrote:
> @dAF2000 We may be able to work around the hang by a more hackish method
> that doesn't test for the existence of the problematic simple controls.
> Please try the newer attached initscript.
>
> ** Attachment added: "alsa-utils"
> http://launchpadlibrarian.net/18823843/alsa-utils
>

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: shutdown freeze on alsa shutdown

I am positive amixer -c $1 scontrols does what I intend (which is to dump that card's enumerated simple controls).

At this point, I am unlikely to find any alsa-utils tool as the culprit, particularly since the entire sequence works without delay (i.e., as expected/normally) on many machines /and/ does not manifest the reported symptom when invoked during an interactive session /not/ associated with shutdown/rebooting. The chronological proximity of the reported symptom to network-related teardown does not seem coincidental.

Changed in alsa-utils:
status: In Progress → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote :

I am providing a tentative ordering fix via my PPA (https://edge.launchpad.net/~crimsun/+archive). Please test.

Revision history for this message
Simone Malacarne (s-malacarne) wrote :

I can confirm this bug still exist in RC, update from 8.04, 64bit

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

Simone, you'll need to try my test package in the PPA.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote : Re: [Bug 274995] Re: shutdown freeze on alsa shutdown

Too bad, it didn't work (I've reverted the alsa-utils script to the
original one).

Daniel T Chen wrote:
> I am providing a tentative ordering fix via my PPA
> (https://edge.launchpad.net/~crimsun/+archive). Please test.
>
> ** Attachment removed: "alsa-utils"
>
> http://launchpadlibrarian.net/18824075/alsa-utils
>

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: shutdown freeze on alsa shutdown

@dAF2000 Try downing all network interfaces (except lo) before shutting down.

Revision history for this message
Herman Jongkind (herman-jongkind) wrote :

I experience the same bug (Dell Dimension 9150, audio controller Intel 82801G). Downing my eth0 network interface was indeed the solution.

Revision history for this message
Syam (jhuwette) wrote :

Have the same problem on an A6JM Asus Laptop : Shutdown process freeze on Alsa.
Upgraded from 8.04 LTS to 8.10 RC.

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

Can everyone still experiencing this bug please try the ~ppa2 deb from my PPA (https://edge.launchpad.net/~crimsun/+archive)?

Revision history for this message
Regular User (dot.ru) wrote :

It seems that the bug: https://bugs.launchpad.net/ubuntu/+bug/288863 that I filed is a duplicate of this so.. confirmed.

Daniel, your fix didn't work.

Revision history for this message
Biji (biji) wrote :

I will try from PPA now

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

Ok, I think we can rule out alsa-utils as the culprit, then. I'm reassigning to network-manager.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

That's what I what saying since my first comment. Sorry for having be right since the beginning. So another bug I opened could help in a way ? See #286308 but using NM version used since mid-september ?

Just guessing of course.

Revision history for this message
Suzan (suzan72) wrote :

"The trick works inserting "ifconfig wlan0 down" (or the active network interface in use) at the begining of the stop) section of /etc/init.d/alsa-utils."

J's trick worked for me, Laptop now shuts down normal. I've added two lines "ifconfig wlan0 down" and "ifconfig eth0 down".

My alsa-utils is detached, please have a try with it.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote :

Suzan's ifconfig trick does indeed work! I also got some libpulse updates from Daniel's repository so I tried with and without the ifconfig in alsa-utils. Without gives the shutdown delay, with does work fine.

Still unclear to me why the network interface influences alsa. If all is up and running (so network interfaces not shut down), shutting down alsa within Gnome works fine.

A wild guess:
- either the shut down of Gnome (a few steps before) is not complete. The nm resets the network to an initial state but does not shutdown the interfaces.
- or there's a nasty dependency between alsa and nm. For some reason alsa needs a fully configured network, or no network at all. A half configured network (up, but no IP address) causes delays for each control.

Just a guess of course ;)

Revision history for this message
Biji (biji) wrote :

Hi confirmed this issue because of networking .. I tried to shutdown without ethernet cable plugged from start... no problem....
but when i tried to shutdown after acquiring network address... alsa hangs at shutdown

Revision history for this message
Regular User (dot.ru) wrote :

Suzan's fix worked. But the sound didn't work when I first log in. I had to go to 'open volume control' and un-mute the PCM. No big deal, I had to do this before on the betas for no apparent reason but I thought it was worth comment on it.

Now hoping that this fix gets to the final release....

Revision history for this message
Regular User (dot.ru) wrote :

dAS2000: "Still unclear to me why the network interface influences alsa."

There seems to be some kind of relation between some sound cards and ethernet/wireless interfaces. I don't know much about hardware but I use to have problems on Vista because of this, for example, if I didn't have the right wireless card driver I couldn't get the sound working (or vice versa?).

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: storing mixer element values during shutdown hangs nondeterministically if wireless interfaces are still up

Would everyone who experienced this symptom please include the network interfaces in the affected machines?

Changed in network-manager:
assignee: crimsun → nobody
Revision history for this message
SabreWolfy (sabrewolfy) wrote :

Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

Hardy and Intrepid incorrectly use the R8169 driver. The shutdown problem certainly occurred with the (default) R8169 driver. Did not test the R8168 driver.

Revision history for this message
SabreWolfy (sabrewolfy) wrote :

Ah, just noticed that other are experiencing the problem on wireless networks cards. As the previous post indicates, it also occurs on wired connections.

Revision history for this message
frapell (frapell) wrote :

Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 03)
Ethernet controller: nVidia Corporation MCP67 Ethernet (rev a2)

I do not use the wired network, but i list it here anyway.

Revision history for this message
frapell (frapell) wrote :

sorry, forgot to tell, i'm using the 'wl' driver with it

Revision history for this message
Regular User (dot.ru) wrote :

Would this be fixed for the final release or will it fall on a "bureaucracy hole"?

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I'm confirming this bug. I'm going to spend some time testing the reported tweaks and see if they fix my problem. If they do I'll post back.

Revision history for this message
Herman Jongkind (herman-jongkind) wrote :

The same bug with an Intel Corporation 82573L Gigabit Ethernet Controller (rev01)

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

I'm confirming that adding the line "ifconfig wlan0 down" fixed this problem for me as well. I'm using a Gateway M-7315u laptop.

Revision history for this message
Biji (biji) wrote :

04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
06:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express (rev 02)

In my case, i'm only using ethernet.. not wifi but wifi driver is active

Revision history for this message
Dirk Kurfuerst (kurfuer) wrote :

I can confirm adding the line "ifconfig ath0 down" fixed this problem for me as well. Lenovo Z60t/Atheros AR5212

Revision history for this message
bitstate (bitstate) wrote :

In my case the network connection was from a usb connected 3g "dongle", the "Huawei E220" so the network hardware itself should not be directly connected to the sound hw.

Adding the ifconfig ppp0 ( if i remember correctly ) down in the alsa shutdown script fixed the problem.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote :

07:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller (rev 12)
08:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

wireless driver: iwlagn

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

If it could help :

05:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
 Subsystem: AMBIT Microsystem Corp. Device 0428
 Flags: bus master, fast devsel, latency 0, IRQ 19
 Memory at f2200000 (64-bit, non-prefetchable) [size=64K]
 Capabilities: <access denied>
 Kernel driver in use: ath5k_pci
 Kernel modules: ath_pci, ath5k

00:0a.0 Ethernet controller: nVidia Corporation MCP67 Ethernet (rev a2)
 Subsystem: Acer Incorporated [ALI] Device 0126
 Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 2300
 Memory at f2688000 (32-bit, non-prefetchable) [size=4K]
 I/O ports at 30f8 [size=8]
 Memory at f2689c00 (32-bit, non-prefetchable) [size=256]
 Memory at f2689800 (32-bit, non-prefetchable) [size=16]
 Capabilities: <access denied>
 Kernel driver in use: forcedeth
 Kernel modules: forcedeth

00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)
 Subsystem: Acer Incorporated [ALI] Device 0126
 Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21
 Memory at f2680000 (32-bit, non-prefetchable) [size=16K]
 Capabilities: <access denied>
 Kernel driver in use: HDA Intel
 Kernel modules: snd-hda-intel

Revision history for this message
Biji (biji) wrote :

Hi, found the bug ^^ hope this is right
alsactl tries to resolve ip address using dns which at this point dns can not be contacted (disconnected from internet etc.)

Luke Faraone (lfaraone)
Changed in network-manager:
status: Confirmed → Triaged
Revision history for this message
hveeramani (pseudomonas) wrote :

I can absolutely confirm the same problem also with the Daily Build that I installed on October 25, 2008. I installed it on a Acer Travelmate 2312 and I have the same problem. I am forced to shut down the system by hitting the power button on the notebook. it consistently stops after ' * Stopping firewall' and then actually pauses for three minutes, whilst displaying ' * Shutting down ALSA...'. Hitting the power switch once, just displays, Stopping Gnome Display...

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Biji : how to fix it ? Because it will be great to see this bug dead ! Which files to tweak and how ? Thanks.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

The work around adding "ifconfig wlan0 down" worked for me, but after the updates last night, that work around stopped working.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

I added the line to alsa-utils but it didn't work for me after the first
time. Can someone please look at the alsa-utils file I have attached and
let me know if I did it right?

Daniel T Chen wrote:
> ** Summary changed:
>
> - storing mixer element values during shutdown hangs nondeterministically if wireless interfaces are still up
> + storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up
>
>

Revision history for this message
Regular User (dot.ru) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

@Jeremy: You did it wrong, is at the start of the stop section, it looks like this 'stop)' (without the '). Also, remember to replace the interface with your interface.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

@ RPGMaker: Thanks! It's working fine now. :)

rpgmaker wrote:
> @Jeremy: You did it wrong, is at the start of the stop section, it looks
> like this 'stop)' (without the '). Also, remember to replace the
> interface with your interface.
>
>

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Jeremy : sorry to be the "bad" guy here, but this tweak doesn't work for me. It is stuck until I press a key. Weird.

Revision history for this message
Regular User (dot.ru) wrote :

@fredbezies: Have you tried the fix..? It seems to work with everybody so far...

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Of course, i tried it. And it always wait on shutdown until I press a key. Weird.

And with both eth0 and wlan0 down ifconfig lines.

My ifconfig list :

"fred@fred-laptop:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:38:74:b5:a7
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
          Interruption:252 Adresse de base:0xa000

lo Link encap:Boucle locale
          inet adr:127.0.0.1 Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          Packets reçus:192 erreurs:0 :0 overruns:0 frame:0
          TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          Octets reçus:11824 (11.8 KB) Octets transmis:11824 (11.8 KB)

wlan0 Link encap:Ethernet HWaddr 00:1e:4c:9f:d6:94
          inet adr:192.168.1.12 Bcast:192.168.1.255 Masque:255.255.255.0
          adr inet6: fe80::21e:4cff:fe9f:d694/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Packets reçus:64603 erreurs:0 :0 overruns:0 frame:0
          TX packets:52819 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:77436677 (77.4 MB) Octets transmis:7304087 (7.3 MB)

wmaster0 Link encap:UNSPEC HWaddr 00-1E-4C-9F-D6-94-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)"

Revision history for this message
Solitaire (bill-s0l) wrote :

Affected network card details:

02:00.0 Ethernet controller [0200]: 3Com Corporation 3c905C-TX/TX-M [Tornado] [10b7:9200] (rev 78)

I've added the shutdown line to my alsa-utils file hopefully it will work.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Fred: Try posting your file as an attachment here so we can see if you
did it right.

FredBezies wrote:
> Jeremy : sorry to be the "bad" guy here, but this tweak doesn't work for
> me. It is stuck until I press a key. Weird.
>
>

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Here is file needed. But can anyone could tell me if they have one or many wifi access key, please ?

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Fred, it looks correct to me. If you use more than one network type, be
sure to add them all.

FredBezies wrote:
> Here is file needed. But can anyone could tell me if they have one or
> many wifi access key, please ?
>
> ** Attachment added: "alsa-utils"
> http://launchpadlibrarian.net/18937342/alsa-utils
>
>

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

I only have eth and wlan network on my computer. If I enter ifconfig, it gives me :

fred@fred-laptop:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:38:74:b5:a7
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
          Interruption:252 Adresse de base:0xc000

lo Link encap:Boucle locale
          inet adr:127.0.0.1 Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          Packets reçus:22651 erreurs:0 :0 overruns:0 frame:0
          TX packets:22651 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          Octets reçus:3473013 (3.4 MB) Octets transmis:3473013 (3.4 MB)

wlan0 Link encap:Ethernet HWaddr 00:1e:4c:9f:d6:94
          inet adr:192.168.1.12 Bcast:192.168.1.255 Masque:255.255.255.0
          adr inet6: fe80::21e:4cff:fe9f:d694/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Packets reçus:453460 erreurs:0 :0 overruns:0 frame:0
          TX packets:347922 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:393893814 (393.8 MB) Octets transmis:41246699 (41.2 MB)

wmaster0 Link encap:UNSPEC HWaddr 00-1E-4C-9F-D6-94-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)

Do I have to had wmaster0 in the list ?!

Revision history for this message
Jaybob32 (jaybob32) wrote :

Just confirming, adding the "ifconfig eth0 shutdown" to alsa-utils also worked for me.

Marvell Technology Group Ltd 88E8056 PCI-E Gigabit Ethernet Controller
I'm using 8.10 RC amd64

On a side note I can now restart/shutdown from the toolbar button. I previously had to logout and restart or gdm would hang before I got to the ALSA hang. (pressing the power button once would move me past GDM and on to the ALSA hang. At that point only ALT>SYS RQ>R S E I U B would restart without a cold boot)

Revision history for this message
CedricD (cedricd-cedricd) wrote :

i have the same problem, solved by the trick

Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
Ethernet controller: VIA Technologies, Inc. VT6105/VT6106S [Rhine-III] (rev 8b)
Network controller: Intersil Corporation ISL3890 [Prism GT/Prism Duette]/ISL3886 [Prism Javelin/Prism Xbow] (rev 01)

Revision history for this message
Alessandro Sivieri (scattino) wrote :

Same problem here on 8.10 RC (installed yesterday, october 26), hangs on shutting down alsa; I am going to try the trick.
I am on an Asus A6000, sound card (from lspci):

00:02.7 Multimedia audio controller [0401]: Silicon Integrated Systems [SiS] AC'97 Sound Controller [1039:7012] (rev a0)
        Subsystem: ASUSTeK Computer Inc. Device [1043:1103]
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64 (13000ns min, 2750ns max)
        Interrupt: pin C routed to IRQ 11
        Region 0: I/O ports at e400 [size=256]
        Region 1: I/O ports at e000 [size=128]
        Capabilities: <access denied>
        Kernel driver in use: Intel ICH
        Kernel modules: snd-intel8x0

Revision history for this message
Alessandro Sivieri (scattino) wrote :

Adding a new note: on my system, this bug happens only when booting with the realtime (-rt) kernel (the one in the official repository), when using the generic one everything seems fine.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

With as many people that are reporting this problem, shouldn't it be
reconsidered for a fix before Intrepids release?

Alessandro Sivieri wrote:
> Same problem here on 8.10 RC (installed yesterday, october 26), hangs on shutting down alsa; I am going to try the trick.
> I am on an Asus A6000, sound card (from lspci):
>
> 00:02.7 Multimedia audio controller [0401]: Silicon Integrated Systems [SiS] AC'97 Sound Controller [1039:7012] (rev a0)
> Subsystem: ASUSTeK Computer Inc. Device [1043:1103]
> Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 64 (13000ns min, 2750ns max)
> Interrupt: pin C routed to IRQ 11
> Region 0: I/O ports at e400 [size=256]
> Region 1: I/O ports at e000 [size=128]
> Capabilities: <access denied>
> Kernel driver in use: Intel ICH
> Kernel modules: snd-intel8x0
>
>

Revision history for this message
Regular User (dot.ru) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

@Jeremy: I agree, but this kind of things seems to happen a lot in the ubuntu community. Ubuntu releases are shipped with bugs already solved/fixed and wait until the next release. Sometimes they don't even get fixed so this is not the worst case scenario.

Revision history for this message
Alessandro Sivieri (scattino) wrote :

@rpgmaker: yes, I too think that not every bug can be solved in time, but from this page it seems that there are a lot of configurations in which this happens, and the impossibility to shut down the system (because if it hangs for more than 30 seconds, people will "hard shut down" it) is an important problem, IMHO.

One other thing: this bug is attached to the NetworkManager, but in my system I am not using it, that is /etc/init.d/NetworkManager is not started on boot, but with the -rt kernel it happened anyway.

Revision history for this message
Josh Heidenreich (josh-sickmate) wrote :

If this bug does not get fixed by release, will it at minimum get into the release notes under "known issues", something like:

Ubuntu takes about 5 minutes to shutdown on some systems because of an error in the network manager. This problem will be fixed after release. A temporary workaround is available (link)

Revision history for this message
Alexander Sack (asac) wrote :

can't see why NM is the problem here. Its the problem of the app itself that hangs during shutdown if interfaces are not up/down.

Changed in network-manager:
status: Triaged → Invalid
Revision history for this message
Alexander Sack (asac) wrote :

i think pulseaudio does networking ... so maybe this blocks on shutdown?

Changed in network-manager:
status: New → Invalid
Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

I read somewhere up that removing pulseaudio fixed the problem :

"eric.zhu5121 wrote on 2008-10-17: (permalink)

Same problem on my desktop with intel duo core 2. the mother board is asus p5ne-sli. the audio is using nvidia mcp55 hda.
each time when shutdown computer, it hangs there at ALSA. My workaround currently is to remove the pulseaudio package, then it's ok."

As bug was opened end of september, if PA is guilty, it could be related to some changes introduced in 0.9.10-2ubuntu4 or even in 0.9.10-2ubuntu3 version.

What about :

"pulseaudio (0.9.10-2ubuntu3) intrepid; urgency=low

  * Remove stop links from rc0 and rc6 (LP: #254254):
    - debian/rules: change DEB_UPDATE_RCD_PARAMS to
      start 25 2 3 4 5 . stop 15 1 ."

Just guessing, because using ifconfig tweak, I still have to press a key for a complete powerdown.

Revision history for this message
Regular User (dot.ru) wrote :

@Josh Heidenreich: There's no way for us to know. We haven't heard from any high ranked Canonical/community developer to know if that is what they're going to do and we are two days away from the final release.

Revision history for this message
hara (harak-iitm) wrote :

" ifconfig wlan0 down" shows errors

wlan0: error fetching interface information: Device not found

ran ifconfig without any arguments... it listed out eth0 and eth1...

I included

" ifconfig eth0 down"
and
" ifconfig eth1 down"

I have a neat shutdown now

Revision history for this message
Tomas M. (el-dragon) wrote :

i had this problem too.

my status:
- dont have network manager installed.
- /etc/network/interfaces doesnt have an auto wlan0 entry
- im not applying the fix everyones using here (adding to alsa-utils the ifdown command)

the problem has gone away.

one thing i may add. this might be related to this bug: https://bugs.launchpad.net/ubuntu/+source/netbase/+bug/290230
since the moment i removed all configured networks, computer started shutting down correctly...

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 10/28/2008 07:41 AM, FredBezies wrote:

>
> As bug was opened end of september, if PA is guilty, it could be related
> to some changes introduced in 0.9.10-2ubuntu4 or even in 0.9.10-2ubuntu3
> version.
>
> What about :
>
> "pulseaudio (0.9.10-2ubuntu3) intrepid; urgency=low
>
> * Remove stop links from rc0 and rc6 (LP: #254254):
> - debian/rules: change DEB_UPDATE_RCD_PARAMS to
> start 25 2 3 4 5 . stop 15 1 ."
>
> Just guessing, because using ifconfig tweak, I still have to press a key
> for a complete powerdown.
>
That changelog entry is a red herring, because it only deals with the
pulseaudio daemon running as a system service (applicable to only
Edubuntu LTSP server installs). On desktop installs, pulseaudio is
invoked by the GNOME session.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Sorry ! I was trying to help and find when and why pulseaudio was acting this way. Well, I think it would have been better for me to shut up my mouth... :(

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

Is everyone experiencing this issue using an HDA codec?

Changed in pulseaudio:
status: New → Invalid
Changed in linux:
assignee: nobody → crimsun
status: Invalid → Incomplete
Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

I do have an HDA codec used for my audio. My sound chipset is :

00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)

Revision history for this message
Biji (biji) wrote :

yup..
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

Revision history for this message
dAF2000 (david-daf2000-nl) wrote :

Indeed, hda-intel

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Erh... Browing bug database, I found bug #126140 and there is a link to linux kernel bugzilla :

http://bugzilla.kernel.org/show_bug.cgi?id=11889

Looks like it is the problem we're facing here, or am I wrong ?

Revision history for this message
Alessandro Sivieri (scattino) wrote :

@FredBezies: no, at least not in my case, because I have a SiS AC'97 integrated controller...

Revision history for this message
varanus (bobiras12) wrote :

Suzans' tip worked perfectly for me. ty

04:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5789 Gigabit Ethernet PCI Express (rev 21)
05:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

Revision history for this message
hara (harak-iitm) wrote :

I shifted to Kubuntu and the "ifconfig eth0 down" prescription did not work. It was ok when I used just gnome

Revision history for this message
wolfwitch (wolf-mylunarden) wrote :

Just wanted to throw my name in as one of those this affects...

I had actually hoped it was a fluke that wouldn't carry out of beta, but now that I updated to the Intrepid Release- it's still a problem.

Adding: ifconfig eth0 down
...to the top of my alsa-utils fixed it, although I really don't understand what Alsa is doing messing with the network card.

It's a 64-bit Athlon home-brew system, with on-board audio and network. I'm attaching my lspci dump, just in-case it helps.

There might be some other issues (related?) with the alsa driver. Sound works great once everything is loaded, but I can be logged-in with my desktop loading before the startup drums sound. In Hardy- they were heard just as the login screen was displayed.

Revision history for this message
Biji (biji) wrote :

Hi guys.... just trying to help to solve this bug.. could you please edit /etc/init.d/alsa-utils on line 84, so it become like this:
store_levels()
{
        CARD="$1"
        [ "$1" = all ] && CARD=""
        strace alsactl store $CARD > /root/alsactl.log 2>&1
        if MSG="$(alsactl store $CARD 2>&1)" ; then
                sleep 1
                return 0
        else
                [ -z "$CARD" ] && log_action_cont_msg "warning: 'alsactl store' failed with error message '$MSG'"
                return 1
        fi
}

and try to attach output of /root/alsactl.log here ...
thanks

Revision history for this message
karlatsaic (krudnick) wrote :

I did a fresh install of 8.10 which was released today and this issue vanished for me.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote :

It's solved here too after a fresh install of 8.10.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

So if it is the answer, I know what I will do tomorrow. And it is kinda annoying to do so :(

Revision history for this message
Jeremy O'Connor (jeremyoconnor) wrote :

I downloaded the Ubuntu alternate ISO 8.10 amd64 yesterday, and upgraded my system from 8.04.1. Experienced the same bug. So it isn't solved yet for the amd64 version.

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

I can confirm this sad point. But at least, now I have a cleaner base to work with.

Should the title be updated to reflect it seems to be an amd64 only issue now ?

Revision history for this message
Regular User (dot.ru) wrote :

I won't make a fresh install (I fixed the bug with the "ifconfig wlan0 down" fix above) but since no one actually did anything to fix it (apparently) it's safe to say that the bug can, still, reappear.

Revision history for this message
João Paulo Melo de Sampaio (jpmelos) wrote :

I have this bug on my VAIO VGN-FZ250AE, with Ubuntu 8.10. Did a fresh installation yesterday and had this bug. Updated and still had this bug. Now I'm on Ubuntu 8.04.1 and everything is good.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote : Re: [Bug 274995] Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

And it's broken again now (without the ifdown trick in alsa-utils)

I checked the install log and it could be due to one of these:

Manual install:
libsox-fmt-alsa (14.0.1-2build2)
libsox-fmt-base (14.0.1-2build2)
libsox0 (14.0.1-2build2)
sox (14.0.1-2build2)

I needed to install sox to install "play" to get my sound working on
aMSN. I just uninstalled sox, and the shutdown is fine again.

dAF2000 wrote:
> It's solved here too after a fresh install of 8.10.
>

Revision history for this message
David Pearce (halzia) wrote : Re: storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

This bug went away a few days ago and suddenly reappeared today with the latest updates.
I am suspecting base-files 4.0.4ubuntu2.1 was the fix and upgrading to 2.2 broke it again

This PC is an old Celeron PIV 2.6GHz, so this is not an AMD64 only issue

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Last version of base-files is related to some Ubiquity (graphical installer) cleanup. How it could be related to that bug ?!

http://changelogs.ubuntu.com/changelogs/pool/main/b/base-files/base-files_4.0.4ubuntu2.2/changelog

"base-files (4.0.4ubuntu2.2) intrepid-security; urgency=low

  * Ubiquity cleanup: do not fail on missing symlink targets.

 -- Kees Cook <email address hidden> Thu, 30 Oct 2008 10:55:33 -0700"

Revision history for this message
OMGsplosion (omgsplosion) wrote :

I am still having the problem even after the ifconfig down. I notice that if I do "sudo ifconfig eth1 down" in the terminal that will only shut down the wireless for a few seconds and then it comes back online. (The wireless LED proves this). During the actual shutdown the duration is even shorter.
There is also a strange thing going on whereas if I don't have my nVidia restricted driver installed the problem will not occur. I'm not sure if they are related.

My sound is a
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

Revision history for this message
dmh309 (dmh309) wrote :

Experiencing this bug on an x86-64 Dell Inspiron 530n (note that I have the 32-bit version installed). I did a fresh install of 8.10.

Revision history for this message
Yasir (yasir-iec) wrote :

me too facing same problem on Compaq V3137TU (V3000 series) laptop. Everything was ok with 8.04 but when i upgraded to 8.10 and system freezes on "Shuting down ALSA...". The only way to shutdown is to power off [:(]
Somebody please fix this bug.....

Revision history for this message
David Clayton (dcstar) wrote :

I can confirm that his bug is in a 8.10 desktop 32 bit VMware VM (on-line upgraded from 8.04 today) along with a 8.10 desktop 64bit VM that was installed from the official release CD a few days ago (with all current upgrade packages).

The VMWare environment should indicate that particular hardware combinations are not the issue.

I also found that if you can kill the amixer process then the shutdown continues as normal.

Revision history for this message
jimmylc (jimmy-lc) wrote :

I've just upgraded from Hardy to Intrepid and got this problem, FIXED it by enabling "Audio Settings Management (alsa-utils)" on services, that is:

System > Administration > Services > [check] "Audio Settings Management (alsa-utils)"

Hope this helps somebody

Revision history for this message
Regular User (dot.ru) wrote :

I will try jimmy's fix and report back.

Revision history for this message
Yasir (yasir-iec) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Jimmy's fix is not working for my system:
"Audio Settings Management (alsa-utils)" service is already ON in my system and still m getting this bug,

System > Administration > Services > "Audio Settings Management (alsa-utils)" is already checked.

Revision history for this message
Regular User (dot.ru) wrote :

Jimmy's fix doesn't work.

Revision history for this message
augias (augias) wrote :

The extra ifconfig line in alsa-utils doesn't help shut down or restart*. However, running 'sudo ifconfig eth0 down' alone from terminal also 'hangs up' on my intrepid (upgraded today form 8.04) whereas other users do find their solutions in this ifconfig process.

Just thought I'd toss that into the discussion while I patiently wait for a solution from up above. I've tried everything offered by the ubuntu forums and had zero luck. Best wishes to the developers and here's to hoping these forced shut downs with the power button don't damage my motherboard or any disks...

Revision history for this message
Regular User (dot.ru) wrote :

Wait, I restarted and Jimmy's fix seems to have worked...

Revision history for this message
Tomas M. (el-dragon) wrote :

augias, if you want to be safe, use the sysrq keys to make the kernel kill everything nicely.

do the following: keep alt-PrnScr pressed, and hit one by one the following letters:
R
E
I
S
U
B

that will gracefully make the kernel shutdown, protecting your data. about this bug. i havent been feeling it lately, and i have not applied any of the fixes proposed.

Revision history for this message
Manni (ubuntu-lxxi) wrote :

I just tried to debug this some more and found out, that everything /etc/init.d/alsa-utils does, it does really, really slow.

I added some debugging code to line 290 of that file: "echo "muting and zeroing level on $CTL"" . I do get output, but the frequency is really slow.

Revision history for this message
dAF2000 (david-daf2000-nl) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

See my previous postings in this thread. I've exactly shown which
statements take that much time (any why). I did the same debugging.

Manni wrote:
> I just tried to debug this some more and found out, that everything
> /etc/init.d/alsa-utils does, it does really, really slow.
>
> I added some debugging code to line 290 of that file: "echo "muting and
> zeroing level on $CTL"" . I do get output, but the frequency is really
> slow.
>

Revision history for this message
dmh309 (dmh309) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Tested disabling networking prior to shutdown and Ubuntu 8.10 shuts down correctly.

Revision history for this message
Bariki (bariki) wrote :

Fresh install of Ubuntu 8.10 x64 on my HP DV9574ea laptop this afternoon - initially shutdown/rebooted fine until updates and non-free driver (nvidia) were installed. Laptop has an Intel 82801H HD audio controller (but it's really a Realtek HD audio controller, AFAIK).

Tested adding "ifconfig eth0 down" and "ifconfig wlan0 down" to /etc/init.d/alsa-utils - problem goes away.

Problem does NOT present on my x64 desktop system, which uses a Creative Audigy 2 ZS card. Both systems are using the same nvidia proprietary driver for graphics and have the same installation environment in terms of kernel, patches and updates.

Revision history for this message
Biji (biji) wrote :

Hi...... there is easier way to shutdown quickly (this kinda funny for OS like ubuntu ^^) .... when shutting down and hang... unplug your ethernet cable .... shutdown will continue

Revision history for this message
augias (augias) wrote :

My problem came from the upgrade from 8.04 to 8.10. Nothing was working, none of the suggestions changed a thing, from unplugging the network cable to editing alsa-utils to grub modules.

A fresh install of intrepid ibex from a live cd and the problem has disappeared. Is the problem occurring for people with clean installs at all or just updaters?

Revision history for this message
Bariki (bariki) wrote :

I got the problem after clean installations. Also, just unplugging the network cable doesn't work in my case, probably because I have a wireless card in my laptop as well.

Revision history for this message
In , Jaroslav (jaroslav-redhat-bugs) wrote :

Created attachment 322450
Add reboot notifier to intel8x0 driver

Revision history for this message
In , Jaroslav (jaroslav-redhat-bugs) wrote :

Davide, could you test the proposed patch for this issue or you need a full test kernel?

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

Better to get a full kernel if you can.

Revision history for this message
cd.kris (cd-kris) wrote :

had the problem on RC and final, both from upgrade
in the final it fixed after a few reboot......strange...
and experienced the same thing this morning after a update
now clear after "ifconfig wlan0 down" & "ifconfig wlan0 down" tricks
but really hope it can be formally fixed
my laptop is a TOSHIBA M302

@Nicolas
understand you and thank people like you.

Revision history for this message
pyjamashark (pyjamashark) wrote :

Hi so I'm on a dell inspiron 1525 (one of the ones shipped by dell) so if this effects me tis bad news.
With a fresh install of intrepid this bug is not present (hang on alsa shutdown and scratchy sound), however after updating today this bug has returned as bad as ever.
What now?
Joe

Revision history for this message
sam tygier (samtygier) wrote :

A cleaner way to force the shutdown

ALT+sysrq+R (get keyboard control)
ALT+sysrq+E (kill tasks)
CTRL+ALT+DEL (call shutdown)

Revision history for this message
costales (costales) wrote :

Hi! I have got this bug too!!
In Intrepid Ibex, update to today.
Laptop HP nx7300.

Revision history for this message
costales (costales) wrote :

When I press ShutDown button, the process stops.
If I press Alt+F1, appear this:
* Stopping firewall: ufw... [OK]
* Stopping down ALSA...
   amixer: Invalid command!

I have got this problem in my laptop and desktop computer!
I think is a critical bug!
Best regards and thanks.

Revision history for this message
Biji (biji) wrote :

ok guys... if found the mistake in /etc/init.d/alsa-utils
it happens when muting soundcard.. see function mute_and_zero_levels.... calling amixer and repeats for >15 times
and the problem is..... every time we call amixer it needs about 10 seconds or more .... 10x15=150 s
i don't know why amixer run so slow at shutdown stage
to ubuntu: for quick fix.. maybe we should mute master channel only

Revision history for this message
dAF2000 (david-daf2000-nl) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Biji, check my post of 22/10/2008:

"I didn't do the fix as reported by Daniel, because I my case the bug is
surely in another part of the script. In my case it's in
mute_and_zero_levels_on_card() called during mute_and_zero_levels. I've
added debugging to test.

In the for loop all kind of devices are muted and almost all entries
take a few seconds. The error I get is "amixer: Unable to find simple
control '....', 0". The first error I get is "Synth", so amixer works
fine for Master, PCM etc which are first in the list. For non working
devices, amixer wait a couple of seconds and the whole for loop takes
ages.

So, (in my case) the real problem is that amixer is too slow if non-
existing devices are muted. By the way, the step store_levels() takes
only a few seconds."

Biji wrote:
> ok guys... if found the mistake in /etc/init.d/alsa-utils
> it happens when muting soundcard.. see function mute_and_zero_levels.... calling amixer and repeats for >15 times
> and the problem is..... every time we call amixer it needs about 10 seconds or more .... 10x15=150 s
> i don't know why amixer run so slow at shutdown stage
> to ubuntu: for quick fix.. maybe we should mute master channel only
>

Revision history for this message
costales (costales) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

If I run in terminal:
sudo poweroff
Intrepid shutdown fine.

But by the shut down button, the bug persists in my desktop(Generic) and laptop (HP nx 7300).
Best regards and thanks.

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

(In reply to comment #19)
> Davide, could you test the proposed patch for this issue or you need a full
> test kernel?

I have too much work to do, and can't set up a build environment on my machine by now...

Revision history for this message
Marios Karaoulis (marios-hellas-23) wrote :

Same here. HP laptop dv 6680 and kubuntu 8.10.
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

I added in alsa-util the following

  stop)
        ifconfig eth0 down
        ifconfig wlan0 down
         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
        log_action_end_msg_and_exit "$EXITSTATUS"
        ;;

but i still cant shutdown.

If i write from a terminal
ifconfig eth0 down
ifconfig wlan0 down

and then shutdown, everything is ok.

Any solutions for me?

Revision history for this message
dmh309 (dmh309) wrote :

Any chance we can move up the priority of this bug? It's affecting many users and detracts from the user experience.

Revision history for this message
Biji (biji) wrote :

come on guys.. i've just used ubuntu for 2 months 8.04 i'm impressed then update to 8.10 with this annoying bug
i'm 100% this is dns resolving issue...
in my office i got no problem when shutting down with this config:
1. dhcp using ethernet
2. fixed internet connection
3. using external nameserver 202.x.x.x
at home .... hang when shutdown:
1. dhcp using ethernet
2. connected to adsl modem
3. using adsl modem as gateway and nameserver
4. when shutting down.. i always turn off ppp on adsl modem

Revision history for this message
pyjamashark (pyjamashark) wrote :

I fully agree with dmh309 - we should definitely raise the priority of the bug. Is anyone else also having sound playback issues or am i alone here?
Chao
Joe

Revision history for this message
costales (costales) wrote :

I think this is a critical bug, because shut down is a basic operation in OS.
Please, update the priority of this bug!

Revision history for this message
humufr (humufr-deactivatedaccount) wrote :

@ Marcos
we, users, already tried to convince them about it but it's doesn't seem to be important and it was before the last rc version... It's funny Ubuntu is the only distribution with this problem for what I know and that touch a lot of people with a lot of risk for the file system integrity but it's ok you just have to wait 10 or 15 minutes to see you laptop (for example) do a clean stop. It's so convenient especially when you are on battery mode... Unfortunately is not the only bug like this with high impact and decreasing priority more and more people are touched... Strange but good for the statistics perhaps. The thing I know is that I won't upgrade to intrepid any of my computer and I'm starting to evaluate other distributions for a possible migration. I agree that visual aspect and publicity are important but working system with good polishing and bug solved is more important in my point of view.

Revision history for this message
Tomas M. (el-dragon) wrote :

@ Nicolas: yes, yes, you are definately right. there seems to be some kind of vacation taking since the release. ive seen more regressions on this release than any other. nothing mayor. but the ammount of technicalites have long past their bearable threshold.

i was too considering another distribution, once my exams are over and i can afford to have a semi working laptop for a while.

i think all of these bugs related to alsa, networks, and whatnot to be related to upstart. i dont know what the change was since hardy. but i think the push to start migrating to upstart must have triggered all sort of conflicts (things shutting down in an unexpected order, for example). i think this to be the case, because my personal experence is that some bugs are quite random...sometimes when i boot, i will get no thermal sensors, and fan would run non stop, some times, everything is ok. some times i get stuck at ALSA shutting down, sometimes i dont, having wlan0 on auto (/etc/network/interfaces) with my home wireless network configured. will ONLY work when the network is available, if its not, bringing network interfaces up during boot will timeout after 5 minutes aprox.

another issue is concerning backlight, and screen control. its laggy at best. my fn-F3 power-off display doesnt work anymore.

i could go on ranting,.. but i dont think thats the point of this bug report.

good luck

Revision history for this message
Bruce R (bm007a0030) wrote :

I am afraid that you are going to meet a brick wall on this one folks. Milestone dates rather than acceptable operation are sacrosanct, which is a great pity and will spell the end for Ubuntu if it carries on much longer. More and more folk are simply not signing up to it, after all the Ubuntu 8.04 slow development problems and now the Ubuntu 8.10 same blind adherence to milstones.
At the moment, 64-bit Ubuntu 8.04.1 looks like the least flawed version, whilst LinuxMint (5 or 4) seems to be under better control, or even Mandriva 2009 (GNOME version).
Bug Report #294896 also refers.

Revision history for this message
wolfwitch (wolf-mylunarden) wrote :

Agreeing with the last several posts. This seems to be a growing trend- the Milestone is more important than actual system stability/usability. This became very noticeable to me with Hardy, which has major network usability issues that still haven't been fixed in Intrepid.

Issues like this may be just annoyances to those of us who have used Ubuntu and other releases for awhile, but they are deal-breakers to any potential NEW users. Having fancy Compiz-Fusion graphics may wow them at first- but when they realize other things they actually NEED (like good-quality sound and being able to shut down) don't work- they look at other distros or abandon Linux altogether.

This is a bug that has serious consequences for ongoing system stability (including the real potential for data loss). Some of the work-arounds work for SOME people, but they aren't a very good long-term solution, and would be beyond the scope of the average "new" Ubuntu user.

I really love and appreciate everything the Ubuntu developers do, but I feel someone is driving the priorities in the wrong direction.

Revision history for this message
cd.kris (cd-kris) wrote :

by the way, just in case.....which linux distro is considered better among the others? is the latest release of fedora a wise choice?
anyone?

Revision history for this message
aschuring (aelschuring) wrote :

see #295136. The problem is actually in the amixer executable, which gets invoked about 15 times during shutdown. The problem is reproducable (for me) by running amixer in single-user mode. strace log can be found in the mentioned report.

For reference, see the following note in the news section on http://0pointer.de/lennart/projects/nss-mdns/:
"Please note that due to security reasons from this release on the minimal mDNS stack included in nss-mdns (dubbed "legacy") is no longer built by default. Thus, nss-mdns will not work unless Avahi is running! That makes Avahi essentially a hard dependency of nss-mdns."

And see the following lines in the strace log:
0.000069 open("/lib/libnss_mdns4_minimal.so.2", O_RDONLY) = 5
0.000069 connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 28) = 0
4.013297 ioctl(5, FIONREAD, [37]) = 0

That still does not answer the question why the ** amixer needs to do dns resolution in the first place...

Revision history for this message
costales (costales) wrote :

Hi!
Edit /etc/init.d/alsa-utils FIXED this bug for me.
The solution of Juliano in the answer: https://answers.launchpad.net/ubuntu/+question/49799 works for me.
Intrepid shut down fine now.
Thanks very much.

Solution in the answer:
sudo gedit /etc/init.d/alsa-utils

The file opens in Gedit and around the line 353 you'll find the instruction "stop)". Below this instruction you should add these two instructions:

ifconfig wlan0 down
ifconfig eth0 down

So, the file should be this way:

stop)
ifconfig wlan0 down
ifconfig eth0 down
EXITSTATUS=0

Use ifcofing for know if you have wlan0 or others ;)

Revision history for this message
Biji (biji) wrote :

That's right aschuring... it has been pointed out what causes this bug

Revision history for this message
Bruce R (bm007a0030) wrote :

For Information.
I have another rig on which the 8.10 release is reluctant to start in Live or engage Manual Install, the latter then refusing to complete, so I think that all these reports are about problems actually created by the new Installer.

Revision history for this message
pyjamashark (pyjamashark) wrote :

Thanks so much Marcos - that works for me too - atleast it solves the shutdown issue. But I still have no sound with alsa or pulseaudio - just crackles.

One last thing about comments on the general direction of ubuntu. There is a lot of language about 'us' vs 'them', 'us' being the users and 'them' being the ubuntu devs. But there really is no such distinction. We are one community with graded degrees of involvement. Ubuntu, is what we the community make of it. There is no proprietary structure where we can demand service... all the devs (even if they're based at canonical) have no devious intentions, they do what they do as a social service to the community at large. If you are not happy with something in ubuntu then, lobby, get involved and change it yourself.

Peace out,
Joe

Revision history for this message
costales (costales) wrote :

Hi!
I have got 2 partitions (Hardy and Intrepid).
The new partition with Intrepid didn't shut down (Edit the file /etc/init.d/alsa-utils shut down fine).

Now I update Hardy to Intrepid with Update-manager and now Intrepid (Hardy updated) shut down fine too :O

Best regards.

Revision history for this message
Bruce R (bm007a0030) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values duringshutdown hangs nondeterministically if non-loopback networkinterfaces are still up

Very well said pyjamashark, the volunteer community does a great job.
I just wish I was expert enough to join them !
----- Original Message -----
From: "pyjamashark" <email address hidden>
To: <email address hidden>
Sent: Saturday, November 08, 2008 3:04 PM
Subject: [Bug 274995] Re: MASTER storing ALSA mixer element values
duringshutdown hangs nondeterministically if non-loopback networkinterfaces
are still up

Thanks so much Marcos - that works for me too - atleast it solves the
shutdown issue. But I still have no sound with alsa or pulseaudio - just
crackles.

One last thing about comments on the general direction of ubuntu. There
is a lot of language about 'us' vs 'them', 'us' being the users and
'them' being the ubuntu devs. But there really is no such distinction.
We are one community with graded degrees of involvement. Ubuntu, is what
we the community make of it. There is no proprietary structure where we
can demand service... all the devs (even if they're based at canonical)
have no devious intentions, they do what they do as a social service to
the community at large. If you are not happy with something in ubuntu
then, lobby, get involved and change it yourself.

Peace out,
Joe

--
MASTER storing ALSA mixer element values during shutdown hangs
nondeterministically if non-loopback network interfaces are still up
https://bugs.launchpad.net/bugs/274995
You received this bug notification because you are a direct subscriber
of a duplicate bug.

Revision history for this message
goto (gotolaunchpad) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Hello, I have the same problem, the shutdown/restart problem could be solved, but I still cannot hear any sounds, nor can I change any network settings (not authorized or something like this). Any help? My System configuration is described in Bug 294160 .
Thanks!

Revision history for this message
Robb Topolski (funchords) wrote :

Just a couple of notes on this.

1. For those with working ALSA sounds, but ALSA hangs on shutdowns lasting about 2.5 minutes, I believe our bug fix is mentioned http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.27.5 -- released November 7th. (I don't know how soon we will see it through normal channels -- can anyone advise?)

 commit a858c06703057cfdd142184e536c3ba36c45000e
 Author: Takashi Iwai <email address hidden>
 Date: Thu Oct 30 19:10:15 2008 +0000

    ALSA: hda - Add reboot notifier

    commit 0cbf00980f0fc4cc064a15ab3dfce19b5fae9130 upstream

    The current snd-hda-intel driver seems blocking the power-off on some
    devices like eeepc. Although this is likely a BIOS problem, we can add
    a workaround by disabling IRQ lines before power-off operation.
    This patch adds the reboot notifier to achieve it.

    The detailed problem description is found in bug#11889:
        http://bugme.linux-foundation.org/show_bug.cgi?id=11889

    Tested-by: Luiz Fernando N. Capitulino <email address hidden>
    Signed-off-by: Takashi Iwai <email address hidden>
    Signed-off-by: Greg Kroah-Hartman <email address hidden>

2. It's possible that this bug report is a duplicate of bug#126140. I'm not sure. That would make this a very old bug.

That reporter noted that doing an rmmod of snd_hda_intel prior to shutdown avoided the hang. A similar solution posted at http://bugzilla.kernel.org/show_bug.cgi?id=7195#c3 (status NEW for over 2 years) describes putting similar entries in a shutdown script. Another commenter at https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/126140/comments/38 says that using aggressive power saving mentioned http://www.thinkwiki.org/wiki/How_to_enable_AC97_power_saving#HDA_audio_subsystem softens the problem.

More recently, many are reporting, especially on ubuntuforum, that doing an ifdown on their active network avoids this ALSA hang on shutdown -- https://bugs.launchpad.net/ubuntu/+source/alsa-utils/+bug/274995/comments/25 mentions it as well.

That the workarounds are different makes me wonder whether these actually are duplicates.

Good luck, all!

Revision history for this message
goto (gotolaunchpad) wrote :

Why is the status actually 'Incomplete'?

Revision history for this message
Gary.M (gm-paradise) wrote :

I found that changing from the atheros driver incuded with Intrepid to ndiswrapper with windows driver gave me a clean shutdown / restart whatever.

Revision history for this message
Lazarusrat (lazarusrat+ubuntu) wrote :

I've solved this on my system by doing the following:

sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager

Revision history for this message
Nur Kholis M (kholis) wrote :

@Lazarusrat
it works on my laptop. thanks

00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)
03:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)

Revision history for this message
Nur Kholis M (kholis) wrote :

btw, i also add it before K50alsa-utils in rc6.d for restarting.

sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager

Revision history for this message
Bruce R (bm007a0030) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values duringshutdown hangs nondeterministically if non-loopback networkinterfaces are still up

Hi Nur Kholis Majid

But did your laptop have a network connection when you attempted ShutDown or
Restart ?

(Please see #294896 to see why I ask this.)

Revision history for this message
Bruce R (bm007a0030) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Please ignore my last question, Nur Kholis Majid.
Lazarusrat is a GENIUS !
The first time I tried his patch it didn't work, but suspecting a typograhical error on my part, I copied it into a text file which I then 'ran in terminal' and it works on my E4600 [B] rig.
What's more it also works for the new Mint6 RC1.
Very Many Thanks !

Revision history for this message
Nur Kholis M (kholis) wrote :

@Bruce R

yes. i have network connection both ethernet and wireless.

Revision history for this message
Robb Topolski (funchords) wrote :

IMPORTANT CORRECTION -- please ignore my prior message, it contained a major mistake -- this is the corrected version

Okay, that helps explain why the rc.0 one alone did nothing for me -- I'm usually rebooting! ;-/

So the workaround is to do both --
sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager

Great job! That's a temporary work-around, and work-arounds are very good -- but when a request to test a patch or a fix comes out, you'll want to return to the previous state and delete those symlinks so you can cleanly test.

sudo rm /etc/rc0.d/K40NetworkManager
sudo rm /etc/rc6.d/K40NetworkManager

For those who'd rather not edit, another work-around is to disconnect network cables, disable networking in nm-applet, or hit the Wi-Fi kill switch either before or during shutdown. If done before choosing shut-down or reboot, the hang is avoided. If done during the hang, then the remaining shutdown hang at the alsa step is shortened from over 2 minutes to under 15 seconds.

@Daniel T. Chen -- are you still asking for help or information on this?

Revision history for this message
raboof (arnouten) wrote :

I agree with aschuring above that this looks like a symptom of bug 295136 .

Revision history for this message
sahamett@windstream.net (sempermollis) wrote :

For what it's worth...

My sound is working fine.

When I Shutdown or Restart I see the closing splash screen. The progress bar hangs just above half. I then get a blank screen with a blinking cursor. After some time, I get the following:

* Stopping atieventsd [OK]
Stopping libchipcard daemon: chipcardd4.
* Saving the system clock
* Stopping firewall: ufw ... [OK]
* Shutting down ASLA ...

This is where it hangs up. If I power off the machine and reboot, everything works fine until the next time I Shutdown/Restart.

System Info:

Ubuntu release 8.10 (intrepid)
Kernel Linux 2.6.27-7-generic
GNOME 2.24.1
Dell 530S with an Intel Pentium Dual-Core CPU E2160 @ 1.8 GHz
ATI Radeon HD 2400 PRO running ATI/AMD proprietary FGLRX graphics driver
2 gb RAM

This is a dual boot machine with XP Pro sp3. I do not have wireless.

I used Suzan's trick and, just confirming, adding the "ifconfig eth0 shutdown" to alsa-utils also worked for me.

Thanks Suzan!

Revision history for this message
Kevin Ford (kford) wrote :

I can confirm that Lazarusrat's work around works, the first fix that did (Suzan's didn't work for me). Thanks to Robb Topolski for catching the reboot line.

I'm running a fresh install (as of yesterday) of Kubuntu 8.10 (amd64) on an Acer Aspire laptop.

Revision history for this message
Matthew Cutts (cutts) wrote :

Robb Topolski's addition to Lazarusrat's workaround worked for me. My sound was working, but rebooting/shutting down would consistently hang for 3-4 minutes before shutdown finished. Using

sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager

fixed things.

Revision history for this message
Anu de Deus (anuofgod-deactivatedaccount) wrote :

Confirmed,

sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager

Fixed for me too, thanks everybody involved.

Revision history for this message
Henry S. (snowball2050-gmail) wrote :

I can confirm Robb Topolski's workaround too. Thanks!

Revision history for this message
Guglielmo Cola (guglielmocola) wrote :

I can confirm too. Thank you Robb

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

In regards to:

sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager

Pleae correct me if I'm wrong, but that seems like a bad idea if someone
has both Ubuntu and Kubuntu installed. Wouldn't that make it so that you
get Knetworkmanager in both Gnome and KDE? Please let me know.

Matthew Cutts wrote:
> Robb Topolski's addition to Lazarusrat's workaround worked for me. My
> sound was working, but rebooting/shutting down would consistently hang
> for 3-4 minutes before shutdown finished. Using
>
> sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
> sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager
>
> fixed things.
>
>

Revision history for this message
Brion Swanson (brions) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

The K40 part of "K40NetworkManager" indicates *K*ill the NetworkManager process in numerical order (40 coming before 50 - K50alsa-utils).

It does not imply that this is the KDE version of NetworkManager versus a Gnome version. If you're curious, read more about SYSV style initialization or do 'man init.d' and read the man page about init.d and the rc.*d directories.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Oh gosh, I'm so sorry about that. Ignore my comment everyone. Thank you
so much Brion!

Brion Swanson wrote:
> The K40 part of "K40NetworkManager" indicates *K*ill the NetworkManager
> process in numerical order (40 coming before 50 - K50alsa-utils).
>
> It does not imply that this is the KDE version of NetworkManager versus
> a Gnome version. If you're curious, read more about SYSV style
> initialization or do 'man init.d' and read the man page about init.d and
> the rc.*d directories.
>
>

Revision history for this message
neztiti (neztiti) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

thank you Marcos , its ok now by :

ifconfig wlan0 down
ifconfig eth0 down
EXITSTATUS=0

Revision history for this message
Michael (michaeljt) wrote :

I am also affected by this bug, and am wondering what can be done about this sort of issue. Since launchpad is probably not the right place for that sort of discussion, I created a forums thread for it:

http://ubuntuforums.org/showthread.php?p=6215985#post6215985

Any comments and thoughts are welcome.

Revision history for this message
Ursula Junque (ursinha) wrote :

@crimsun What else do you need to mark this bug as confirmed instead of Incomplete?

Revision history for this message
Michael (michaeljt) wrote :

@Ursula See this link which someone pointed me to in the forums thread I created:
http://ubuntuforums.org/showpost.php?p=6099553&postcount=18
So someone thinks it is confirmed :)

Revision history for this message
aschuring (aelschuring) wrote :

can anyone confirm whether they have a "search ..." statement in /etc/resolv.conf, and whether removing that statement fixes the delays? It's not really a workaround, because that file will be regenerated if you use dhcp, but it does add an additional point of information.

Daniel T Chen (crimsun)
Changed in alsa-utils:
status: New → Invalid
Revision history for this message
Daniel T Chen (crimsun) wrote :

Note: this issue is caused by broken bioses. To a degree, it can be worked around in the kernel. As alluded to above, one portion of the workaround is in 2.6.27.5 but only "fixes" hda. Other portions of the workaround potentially need to be applied for all pci audio devices.

References:
(hda) http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=1096a704601de9622e4f75a0ee466db7191d4392
(intel8x0) http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=1096a704601de9622e4f75a0ee466db7191d4392

Changed in linux:
importance: Undecided → Medium
status: Incomplete → Triaged
Changed in linux:
status: Unknown → Confirmed
status: Unknown → In Progress
Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Broken bioses? I don't understand, nor agree that all the people having
this problem have a broken bios. (Especially considering that this
problem is new and previous Ubuntu releases didn't have this problem on
the same hardware).

If this is a broken bios problem, are you suggesting we all exchange our
computers at the store or get replacement parts?

If I'm misunderstanding, I apologize in advance.

Daniel T Chen wrote:
> Note: this issue is caused by broken bioses. To a degree, it can be
> worked around in the kernel. As alluded to above, one portion of the
> workaround is in 2.6.27.5 but only "fixes" hda. Other portions of the
> workaround potentially need to be applied for all pci audio devices.
>
> References:
> (hda) http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=1096a704601de9622e4f75a0ee466db7191d4392
> (intel8x0) http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=1096a704601de9622e4f75a0ee466db7191d4392
>
> ** Changed in: linux (Ubuntu)
> Importance: Undecided => Medium
> Status: Incomplete => Triaged
>
> ** Bug watch added: Gentoo Bugzilla #232875
> http://bugs.gentoo.org/show_bug.cgi?id=232875
>
> ** Also affects: linux (Gentoo Linux) via
> http://bugs.gentoo.org/show_bug.cgi?id=232875
> Importance: Unknown
> Status: Unknown
>
> ** Bug watch added: Red Hat Bugzilla #203930
> https://bugzilla.redhat.com/show_bug.cgi?id=203930
>
> ** Also affects: linux (Fedora) via
> https://bugzilla.redhat.com/show_bug.cgi?id=203930
> Importance: Unknown
> Status: Unknown
>
>

Revision history for this message
Robb Topolski (funchords) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

This was tipped by aschuring in bug 295136 with Flagman's explanation -- here's another workaround:

STEP A. sudo gedit /etc/hosts

STEP B. Change the first line in the IPv6 section

from

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback

to

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback

Wallah! No more hang at shutdown or reboot or when otherwise using amixer when no user is logged in.

Revision history for this message
Robb Topolski (funchords) wrote :

@aschuring,

 > can anyone confirm whether they have a "search ..." statement in /etc/resolv.conf,
 > and whether removing that statement fixes the delays?

I did not have a search statement there, but I can see where having one could lengthen the situation.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/20/2008 07:50 PM, Jeremy LaCroix wrote:
> Broken bioses? I don't understand, nor agree that all the people having
> this problem have a broken bios. (Especially considering that this
> problem is new and previous Ubuntu releases didn't have this problem on
> the same hardware).

Just because previous Ubuntu releases didn't exhibit this symptom
doesn't mean the code was correct, nor does it mean the bioses aren't
fundamentally at issue.

>
> If this is a broken bios problem, are you suggesting we all exchange our
> computers at the store or get replacement parts?

I'm suggesting nothing of the sort [that you argue with your vendor].
I'm simply stating that the culprit has been identified, and that while
an impractical resolution is implied [that of arguing with your vendor],
a far more feasible workaround is being implemented in the code.

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote :

If the problem is the bios, are you saying that they are all factory
defects, or that a shortcut was taken when they were set up at the factory?

Daniel T Chen wrote:
> On 11/20/2008 07:50 PM, Jeremy LaCroix wrote:
>
>> Broken bioses? I don't understand, nor agree that all the people having
>> this problem have a broken bios. (Especially considering that this
>> problem is new and previous Ubuntu releases didn't have this problem on
>> the same hardware).
>>
>
> Just because previous Ubuntu releases didn't exhibit this symptom
> doesn't mean the code was correct, nor does it mean the bioses aren't
> fundamentally at issue.
>
>
>> If this is a broken bios problem, are you suggesting we all exchange our
>> computers at the store or get replacement parts?
>>
>
> I'm suggesting nothing of the sort [that you argue with your vendor].
> I'm simply stating that the culprit has been identified, and that while
> an impractical resolution is implied [that of arguing with your vendor],
> a far more feasible workaround is being implemented in the code.
>
>

Revision history for this message
Michael (michaeljt) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Can Daniel Clayton still reproduce the issue in VMWare? Do they have a broken BIOS?

Revision history for this message
Robb Topolski (funchords) wrote :

Even though they have a lot in common, I'm convinced these issues have two different root causes, but I'm also hopeful that the change for bug 126140 will also avoid ours (bug 274995).

Bug 126140 is about certain PCs that remain powered up at the end of their shutdown sequence. Anyone remember the Windows "It is now safe to turn off your computer" screen? That's essentially the behavior of bug 126140, minus the cheery-souding Microsoft comforting.

Both that problem and ours
 ... can be avoided by rmmod -f snd_hda_intel (the sound driver)
 ... generally involved Alsa
 ... interrupted normal shutdown

But
 ... 274995 is not actually a hang ... 126140 actually is a hang
 ... 274995 has a networking workaround ... 126140 seems to have a power-management workaround

The "fix" for bug 126140 isn't r-e-a-l-l-y a fix because it doesn't address the root cause (which certainly could be a BIOS oddness), but it does avoid it. Before the hang, the code will now respond to a system reboot signal by releasing the interrupts. It was tested against the problem in 126140. If the net effect of releasing the interrupts is the same as "rmmod -f snd_hda_intel" then it should also avoid our problem as well. We should test it. If it does, we should also make sure that nothing else broke in the process -- for example, does the shutdown in /etc/init.d/alsa-tools still save and zero mixer settings like it was written to do?

My suggestion is that we don't call these duplicate bugs until such testing is complete, even though we are hopeful that this one change avoids both issues.

Revision history for this message
aschuring (aelschuring) wrote :

I have to agree with Robb here. I have been bitten by this bug (#274995), but I don't have Intel HDA onboard sound - I have a Terratec EWS88 (module snd_ice1712). So if #126140 only applies to Intel onboard sound, it is most certainly not a duplicate of this bug.

Revision history for this message
Robb Topolski (funchords) wrote :
Download full text (4.1 KiB)

Thanks for agreeing with me, aschuring. :-) However, the change for 126140 certainly won't benefit you so my previous advice of "wait and hope" no longer makes sense for some.

This is a cascade of bugs and behaviors.

In bug 295136, FlagMan said, "If pulseaudio is the default sound sink and you are NOT logged into X, amixer will search the pulseaudio server but there is none running on the local machine. Therefore, the network will be searched for a pulseaudio server. Most likely there is none on the local network either, and network timeouts are set to high values, so this may take some time and is the symptom we are seeing."

MY THEORY (and I'm not too strong on my capture of linux sound, so beware):

I think the root cause is in that first sentence -- the user is no longer logged into X, the pulseaudio daemon has been terminated when the user session ended, but pulseaudio is still sought by alsa tools. So amixer, searches fruitlessly for the daemon and it has to wait for a network timeout every time its called, and it is called numerous times in /etc/init.d/alsa-tools as the script zeros and mutes channels. (After the user logs out of gnome, I have also noticed a delay between the time that "gdm" appears ready for input and /usr/share/sounds/question.wav plays, which is played by gdmplay which is simply a script that calls aplay, another alsa tool trying to do something after pulseaudio has ended.)

Finally, gdm.conf has this text,

---Quote---
# Program used to play sounds. Should not require any 'daemon' or anything
# like that as it will be run when no one is logged in yet.
SoundProgram=/usr/lib/gdmplay"
---EndQuote---

This points the finger at alsa-tools OR, and I think this more likely, the ubuntu user-session implementation of pulseaudio, and here's where my lack of knowledge about these ends my usefulness -- I don't know the implications of default sinks and whether the closing gnome session can and ought to switch audio defaults back and forth. It should be noted that pulse's xsmp module is installed to load upon login, and never does. That might have everything to do with this.

It is probably not a bug that the alsa tools looks for pulseaudio using network calls. This is not only very common, it works fine when the network isn't searching DNS for the localhost hostname. Even though many workarounds involve killing the network, or nfs, or uninstalling pulseaudio -- these are avoiding the symptom. There might be a bug related to whether alsa tools seeks the network correctly, and how to do that in IPv4/IPv6 LAN has been the topic of much disagreement (see below).

SECONDARY ISSUES:

It was found that listing localhost to :::1 in the IPv6 section of /etc/hosts avoided the long delay mentioned in this report.

Some distributions, including Debian, include (or have included) that entry in /etc/hosts by default while others have not (including Ubuntu, apparently, starting with Hardy (bug 211537). However, and this is important no matter which way this goes, several VERY POPULAR network applications that have bug reports indicating that they fail or misbehave when localhost is listed twice in /etc/hosts (these repor...

Read more...

Revision history for this message
Dovel (dov01) wrote :

I must say also that Robb seems to be doing some good thinking here. I have no intel hardware at all on my laptop, but this bug appeared. Is there any difference in the way that network connections are configured at a base level in Intrepid that may affect this bug?

Revision history for this message
Alan (mrintegrity) wrote :

Judging by the number of duplicates, it seems that this is fairly widespread. Could we please increase the importance of this bug due to the fact that most people will be hard powering off their computers and risk loosing data as a consequence.

Revision history for this message
Robb Topolski (funchords) wrote :

I am going to try and change the "invalid" status for pulseaudio and alsa-tools.

alsa-tools, pulseaudio -- please re-evaluate. The primary issue seems to be that the alsa-tools are trying to find a pulseaudio daemon that is no longer running after the user has chosen to shutdown or reboot. It seems to me that amixer or aplay ought not try to access a pulseaudio process that doesn't exist.

(The hang which is avoided by shutting down the network helps illuminate the issue, but it isn't the cause.)

Revision history for this message
Robb Topolski (funchords) wrote :

Please reevaluate -- see comment 226

Changed in alsa-utils:
status: Invalid → New
Changed in pulseaudio:
status: Invalid → New
Revision history for this message
Robb Topolski (funchords) wrote :

@Dove,

It's probable that everyone who uses pulseaudio as installed by Intrepid will experience this bug. The question is whether or not they'll experience the long hang that helps us notice it -- and that is determined by the networking configuration.

It appears to me that users who once had an IPV4-only system and upgraded will avoid the wait for timeout caused by the bug (the alsa-tools still look for the pulseaudio server, but fails to find it much faster). This is because the upgrade script notices the ipv6 section is missing in /etc/hosts and installs one including the "localhost" name in the ::1 line.

Users who manually add the "localhost" hostname to the ::1 line in /etc/hosts also avoid this wait. My guess is that users who disable IPV6 after installing will also avoid this wait for timeout.

Robb Topolski

Revision history for this message
Dovel (dov01) wrote :

Interesting Robb. I have two installations of Intrepid on my laptop (which as I said has no Intel hardware, so should not be affected by any bios or driver bug suggested by Daniel Chen above). The one which I upgraded from Hardy does not show this fault, but the one which I installed from the CD does and was fixed by altering /etc/hosts to include localhost under ip6.

I compared the hosts files of the two installations however and found that the upgraded one which did not show the fault (Intrepid 1) also did not have the reference to localhost in the ip6 area. It did however have more hosts listed under the local domain IP at the top than the CD installation which did show the fault (Intrepid 2).

Intrepid 1 /etc/hosts (this installation does NOT show this bug and shuts down normally)

127.0.0.1 refd-lt localhost.localdomain localhost
127.0.1.1 fred-lt

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Intrepid 2 (this fresh installation from CD DOES show the bug and hung during shutdown) Please note that the localhost in the second section was added to fix this bug.

127.0.0.1 localhost
127.0.1.1 dov

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02:: ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Revision history for this message
Dovel (dov01) wrote :

Just a note on the upgraded installation Intrepid 1 above, I do a fresh install each 2-3 releases of Ubuntu, so either Gutsy or Hardy would have been a fresh install from CD. Both of those systems had IPV6 enabled didn't they? While the bug is quite likely with alsa/pulseaudio, it is brought to our attention by network configurations.

Now it seems from my reading (and correct me if I am wrong) that ALSA operates on the current machine/filesystem only, whereas pulseaudio is a sound server, which extends the sounds capabilities of the system by making it possible or easier to serve sound across networks, between applications etc. Sort of like X for audio. So if our problem is anywhere it is either with pulseaudio or network configuration or even the relationship between ALSA and Pulseaudio.

1) Is there an easy way to remove pulseaudio from the equation, ie an isolation test, so we only have ALSA and the network running and have ALSA unaware of or logged in with pulseaudio?

We know that if we remove the computer from the network, our problem at shutdown disappears. I don't think ALSA really has anything to do with the network, except through Pulseaudio.

I propose an isolation test (running an affected system without pulseaudio being loaded) on a few different systems to verify Pulseaudio as a likely cause of the bug instead of ALSA alone.

2) I will also be checking for network config changes that could affect this issue between Hardy-Intrepid. Long shot, but could turn something up. Pulseaudio wasn't included in Gutsy and we haven't heard of this issue in Hardy, which did have Pulseaudio.

3) Another line of inquiry is to explore the relationship between ALSA and Pulseaudio. Does anyone know how it works and if this could be the root of the issue? Could it be that ALSA is still trying to poll for Pulseaudio on any available hosts or networks (eg. localhost)? Perhaps that is why the addition of localhost to the /etc/hosts file works. ALSA can see that Pulseaudio isn't there locally and stops looking. I could be wrong with this. I don't know how the relationship between them works.

These 3 areas would seem to me to be the 3 only likely causes of the bug.

Please feel free to tell me I'm wrong.

dov

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

I am not affected by this bug, so if those of you who experience this bug really want to try without pulseaudio, I suggest you either kill pulseaudio before shutting down, or remove it from your
system. Killing the pulseaudio processes should be enough to take it out of the equasion for when you shut down.

Revision history for this message
Dovel (dov01) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

I am afraid I have some mixed results.

The bug no longer occurs on my laptop as I am now running enlightenment 16 with esd and have removed most of gnome and it's glug - including Pulseaudio. My problem is solved.

The bug is still present on my Father's computer (73 years old and wanting to learn the terminal! My Dad that is, not the pc).
I tried killing pulseaudio while logged in to an X session, and it still hung while shutting down. I tried adding localhost.localdomain and the hostname to the local ip in /etc/hosts. No effect, so I put localhost under IPV6 as a temp fix.

Conclusions? Even though I hashed out the Xsession script for pulseaudio, it still loaded. Even though I killed pulseaudo, ALSA still froze during shutdown.

Where I completey removed pulseaudio on the laptop, it shuts down nice and fast even after I removed the fix from /etc/hosts.

So removing pulseaudio stops the bug, killing the process does not.

Hope that makes sense.

dov

Revision history for this message
Robb Topolski (funchords) wrote :

Hi Dov, I'm glad you posted. It seems I've made the bug Gods angry -- it won't show itself on my system tonight, and I can't figure out why. I hate when that happens.

 > I tried killing pulseaudio while logged in to an X session, and it still hung while shutting down.

Right.

Killing pulseaudio while logged in should show the same problem when the gnome user hits reboot or shutdown. The pulseaudio daemon gets killed then the alsa utility tries to contact it. That is the crux of the issue -- should alsa be trying to contact the pulseaudio server after its killed? Or, should something in the sound configuration revert before pulseaudio gets killed so that the alsa tools don't try to contact the pulseaudio server? I don't understand the architecture well enough to know for certain.

The freeze (~ 15 seconds each for 7-10 times that amixer is called to zero and mute the mixer in /etc/init.d/alsa-tools stop) occurs as amixer waits for a DNS query to time out. If the pulseaudio server is alive, the DNS query doesn't happen. If the pulseaudio server is unexpectedly gone, then amixer searches localhost for it. Since it's not found on ipv4 and ipv6 doesn't have localhost in /etc/hosts, the AAAA query goes to the WAN and things pause for 15 seconds while amixer waits for a reply.

Revision history for this message
Dovel (dov01) wrote :

If it was purely an issue caused by ALSA. Does ALSA have a specific relationship with pulseaudio that is different to other sound servers? How is it different? I do not get this issue at all when using ESD, another sound server. Is someone able to test Robb's idea with the IPV6? Ie. disabling IPV6 to see what that does to the bug. Still wondering just why that would have anything to do with it?!?

Still haven't figured out why I don't have any problems on the system I upgraded from Hardy either. As I reported from my testing it wasn't the configuration of /etc/hosts.

Has anyone checked out the changelogs and bug reports upstream for pulseaudio and alsa-utils? The version of Pulseaudio included in Intrepid is 0.9.10 - which was released in March. ALSA-utils is version 1.0.17 I think.

Time for bed for me - you guys on the sunny side of the globe can have fun now.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/23/2008 05:46 PM, Dovel wrote:
> Interesting Robb. I have two installations of Intrepid on my laptop
> (which as I said has no Intel hardware, so should not be affected by any
> bios or driver bug suggested by Daniel Chen above). The one which I
> upgraded from Hardy does not show this fault, but the one which I
> installed from the CD does and was fixed by altering /etc/hosts to
> include localhost under ip6.
>

This bug does not /just/ affect Intel audio hardware. It is a bios
issue and therefore is capable of hitting /all/ audio hardware. The fix
as applied upstream is incomplete, because it needs to be added to all
drivers.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/21/2008 01:12 AM, Jeremy LaCroix wrote:
> If the problem is the bios, are you saying that they are all factory
> defects, or that a shortcut was taken when they were set up at the factory?
>

It's easy to perform an "armchair analysis" of which portion added the
defect, however, it doesn't accrue any more precision. The real culprit
is that the devices need to be disabled to work around the bug;
disabling is effected by unloading the driver (which removes the
interrupt handler for that driver).

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/21/2008 02:35 AM, Robb Topolski wrote:
> Before the hang, the code will now respond to a system
> reboot signal by releasing the interrupts. It was tested against the
> problem in 126140. If the net effect of releasing the interrupts is the
> same as "rmmod -f snd_hda_intel" then it should also avoid our problem
> as well.

See explanation in a recent previous comment; unloading any driver that
has an associated interrupt handler disables said handler. That's how
and why the fix works.

Yes, it needs testing (and porting to additional sound drivers).

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

On 11/23/2008 04:43 PM, Robb Topolski wrote:
> Please reevaluate -- see comment 226
>
> ** Changed in: alsa-utils (Ubuntu)
> Status: Invalid => New
>

alsa-utils really does not affect this bug. Every instance of alsactl
and amixer is called with a specific card index, which bypasses any
alsa-lib pcm.default redefinition.

Revision history for this message
goto (gotolaunchpad) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

"The fix as applied upstream is incomplete, because it needs to be added to all
drivers."
First thanks for trying to help out here. But in earlier releases the bug did not appear, isn't there any chance that the old behaviour can be reimplemented, if there are so many different chips with the BIOS bug, and so fixing every single driver would be utopia.

Revision history for this message
Dovel (dov01) wrote :

If it is indeed a BIOS bug, why wasn't it present in the last version of Ubuntu? My BIOS certainly has not changed. It also doesn't explain why one filesystem was affected and one wasn't. The driver most likely ha changed. So why is it a BIOS bug if it worked fine before?

The question here is this: is the man walking the dog or is the dog walking the man?

One question. Am I right in saying that the snd-hda-intel is being used for ATI Azalia cards as well? What other chips is it being used for? I have an ATI SBx00 Azalia chip, but the intel driver is in use for it. Perhaps the intel driver is the main culprit?

Can people please post what sound card they are using and what driver is being used for it?

My guess is that the intel driver will rate pretty high.

dov

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

I'll buy the beer if this is a BIOS bug.

Bug 295136 (aschuring) is the most succinct test case I've seen on this. That bug is a duplicate but shows what is going on. It should not be ignored.

Key observations:

---Quote---
After dist-upgrading to intrepid, Ubuntu appears to hang when shutting down. I have traced this down to the ALSA shutdown script taking more than a minute (!) to save sound card state. More specifically:

root@neminis:~$ time amixer -c0 -q set Mic 0% mute

real 0m8.061s
user 0m0.003s
sys 0m0.012s

This is reproducable only in single-user mode. When I run the amixer command when logged in into X (I can even run the command from a console, as long as X is running), the same command takes only a few milliseconds as it should. I will attach an strace log from above call. Of interest is the following line:

 4.013297 ioctl(5, FIONREAD, [37]) = 0

which occurs twice in the script. It seems to be expecting data from a network socket, but I can't figure out why.
---endQuote---

- commenting out everything in /usr/share/alsa/pulse.conf:
   amixer responds fast

(The description of this file is, "PulseAudio alsa plugin configuration file to set the pulseaudio plugin as default output for applications using alsa when pulseaudio is running." However, pulseaudio is not running, wasn't running, so why does Aschuring's commenting out of lines change anything? /usr/share/alsa/pulse.conf calls its config from /usr/share/alsa/pulse-alsa.conf which appears to set pulse as the default sound device. Aschuring's tests at the single-user root prompt create a similar situation to what all these users are reporting where when the user session is ended, X and pulse are no longer running, and the alsa configuration is to use pulse.)

- removing dns in /etc/nsswitch.conf or adding localhost to ipv6 ::1 in /etc/hosts
      amixer responds fast

(This addresses the networking delay, but not whether alsa should be looking for pulse at all when the server is not running. Removing dns from nsswitch.conf is not desirable.)

It's a shame that bug 295136 isn't the primary bug, because the best information is there. I don't know if launchpad etiquette allows that to happen -- but developers investigating this bug ought to be paying attention.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/24/2008 07:05 PM, Robb Topolski wrote:
>
> - commenting out everything in /usr/share/alsa/pulse.conf:
> amixer responds fast
>
> (The description of this file is, "PulseAudio alsa plugin configuration
> file to set the pulseaudio plugin as default output for applications
> using alsa when pulseaudio is running." However, pulseaudio is not
> running, wasn't running, so why does Aschuring's commenting out of lines
> change anything? /usr/share/alsa/pulse.conf calls its config from
> /usr/share/alsa/pulse-alsa.conf which appears to set pulse as the
> default sound device. Aschuring's tests at the single-user root prompt
> create a similar situation to what all these users are reporting where
> when the user session is ended, X and pulse are no longer running, and
> the alsa configuration is to use pulse.)
>
> - removing dns in /etc/nsswitch.conf or adding localhost to ipv6 ::1 in /etc/hosts
> amixer responds fast
>
> (This addresses the networking delay, but not whether alsa should be
> looking for pulse at all when the server is not running. Removing dns
> from nsswitch.conf is not desirable.)
>

If the alsa-lib conffile that libasound2-plugins provides contains the
trigger (i.e., redefining pcm.default so that pulse pcm+ctl routing is
used preferentially), then everyone should be able to reproduce this
symptom in single-user mode by passing the card index explicitly to
amixer/alsactl. Can you verify that is the case?

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Ok, I think I know whats going on here. Could those of you who experience the bug please try the attached alsa-utils file? This file should replace the one that currently resides in /etc/init.d. I
suggest backing up the original file first to be sure.

If that doesn't work, find the following line in the file:
PULSE_INTERNAL=0
and change it to:
export PULSE_INTERNAL=0

And try again.

Please all let me know whether this makes a difference.

Thanks.

Revision history for this message
Robb Topolski (funchords) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

@Luke,

My quick test --

There was the same hang with your new file as written (without the variable being exported).

THERE WAS NO HANG with

export PULSE_INTERNAL=0

but there was a hang if the variable was not exported.

-- Robb

PS: (reproducing tip for developers and experienced users -- do not try this if you don't understand it -- If your nameserver handles AAAA queries correctly, then you may not see the delay users are seeing that is caused by the failed DNS query for localhost. Edit /etc/resolv.conf and change your working nameserver line to one with an unoccupied IP before shutting down and rebooting, for example 192.168.0.177, and the DNS query being generated will go to a address that will timeout instead of to your nameserver. I just figured this out tonight and perhaps that is why this bug is so hit and miss -- some users have nameservers that are answering NXDOMAIN (and thus no delay) and some users have nameservers that aren't answering the query.)

Revision history for this message
Robb Topolski (funchords) wrote :

@Daniel Chen,

Hi Daniel, you're over my head a little bit. Can you tell me in easier terms what you'd like me to try and I'll be happy to try it.

@Any,

What does the PULSE_INTERNAL variable do? Was that a potential fix or just a diagnostic test?

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/24/2008 11:07 PM, Robb Topolski wrote:
>
>
> THERE WAS NO HANG with
>
> export PULSE_INTERNAL=0
>
> but there was a hang if the variable was not exported.
>

Ok, Robb, your test result confirms that an alsa-plugins check[0] (added
in intrepid) for an internal pulseaudio define prevents amixer/alsactl
from functioning properly.

(The -kernel workaround seems orthogonal to this bug, so it's a good
idea to follow up on that one in a separate thread.)

Thanks for your persistence, everyone!

[0]
http://git.alsa-project.org/?p=alsa-plugins.git;a=commitdiff;h=5d1c1b862603937bc28a66c58131b7bebc11e8c6

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

On 11/24/2008 11:27 PM, Robb Topolski wrote:
> @Daniel Chen,
>
> Hi Daniel, you're over my head a little bit. Can you tell me in easier
> terms what you'd like me to try and I'll be happy to try it.
>
> @Any,
>
> What does the PULSE_INTERNAL variable do? Was that a potential fix or
> just a diagnostic test?
>

Robb, my test case asks you to drop to single user (`sudo telinit 1') to
attempt to reproduce the hang. You would have needed to issue `sudo
alsactl -c0 store' once in single user, and if my (corrected) hypothesis
were correct, you would have experienced the hang still (and you should
if $PULSE_INTERNAL is still non-NULL). I would have asked you then to
unset $PULSE_INTERNAL in the alsa-utils initscript.

Luke's test case more quickly identified this culprit -- that
$PULSE_INTERNAL being set leads to any native alsa program to still
probe for pulseaudio, as stated in the modified code for the pulse
pcm+ctl plugin provided in libasound2-plugins.

As stated in my most recent e-mail, the alsa-kernel hang was a red
herring (although still a bug, just not relevant for this particular issue).

Changed in linux:
importance: Medium → Undecided
status: Triaged → Invalid
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On Tue, Nov 25, 2008 at 03:27:36PM EST, Robb Topolski wrote:
> What does the PULSE_INTERNAL variable do? Was that a potential fix or
> just a diagnostic test?

The PULSE_INTERNAL variable is used as a means for the alsa pulseaudio plugin to find out whether the pulseaudio sound server is running. Forcing it to 0 causes the plugin to assume that tghe server
is not running.

What I think is happening is that dispite amixer etc being called with specific card numbers to be adjusted, the pulseaudio plugin for alsa is being called at some point, and since pulseaudio can be
used over a network, this is causing some form of name resolution going on.

If more people report back with "export Pulse_internal=0", I'll get it added and pushed through as an update, to prevent any pulseaudio plugin goings on during the alsa-utils script running life.

Revision history for this message
Howard (bluesea-520) wrote : Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

Adding export PULSE_INTERNAL=0 solved the problem for me

i am using intrepid amd 64-bit

Revision history for this message
Dovel (dov01) wrote :

Daniel Chen

As much as I do not want to be drawn into a useless debate, the driver would seem to be successful if it does as intended with the hardware - BIOS included - provided by the vendor. The question of which of the two - the hardware's BIOS or the driver designed to work with it has the bug would seem to be more a subjective question than an objective one and as such is not fundamentally important. Please remember, whatever you think of our "armchair analysis". We, like you, are members of the Ubuntu community. We report and help fix bugs. We do Alpha and Beta testing. Some of us even spend time on #ubuntu@freenode just to do our bit for the community and help others with their Ubuntu related problems.

So without point scoring or whatever, please lets just get on with fixing this problem. I have read all of your posts to this bug as well as the others. I do however reserve the basic human privilege of exploring the issue for myself and reporting that which I consider to be possibly useful.

I would like to say that I DO APPRECIATE the time you have put into this bug, as I appreciate the work of all the others. Well done all, we're getting there!

So it seems to be number 3 then of the 3 possible causes I conjectured for this bug in comment 231? https://bugs.launchpad.net/ubuntu/+source/linux/+bug/274995/comments/231 The relationship between ALSA and pusleaudio.

Revision history for this message
Brion Swanson (brions) wrote :

I removed my previous work-around of linking /etc/init.d/NetworkManager to /etc/rc6.d/K40NetworkManager and changed /etc/init.d/alsa-utils to include 'export PULSE_INTERNAL=0' and the ALSA hang stayed away. So I assume this fix works for me as well.

It does not solve my overall restart/shutdown hang, but I believe I'm following another bug elsewhere that is trying to tackle that issue. This solves part 1 of 2 for me. :)

Thanks guys!

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically if non-loopback network interfaces are still up

On 11/25/2008 05:10 AM, Dovel wrote:
> Please remember, whatever you think
> of our "armchair analysis".

The above phrase refers to debugging where in the manufacturing process
a bios issue could have been introduced, not to debugging /this/ issue.
It's easy to mistake one for the other.

Daniel T Chen (crimsun)
Changed in pulseaudio:
status: New → Invalid
Changed in alsa-utils:
assignee: nobody → crimsun
importance: Undecided → Medium
status: New → In Progress
Daniel T Chen (crimsun)
description: updated
Revision history for this message
cevatcethun (cevatceyhun) wrote :

@Luke

I've changed the file as you directed. First restart was successful but after that crash continued. Then I've added "export". Again first restart was OK and then crash continued. (Interesting huh?)

My system is Ubuntu 8.04 with updates installed. This problem has started with the latest kernel upgrade.

Also note that after I've changed the file, audio became muted. I mean system starts with audio muted. Of course I can change that after each restart but this is somewhat annoying.

Revision history for this message
cevatcethun (cevatceyhun) wrote :

One more thing: If I keep audio muted, system restarts/shutdowns normally.

Revision history for this message
Daniel T Chen (crimsun) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote :
Daniel T Chen (crimsun)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.18-1ubuntu2

---------------
alsa-utils (1.0.18-1ubuntu2) jaunty; urgency=low

  * debian/init: Set PULSE_INTERNAL=0 to prevent PulseAudio from
    being inspected for invocations of alsactl and amixer. Fixes
    hangs attempting to (re)store mixer element values as
    reported in LP: #274995.

 -- Daniel T Chen <email address hidden> Tue, 25 Nov 2008 08:06:35 -0500

Changed in alsa-utils:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in linux:
status: New → Invalid
Changed in alsa-utils:
status: New → Fix Committed
Changed in network-manager:
status: New → Invalid
status: Invalid → Fix Committed
Changed in pulseaudio:
status: New → Invalid
Changed in network-manager:
status: Fix Committed → Invalid
Changed in pulseaudio:
status: Invalid → Fix Committed
Changed in network-manager:
status: Invalid → Fix Committed
status: Fix Committed → Invalid
Martin Pitt (pitti)
Changed in pulseaudio:
status: Fix Committed → Invalid
Revision history for this message
Michael Fay (mfay) wrote :

Downloaded proposed upgrades for PulseAudio and alsa and tried restarting a number of times. So far there has been no delay (which had been several minutes).

Revision history for this message
goto (gotolaunchpad) wrote :

With intrepid-proposed enabled and and system update & upgrade it runs now without problems, thank you!

Revision history for this message
Guglielmo Cola (guglielmocola) wrote :

Problem solved in my system installing alsa-utils proposed update. Thank you.

Revision history for this message
Biji (biji) wrote :

Confirmed... problem disappear after updating to proposed.... thanks !

Revision history for this message
FredBezies (fredbezies-deactivatedaccount) wrote :

Not fixed for me. I may suffer from another bug. I noticed that the led above my ethernet plug are blinking a lot on shutdown after end screen bar is empty. And I get an APCID exiting message when I press a key :(

I know there is a bug similar to this, but can't remember its number.

Revision history for this message
cevatcethun (cevatceyhun) wrote :

As I've pointed out earlier changing the alsa-utils file haven't solved my problem (I didn't installed the proposed update). Though this has solved my problem:

----
sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager
----

ref: http://ubuntuforums.org/showpost.php?p=6216439&postcount=58

Revision history for this message
Martin Pitt (pitti) wrote :

A friend of mine experienced this as well, and this update fixes the problem for him.

Revision history for this message
aschuring (aelschuring) wrote :

@cevatcethun : are you sure you are running 8.10 (intrepid)? In comment 257, you said that you're running 8.04, which shouldn't be affected by this bug. So maybe you're seeing the effects of another bug?

The alsa-utils fix works for me as well. Thanks to all involved!

Revision history for this message
Attila Hammer (hammera) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically due to internal alsa-plugins pulse check

I installed latest updates with Ubuntu 8.10 (proposed updates), the
shutdown is work perfect my desktop machine.

Attila

Revision history for this message
In , Davide (davide-redhat-bugs) wrote :

The problem seems fixed in FC10.

If somebody else had this issue and tried fc10, please report his results.

Revision history for this message
Walter_Wittel (wittelw) wrote :

I can also confirm the updating with proposed updates enabled fixed the shutdown problem on my Asus eee 900.

Slightly off topic (but I see others have sound problem on this thread, which is how I stumbled on it). My sound was still only static / scratchy sounds as before the upgrade. I suspect some config file got trashed when I held the power button to shut down my system during one of the hangs. Marking all alsa and gstreamer packages for reinstall didn't help.

 FWIW I followed the steps at http://ubuntuforums.org/showthread.php?t=789578 and the static went away but I still had no sound. I ran gstreamer-properties and played with settings and was able to get Test sounds by choosing the ACL662 device rather than default, but still no sound in Rhythmbox. I double-clicked the speaker and with HDA Intel (Alsa mixer) selected as the device toggled the "Headphone" off then back on and plugged in the headphones. Now sound works fine (and switches between speaker and headphones as expected). I haven't rebooted yet but am keeping my finders crossed :-)

Revision history for this message
In , Jaroslav (jaroslav-redhat-bugs) wrote :

OK, marking as fixed for F10. Thanks.

Revision history for this message
Robb Topolski (funchords) wrote :

All,

If you are or were experiencing this delay, there is a related bug report -- bug 301430 -- concerning the omission of localhost in the ipv6 part of /etc/hosts. While bug 274995 is fixed by the update to alsa-tools, the delay uncovered by bug 274995 was only experienced by those of us who had bug 301430 as well. Bug 301430 is marked as "incomplete" and will expire unfixed without confirmation that it affects others. I suspect that everyone who noticed a delay during shutdown owing to 274995 also has an IPv6 misconfiguration in the /etc/hosts file, even if they're not using IPv6 and even if the delay is now fixed. Please help out, check, and advise.

WHAT YOU SHOULD DO:

1. Even if the latest alsa-tools update fixed your problem, please check your /etc/hosts and verify whether or not it was set up correctly.

A CORRECTLY configured file originally had (or has) this line (the whitespace-separated word localhost is included among the hostnames in the ipv6 section of /etc/hosts):
 ::1 localhost ip6-localhost ip6-loopback

An INCORRECTLY configured file had or has this line (the whitespace-separated word localhost is NOT included among the hostnames):
 ::1 ip6-localhost ip6-loopback

2. If your system was or is INCORRECTLY configured, please visit bug 301430 and indicate so via a comment. The /etc/hosts file is created as part of the network installation and configuration. It would be interesting to know whether your install was an upgrade or fresh install. Look for any other developer questions you might be able to answer or add your other relevant insights or observations. Please consider subscribing to the bug by clicking "E-mail me about changes to this bug report) and indicating that the bug affects you (see the links toward the top of the report).

Thanks for your help and congrats on getting bug 274995 fixed!

Robb Topolski

Revision history for this message
Laurent GUERBY (laurent-guerby) wrote :

Robb, thanks for the hint. The 274995 proposed fix did not cure the issue for two of my machines, I will try 301430 suggestion tomorrow.

Revision history for this message
Robb Topolski (funchords) wrote :

Hi Laurent,

That's odd that the 274995 proposed fix doesn't solve the issue. Do you have more than 2 machines?

Did you follow the steps mentioned in https://wiki.ubuntu.com/Testing/EnableProposed to upgrade? Did alsa-utils update to 1.0.17-0ubuntu3 (the proposed fix) or are you using alsa-utils 1.0.17-0ubuntu2 (the previous version)? In /etc/init.d/alsa-utils, do you find the following line?:

export PULSE_INTERNAL=0

(Adding localhost to the ipv6 line doesn't actually fix the alsa-utils problem, it just masks it. The omission mentioned in bug 301430 along with the bug in 274995 causes enough delay to uncover the alsa-utils issue.)

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

On 11/29/2008 06:47 PM, Robb Topolski wrote:
>
> That's odd that the 274995 proposed fix doesn't solve the issue. Do you
> have more than 2 machines?

(Please remember that there is a confirmed linux bug, too. We just are
not tracking it in this bug for SRU reasons.)

Revision history for this message
Laurent GUERBY (laurent-guerby) wrote :
Download full text (6.6 KiB)

Yes I do have the export:

# grep PULSE_I /etc/init.d/alsa-utils
export PULSE_INTERNAL=0

Even with /etc/hosts line shutdown still hangs on a text screen with a blinking cursor at the top left.

I looked at the logs and it looks like during boot there are some issues with the kernel I didn't see with 8.04.

Nov 30 11:12:47 pc kernel: [ 36.653066] Pid: 4750, comm: hald-probe-seri Not tainted 2.6.27-9-generic #1
Nov 30 11:12:47 pc kernel: [ 36.653074] [<c037c4b6>] ? printk+0x1d/0x1f
Nov 30 11:12:47 pc kernel: [ 36.653097] [<c01781bc>] __report_bad_irq+0x2c/0xa0
Nov 30 11:12:47 pc kernel: [ 36.653113] [<c0178344>] note_interrupt+0x114/0x140
Nov 30 11:12:47 pc kernel: [ 36.653122] [<c01770b1>] ? handle_IRQ_event+0x41/0x80
Nov 30 11:12:47 pc kernel: [ 36.653131] [<c0178d93>] handle_level_irq+0xd3/0x100
Nov 30 11:12:47 pc kernel: [ 36.653139] [<c0152074>] ? tick_periodic+0x34/0x80
Nov 30 11:12:47 pc kernel: [ 36.653148] [<c01520de>] ? tick_handle_periodic+0x1e/0x80
Nov 30 11:12:47 pc kernel: [ 36.653155] [<c0106c15>] do_IRQ+0x45/0x80
Nov 30 11:12:47 pc kernel: [ 36.653166] [<c0137898>] ? irq_exit+0x8/0x90
Nov 30 11:12:47 pc kernel: [ 36.653176] [<c0113f8d>] ? smp_apic_timer_interrupt+0x5d/0x90
Nov 30 11:12:47 pc kernel: [ 36.653191] [<c0105003>] common_interrupt+0x23/0x30
Nov 30 11:12:47 pc kernel: [ 36.653199] [<c013765a>] ? __do_softirq+0x6a/0x120
Nov 30 11:12:47 pc kernel: [ 36.653207] [<c013776d>] do_softirq+0x5d/0x60
Nov 30 11:12:47 pc kernel: [ 36.653213] [<c01378e5>] irq_exit+0x55/0x90
Nov 30 11:12:47 pc kernel: [ 36.653219] [<c0106c1a>] do_IRQ+0x4a/0x80
Nov 30 11:12:47 pc kernel: [ 36.653226] [<c0105003>] common_interrupt+0x23/0x30
Nov 30 11:12:47 pc kernel: [ 36.653233] [<c037e762>] ? _spin_unlock_irqrestore+0x22/0x40
Nov 30 11:12:47 pc kernel: [ 36.653243] [<c02bf0a0>] serial8250_startup+0x200/0x700
Nov 30 11:12:47 pc kernel: [ 36.653257] [<c02b9fca>] uart_startup+0x4a/0x140
Nov 30 11:12:47 pc kernel: [ 36.653265] [<c02baa43>] uart_open+0xb3/0x1c0
Nov 30 11:12:47 pc kernel: [ 36.653272] [<c02ba990>] ? uart_open+0x0/0x1c0
Nov 30 11:12:47 pc kernel: [ 36.653279] [<c02a343c>] __tty_open+0x15c/0x340
Nov 30 11:12:47 pc kernel: [ 36.653292] [<c02a3644>] tty_open+0x24/0x40
Nov 30 11:12:47 pc kernel: [ 36.653299] [<c01b4d95>] chrdev_open+0xd5/0x1b0
Nov 30 11:12:47 pc kernel: [ 36.653311] [<c01b01fc>] __dentry_open+0xbc/0x260
Nov 30 11:12:47 pc kernel: [ 36.653318] [<c01b0477>] nameidata_to_filp+0x47/0x60
Nov 30 11:12:47 pc kernel: [ 36.653325] [<c01b4cc0>] ? chrdev_open+0x0/0x1b0
Nov 30 11:12:47 pc kernel: [ 36.653333] [<c01bdb1d>] do_filp_open+0x1bd/0x790
Nov 30 11:12:47 pc kernel: [ 36.653342] [<c019116a>] ? vma_prio_tree_remove+0x7a/0xf0
Nov 30 11:12:47 pc kernel: [ 36.653356] [<c01e1fce>] ? inotify_inode_queue_event+0xe/0xe0
Nov 30 11:12:47 pc kernel: [ 36.653367] [<c037e6dd>] ? _spin_lock+0xd/0x10
Nov 30 11:12:47 pc kernel: [ 36.653374] [<c01c9619>] ? expand_files+0x9/0x60
Nov 30 11:12:47 pc kernel: [ 36.653383] [<c01c9750>] ? alloc_fd+0xe0/0x100
Nov 30 11:12:47 pc kernel: [ 36.653391] [<c01afff5>] do_sys_open+0x65/0x100
Nov 30 11:12:47 pc...

Read more...

Changed in linux:
status: In Progress → Fix Released
Revision history for this message
Brion Swanson (brions) wrote :

Laurent, check out bugs #302452 and #286308. They are tracking a potential other bug or two that exhibits the same shutdown/restart behavior as this one, but is not caused by ALSA or necessarily the snd_hda_intel driver.

Revision history for this message
Brion Swanson (brions) wrote :

Making those bugs links: bug #302452 and bug #286308

Revision history for this message
Jens Janssen (jayjay) wrote :

For everyone having no sound after incomplete shutdown:
---
sudo /etc/init.d/alsa-utils reset
---

NOTE:
Until now the shutdown-problem ("Shutting down ALSA...") occurred only once for me. After using Power Off Button Ubuntu restarts without sound. But aplay shows following output:
---
 aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
---

Revision history for this message
kungmidas (ih82b) wrote :

I had this problem as well. During one evening, I always got the hang at "Shutting down ALSA..." when rebooting or shutting down the PC.

Perhaps not coincidentally, I was having network problems the same evening, due to maintenance from my ISP. (Basically, my local network was fine, I just didn't have an Internet connection).

The next evening, Internet was fine, and the hang was gone.

Also, after the first hang, all sound channels were muted (as in Bug #288039).

aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
Jens Janssen (jayjay) wrote :

Some additional information:
In my case this bug only occurs when connected to VPN (Cisco, vpnc). Upgrading alsa-utils 1.0.17-0ubuntu2 to 1.0.17-0ubuntu3 via intrepid-proposed helps.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.17-0ubuntu3

---------------
alsa-utils (1.0.17-0ubuntu3) intrepid-proposed; urgency=low

  * debian/init: Set PULSE_INTERNAL=0 to prevent PulseAudio from
    being inspected for invocations of alsactl and amixer. Fixes
    hangs attempting to (re)store mixer element values as
    reported in LP: #274995.

 -- Daniel T Chen <email address hidden> Tue, 25 Nov 2008 07:56:08 -0500

Changed in alsa-utils:
status: Fix Committed → Fix Released
Revision history for this message
Robb Topolski (funchords) wrote :

@Jens -- whatever DNS server you are using while connected to VPN probably doesn't quickly return an answer for a AAAA query for "localhost," while your non-VPN DNS does. alsa-utils 1.0.17-0ubuntu3 should avoid it in all cases. Also, see below.

@kungmidas -- when I change my DNS to some bogus address, I see this delay. When I use good DNS servers, the delay is gone. alsa-utils 1.0.17-0ubuntu3 should avoid it in all cases. Also, see below.

@all, please see https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/274995/comments/273 -- if you were seeing a delay -- even if it is fixed now, you probably also have or had that separate network configuration bug 301430 that allows DNS queries for localhost -- however generated -- to escape your local machine and network.

Revision history for this message
cevatcethun (cevatceyhun) wrote :

@aschuring

Sorry for the late reply. I have just updated to 8.10. The problem continues.

Revision history for this message
Alan (mrintegrity) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically due to internal alsa-plugins pulse check

Have you applied the latest updates? The problem is fixed here.

2008/12/5 cevatcethun <email address hidden>

> @aschuring
>
> Sorry for the late reply. I have just updated to 8.10. The problem
> continues.
>
> --
> MASTER storing ALSA mixer element values during shutdown hangs
> nondeterministically due to internal alsa-plugins pulse check
> https://bugs.launchpad.net/bugs/274995
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
cevatcethun (cevatceyhun) wrote :

@Alan

No I didn't apply the updates listed as "proposed" if this is what you asked. But I did install the regular updates.

Catching up with the posts.. I added "localhost" term to my /etc/hosts file which is mentioned above (bug 301430). I'm not sure the problem is completely gone but last few restarts/shutdowns were OK.

Revision history for this message
Kurtismonger (kurtismonger) wrote :

Some of the comments suggest adding ifconfig eth0 down, which did not work for my Acer Travelmate 4500. However I found one that suggested ifconfig eth0 shutdown, which cleared up the problem after I added a line for each network interface. I don't know enough about it to know if one or both are correct (down vs shutdown), but figured somebody else might find this useful.

Revision history for this message
Kurtismonger (kurtismonger) wrote :

I spoke to soon. On the next shutdown the problem returned. I'm running a fresh install of 8.10 downloaded on 11/23. I've tried all the suggested fixes except the -proposed updates thing, as I don't know how to do that. I was going to remove PulseAudio, but doing so from Synaptic also removes Ubuntu Desktop. My alsa-utils version is 1.0.17-0ubuntu3.

Revision history for this message
Robb Topolski (funchords) wrote :

Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed.

Revision history for this message
Kurtismonger (kurtismonger) wrote :

Ok. So I've added alsa-utils-proposed and pulseaudio-proposed and I'm still getting the acpid: exiting issue every single time I shutdown or restart.

Revision history for this message
Charles Profitt (cprofitt) wrote :

Kurtismonger

What laptop or desktop are you using? What is your hardware?

Revision history for this message
Kurtismonger (kurtismonger) wrote :

Machine Specs:
Acer TravelMate 4500/Ubuntu 8.10
Linux 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux
CPU: Intel Pentium M processor 1.60GHz
Memory: 512MiB
Display: VGA compatible controller Intel 82852/855GM Integrated Graphics Device
eth0: Broadcom BCM4401 100Base-T
eth1: Intel PRO/Wireless 2200BG [Calexico2] Network Connection
Audio: Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller

Revision history for this message
Jun Inoue (jun-lambda) wrote :

I'm reopening this bug because I'm running into this problem despite the fix dated 2008-12-03. Please let me know if opening a new one is more appropriate.
I'm using the amd64 version of Xubuntu 9.0.4 (default install) on a Sony Vaio VGN-G2. The system stalls during reboot/halt. For reboot, it shows the following error message:

nm-dispatcher.action: Caught signal 15, shutting down...
acpid: exiting

nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /org/freedesktop/Hal/devices/net_00_1a_80_d6_06_5a)
nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /oorg/freedesktop/Hal/devices/net_00_1f_3c_85_77_4a)

For halt, the message is just "acpi: exiting\n\n".

The system is still responsive in the sense that the Enter key advances the cursor, and the laptop blanks the screen after inactivity. The problem goes away if I add the link K88NetworkManager to rc0.d and rc6.d.

I got the number 88 from Debian's network-manager package.

Changed in network-manager:
status: Invalid → New
Revision history for this message
Jun Inoue (jun-lambda) wrote :

Revert. I meant to change the status for network-manager (Ubuntu), not NetworkManager.

Changed in network-manager:
status: New → Invalid
Revision history for this message
Michael Rooney (mrooney) wrote : Re: [Bug 274995] Re: MASTER storing ALSA mixer element values during shutdown hangs nondeterministically due to internal alsa-plugins pulse check

On Tue, Jun 16, 2009 at 10:17 PM, Jun Inoue<email address hidden> wrote:
> Please let me know if opening a new one is more appropriate.

Generally it is, I'd recommend that, unless someone else states
otherwise. When you do, please set this back to Invalid but feel free
to leave a comment with your new bug here for reference!

Revision history for this message
Jun Inoue (jun-lambda) wrote :

I'm reopening this bug because it reproduces with the latest release, which seems to have the fix released on 2008-12-03. I'm running a default install of Xubuntu 9.0.4 on a Sony Vaio VGN-G2.

Problem: the system hangs during reboot or halt if there is an active wireless connection. During reboot, I get the following message

 * Stopping anac(h)ronistic cron anacron
acpid: exiting

nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /or/freedesktop/Hal/devices/net_00_1a_80_d6_06_5a)
nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /org/freedesktop/Hal/devices/net_00_1f_3c_85_77_4a)
nm-dispatcher.action: Caught signal 15, shutting down...

The first line is sometimes different, but I can't seem to get the alternative message at the moment.
The system makes no further progress. For halt, the message is just "acpid: exiting\n\n", or sometimes it's just blank.
The system is not completely frozen; the Enter key advances the cursor and the console is blanked after inactivity (and lights up again in response to a keystroke). Ctrl+Alt+Delete seems to be registering---it doesn't cause the system to make progress but after repeatedly pressing the combination, I see "init: control-alt-delete respawning too fast, stopped".

The reproducibility is not 100% although it's fairly high, well over 50% (subjectively; I didn't acutally count).

The problem goes away if I link /etc/init.d/NetworkManager from rc0.d and rc6.d. I used the prefix K88 following Debian, but perhaps a different number is more appropriate for Ubuntu.

Changed in network-manager (Ubuntu):
status: Invalid → New
Revision history for this message
Jun Inoue (jun-lambda) wrote :

Revert. I filed my report under #388291 following Michael Rooney's kind advice.
...Sorry to spam everyone with status changes.

Changed in network-manager (Ubuntu):
status: New → Invalid
Changed in linux (Gentoo Linux):
status: Confirmed → Fix Released
Changed in linux (Gentoo Linux):
importance: Unknown → Medium
Changed in linux (Fedora):
importance: Unknown → Medium
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.