alsa-utils cannot always restore mixer settings correctly across upgrades
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | alsa-utils (Ubuntu) |
Medium
|
Unassigned | ||
Bug Description
The problem is that the alsa-utils package inadequately handles changes in
the mixer interface from one kernel version to another. On shutting down
the mixer state is stored in /var/lib/
with the new kernel, "alsactl restore" tries to feed this asound.state to
the (new 'n' improved) driver and the driver gags because the mixer
descriptions have changed.
/etc/init.
attempt to deal with this, but apparently that is not good enough.
It would be nice if alsactl and the driver dealt with this problem in a
better way.
| Daniel T Chen (crimsun) wrote : | #1 |
| Juerd (ubuntu-juerd) wrote : | #2 |
Created an attachment (id=3900)
Output from amixer
| Juerd (ubuntu-juerd) wrote : | #3 |
Attached as requested. My model is 2525 - this shouldn't matter. Are you using
the same kernel version? It did work for me in earlier kernels (2.6.10, from
hoary). It may not be clear because it's only in the title, and not in the
comment, but the kernel in which it doesn't work is 2.6.12-8.
| Daniel T Chen (crimsun) wrote : | #4 |
Simple mixer control 'Headphone Jack Sense',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
This is a difficult problem to resolve, as a search through Bugzilla for
dist-upgrades between Hoary and Breezy regarding ALSA reveals. Technically it
should be assigned to alsa-utils, not linux, because on state restoration the
mixer is important not the modules.
| Daniel T Chen (crimsun) wrote : | #5 |
(In reply to comment #3)
> Attached as requested. My model is 2525 - this shouldn't matter. Are you using
> the same kernel version? It did work for me in earlier kernels (2.6.10, from
> hoary). It may not be clear because it's only in the title, and not in the
> comment, but the kernel in which it doesn't work is 2.6.12-8.
I'm using 2.6.12-8.13, and it works fine. See the fix I stated in the previous
reply.
| Juerd (ubuntu-juerd) wrote : | #6 |
Flipping that bit helped. Thanks a lot! Music again! Woohoo.
| Daniel T Chen (crimsun) wrote : | #7 |
More to the issue: When Hoary was installed, sound worked by default, correct?
You didn't need to (un)mute any mixer elements, correct? Then when Breezy was
installed, after you rebooted into 2.6.12, this mixer element was unmuted, correct?
| Juerd (ubuntu-juerd) wrote : | #8 |
All correct. I started changing things (though not this particular item, or any
other item in kmix's "Switches" tab) only after realizing there was no sound
anymore.
I had the same problem on my IBM T43:
Headphone Jack Sense AND Line Jack Sense need to be muted to make it work again.
| Thomas Hood (jdthood) wrote : | #10 |
The problem is that the alsa-utils package inadequately handles changes in
the mixer interface from one kernel version to another. On shutting down
the mixer state is stored in /var/lib/
with the new kernel, "alsactl restore" tries to feed this asound.state to
the (new 'n' improved) driver and the driver gags because the mixer
descriptions have changed.
/etc/init.
attempt to deal with this, but apparently that is not good enough.
It would be nice if alsactl and the driver dealt with this problem in a
better way.
alsa-utils should be changed so that instead of doing a mere
"alsactl restore" it takes the following steps in the "start"
method (on boot):
Move old asound.state to asound.state_PREV
Run "alsactl store" to create new asound.state
Run asound.state through a processor which sets "sane"
default values without changing the structure of the file
Use the values in asound.state_PREV to update the values in
the new asound.state without changing the structure of
the file
Run "alsactl restore"
Mandriva already does something like this.
Any volunteers to implement this? ;)
| Thomas Hood (jdthood) wrote : | #11 |
*** Bug 21765 has been marked as a duplicate of this bug. ***
| Mike Goldman (whig) wrote : | #12 |
*** Bug 24002 has been marked as a duplicate of this bug. ***
| Daniel T Chen (crimsun) wrote : | #13 |
*** Bug 24011 has been marked as a duplicate of this bug. ***
| Thomas Hood (jdthood) wrote : | #14 |
It appears from #17858 that this bug can cause plug:spdif not to work.
(I am not sure why.)
| description: | updated |
| Changed in alsa-utils: | |
| assignee: | jdthood → nobody |
| Justin Mason (jm-ubuntu) wrote : | #15 |
this is still an issue in current dapper; it just bit me after a routine kernel update/reboot.
The error I got was:
: jm 73...; sudo /etc/init.
Password:
* Setting up ALSA...
* warning: 'alsactl restore' failed with error message 'alsactl: set_control:894: warning: name mismatch (External Amplifier/Headphone Jack Sense) for control #26
alsactl: set_control:896: warning: index mismatch (0/0) for control #26
alsactl: set_control:898: failed to obtain info for control #26 (Operation not permitted)'...
...done.
It was quite tricky to fix, unfortunately, since on my hardware (Thinkpad T40) enabling "Line Jack Sense" inhibits all audio output as a side-effect; attempting to manually recreate a working alsamixer setup led me to switch that on (out of ignorance of the side-effects).
An automatic, script-based recreation of a "sane" mixer setup would have avoided that mis-step.
| Kevin Otte (nivex) wrote : | #16 |
This bug is a year and change old, and there have been three releases since it was filed. Safe to close?
| NeoFax (neofax99) wrote : | #17 |
I am having the problem with Jaunty. I just upgraded from the 2.6.28-12 to 2.6.28-13 kernel and sound does not work. Here is the error from sudo invoke-rc.d alsa-utils restart:
* Shutting down ALSA... [ OK ]
* Setting up ALSA... * warning: 'alsactl restore' failed with error message 'alsactl: set_control:1400: Cannot write control '2:0:0:Four Channel Mode:0' : Operation not permitted'... Invalid card number.
Usage: amixer <options> [command]
Available options:
-h,--help this help
-c,--card N select the card
-D,--device N select the device, default 'default'
-d,--debug debug mode
-n,--nocheck do not perform range checking
-v,--version print version of this program
-q,--quiet be quiet
-i,--inactive show also inactive controls
-a,--abstract L select abstraction level (none or basic)
-s,--stdin Read and execute commands from stdin sequentially
Available commands:
scontrols show all mixer simple controls
scontents show contents of all mixer simple controls (default command)
sset sID P set contents for one mixer simple control
sget sID get contents for one mixer simple control
controls show all controls for given card
contents show contents of all controls for given card
cset cID P set control contents for one control
cget cID get control contents for one control
Invalid card number.
Usage: amixer <options> [command]
Available options:
-h,--help this help
-c,--card N select the card
-D,--device N select the device, default 'default'
-d,--debug debug mode
-n,--nocheck do not perform range checking
-v,--version print version of this program
-q,--quiet be quiet
-i,--inactive show also inactive controls
-a,--abstract L select abstraction level (none or basic)
-s,--stdin Read and execute commands from stdin sequentially
Available commands:
scontrols show all mixer simple controls
scontents show contents of all mixer simple controls (default command)
sset sID P set contents for one mixer simple control
sget sID get contents for one mixer simple control
controls show all controls for given card
contents show contents of all controls for given card
cset cID P set control contents for one control
cget cID get control contents for one control
Invalid card number.
Usage: amixer <options> [command]
Available options:
-h,--help this help
-c,--card N select the card
-D,--device N select the device, default 'default'
-d,--debug debug mode
-n,--nocheck do not perform range checking
-v,--version print version of this program
-q,--quiet be quiet
-i,--inactive show also inactive controls
-a,--abstract L select abstraction level (none or basic)
-s,--stdin Read and execute commands from stdin sequentially
Available commands:
scontrols show all mixer simple controls
scontents show content...
| arkmundi (rkerver) wrote : | #18 |
Confirm problems in Jaunty, upgrading to 2.6.28-13 kernel. Please advance importance to High. Many people are experiencing this problem. Am now running without sound awaiting a fix via normal updgrade path. Thank you!
| LimCore (limcore) wrote : | #19 |
I had this problem as well (few days ago on ubuntu 9.04 amd64)
| Nilbus (nilbus) wrote : | #20 |
I am also experiencing this problem.
The volume levels are not properly restored on boot, though they are restored if I run alsactl restore, even though the error message is displayed.
$ sudo alsactl restore
alsactl: set_control:1400: Cannot write control '3:0:0:EMU10K1 PCM Send Routing:0' : Operation not permitted
alsactl: set_control:1400: Cannot write control '3:0:0:EMU10K1 PCM Send Volume:0' : Operation not permitted
$ sudo service alsa-utils start
* Setting up ALSA...
* warning: 'alsactl restore' failed with error message 'alsactl: set_control:1400: Cannot write control '3:0:0:EMU10K1 PCM Send Routing:0' : Operation not permitted
alsactl: set_control:1400: Cannot write control '3:0:0:EMU10K1 PCM Send Volume:0' : Operation not permitted'...
Invalid card number.
Usage: amixer <options> [command]
... (amixer error message repeated many times)
| Nilbus (nilbus) wrote : | #21 |
I should mention that I am running a fresh install of Jaunty
| goddisignz (gottschlingp) wrote : | #22 |
Running fresh Karmic Mythbuntu
warning: 'alsactl restore' failed with error message 'alsactl: set_control:1389: Cannot write control '2:0:0:Four Channel Mode:0' : Operation not permitted'...
| sukumar (wittyguysuku) wrote : | #23 |
My sound is muted and when I tried:
sudo service alsa-utils restart
* Shutting down ALSA... [ OK ]
* Setting up ALSA... * warning: 'alsactl restore' failed with error message 'alsactl: set_control:1389: Cannot write control '2:0:0:
alsactl: set_control:1389: Cannot write control '3:0:0:IEC958 Playback Default:0' : Operation not permitted'... ...done.
But I can hear the sound for a moment (say 1 sec), when running the above command.
Has this problem is fixed?
| Daniel T Chen (crimsun) wrote : Re: [Bug 21804] Re: alsa-utils cannot always restore mixer settings correctly across upgrades | #24 |
@sukumar Which Ubuntu release?
| Jan Braunisch (x-r6) wrote : | #25 |
I'm running kubuntu karmic and sound worked well until one reboot (i dont know if i had installed a new kernel before rebooting) when kmix and amarok said the sound card is not present and not working (i remember seeing both not present and not working)
root@j:~# /etc/init.
* Shutting down ALSA... [ OK ]
* Setting up ALSA... * warning: 'alsactl restore' failed with error message 'alsactl: set_control:1389: Cannot write control '3:0:0:EMU10K1 PCM Send Routing:0' : Operation not permitted
alsactl: set_control:1389: Cannot write control '3:0:0:EMU10K1 PCM Send Volume:0' : Operation not permitted'... ...done.
i tried removing /var/lib/
lspci shows:
00:0d.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
it's an Audigy2, i wonder why it doesn't say
root@j:~# uname -a
Linux j 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009 x86_64 GNU/Linux
root@j:~# rm /var/lib/
root@j:~# alsactl restore
alsactl: load_state:1569: Cannot open /var/lib/
Unknown hardware: "Audigy2" "SigmaTel STAC9721,23" "AC97a:83847609" "0x1102" "0x1007"
Hardware is initialized using a guess method
/usr/share/
/usr/share/
/usr/share/
/usr/share/
i hope this proves useful for someone!
jan
| Colin Watson (cjwatson) wrote : | #26 |
alsa-utils (1.0.23-2ubuntu2) maverick; urgency=low
* debian/init: Restore change from 1.0.21-1ubuntu2 lost during merge
that skips muting and zeroing levels prior to shutdown/reboot,
which was a hack for broken drivers. This change closes LP: #21804,
LP: #208920, #227505, #360108, #432660, #449783, #553132, #564472,
LP: #584609, #592016, #596360, #613054, #617516, #622487, #632019.
* debian/
upstream git changesets:
dcb90a77 - Use "Found hardware:" instead "Unknown hardware:"
7f6a55e2 - use "generic method" instead "guess method"
52bd2f8a - Handle "Capture Source" and "Mic Boost"
ef919a47 - Initialize also "Master Front Playback Volume" & "Switch"
(yes, this last changeset is included despite the patch filename)
-- Daniel T Chen <email address hidden> Sun, 05 Sep 2010 11:57:59 -0400
| Changed in alsa-utils (Ubuntu): | |
| status: | Confirmed → Fix Released |


I have an X41 model 2527, and sound works fine with it.
Please attach the output from ''amixer''.