No way to reset ALSA state from GUI

Bug #95940 reported by thomerz on 2007-03-25
14
Affects Status Importance Assigned to Milestone
GNOME Applets
Won't Fix
Wishlist
KDE Multimedia
New
Undecided
Unassigned
gnome-applets (Ubuntu)
Wishlist
Ubuntu Desktop Bugs
Hardy
Wishlist
Ubuntu Desktop Bugs
linux (Ubuntu)
Medium
Unassigned
Hardy
Medium
Unassigned
linux-source-2.6.20 (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

There is no way to reset the ALSA state from the mixer applet.

Several users have found that they lose sound, and that the problem turns out to be an asound.state file which does not work for their hardware. It has not been established how the file came to be corrupt or whether the problem was caused by upgrades to newer versions which did not handle the file as written by the previous version. It has not been established what aspect of the asound.state files caused the problem. But several approaches can fix the problem:

  1. Removing the ALSA modules, deleting the asound.state file, and reloading the modules. This is difficult to do for non-expert users, because applications such as the Gnome mixer and volume control can be using the modules, preventing their unloading.

  2. Removing the ALSA modules, and editing the asound.state to an ultra-minimal state that reflects only the primary card, and reloading the modules.

 3. Invoking the alsa-utils "reset" option. On Ubuntu, typing this fixes the problem for Intel sound cards:

     /etc/init.d/alsa-utils reset Intel

The latter option is thought to be best, because it doesn't require unloading and reloading modules.

It would be very useful to be able to invoke that "reset" command from the GUI Gnome mixer applet, which is why this bug has been filed on that.

thomerz (thomas-ulz-admex) wrote :
thomerz (thomas-ulz-admex) wrote :
thomerz (thomas-ulz-admex) wrote :
description: updated
description: updated
description: updated
Mark Shuttleworth (sabdfl) wrote :

Sound is not working for me at all on my X60, on Gutsy. Should I file a new bug on 2.6.23?

Ben Collins (ben-collins) wrote :

This wont be fixed in feisty, so marking wont-fix there.

Changed in linux-source-2.6.20:
assignee: ubuntu-audio → nobody
status: Confirmed → Won't Fix
Mark Shuttleworth (sabdfl) wrote :
Mark Shuttleworth (sabdfl) wrote :
Mark Shuttleworth (sabdfl) wrote :
Changed in linux-source-2.6.20:
assignee: ubuntu-audio → nobody
status: Confirmed → Won't Fix
Amit Kucheria (amitk) wrote :

On Gutsy: Make sure you have linux-backports-modules installed

1. Delete /var/lib/alsa/asound.state
2. sudo rmmod snd-hda-intel
3. sudo modprobe snd-hda-intel

This should restore your mixer setting to default.
thomerz: Please report if this fixes your sound problems.

Note, you may have to stop your Gnome mixer in order to do this. I think
this command will do the trick. Don't "reload" it till you have done the
module dance.

ps ax | grep mixer_applet2 | grep -v grep | cut -d" " -f 1 | xargs kill
-HUP

Hi, I've got similar problem with my laptop. After recent upgrade sound completely disappeared.
It uses snd_intel_8x0 module and when I start for example gedit I get in console:
ALSA lib conf.c:3949:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM surround71:0
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0

can't actually do rmmod on snd_intel_8x0 since it's being used by a number of other modules (I would better reboot, instead of removing them all...)

I think the issue we are finding is that an ALSA asound.state file
dumped by one version of the module causes silent problems with another.
There really should be a way to force a "fresh start" which updates that
file with some simple, universal settings.

btw, deleting asound.state and rebooting solved my problem

In /etc/init.d/alsa-utils there is a function "sanify_levels_on_card"
which seems useful as a "reset" option. We should expose this in the
mixer UI.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Mark Shuttleworth (sabdfl) wrote :

This problem turned out to be a bad /var/lib/alsa.state. I think we
should expose the "reset" function in /etc/init.d/alsa-utils in the UI
of the mixer. So one can go to the mixer, and press "reset" and have
that function called to sanity-check the state.

Mark

Attaching to gnome-applets in response to Mark's comments. But I am unable to mark it as a 'Wishlist' bug though...

Changed in gnome-applets:
importance: Undecided → Wishlist
Pedro Villavicencio (pedro) wrote :

I've sent this to the GNOME upstream tracker at: http://bugzilla.gnome.org/show_bug.cgi?id=511778

Changed in gnome-applets:
status: New → Unknown
assignee: nobody → desktop-bugs
Changed in gnome-applets:
status: Unknown → New
description: updated
Ben Collins (ben-collins) wrote :

Not a kernel issue

Changed in linux:
status: Triaged → Invalid
Dana_r (danarea) wrote :

This problem normally raises it's head for me when there is some glitch in a stream using AC3 passthrough (DVD's) or when the player crashes during playback. This results in most audio playback ceasing to work *except* for AC3. If the asound.state is stuck configured for AC3 pass through, then it makes sense that non-AC3 sources would fail to work.

I'm using Hardy Beta and alsa-base 1.0.16-0ubuntu4

Dana_r (danarea) wrote :
James Hogarth (jameshogarth) wrote :

I'm finding I'm losing sound after suspending on Hardy Beta and have not been able to restart it until finding this thread. I also need to kill pulseaudio to unload the modules so I use the script below which combines most things here. Thanks for all the help and suggestions - not sure I yet understand what is causing my problem but a good workaround...

alsa-base/hardy uptodate 1.0.16-0ubuntu4
kernel - 2.6.24-14-generic #1 SMP
-------------------------
#!/bin/sh

#Kill all processes using sound and restart them

ps ax | grep mixer_applet2 | grep -v grep | cut -d" " -f 1 | xargs kill -HUP

killall pulseaudio

rm /var/lib/alsa/asound.state

rmmod snd-hda-intel

modprobe snd-hda-intel

pulseaudio &

Changed in gnome-applets:
status: New → Triaged

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Changed in gnome-applets:
status: New → Won't Fix
trevor t (launch-etjt) wrote :

/etc/init.d/alsa-utils reset Intel
got my sound working again - thanks a million! I was screwing around with settings trying to get the mic to work. I still cannot record from mic, but it could be worse.

Changed in gnome-applets:
importance: Unknown → Wishlist
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in gnome-applets (Ubuntu Hardy):
status: New → Won't Fix
tags: added: hardy
tags: added: jaunty
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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