amixer -q sset Master toggle does mute, but does not unmute!

Bug #878986 reported by Dario Manesku
194
This bug affects 45 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

I am using keyboard shortcuts to increase/decrease/mute volume by executing:
amixer -q sset Master 5+
amixer -q sset Master 5-
amixer -q sset Master toggle

From when I have updated to Ubuntu 11.10, 'amixer sset Master toggle' does mute the volume, but when i execute it again it does not unmute it. In command line, it looks fine:

:~$ amixer sset Master toggle
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 16 [52%] [-22.50dB] [off]

:~$ amixer sset Master toggle
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 16 [52%] [-22.50dB] [on]

but it remains muted. I use pavucontrol to unmute sound from the GUI.

Info:
:~$ apt-cache policy alsa-utils
alsa-utils:
  Installed: 1.0.24.2-0ubuntu8
  Candidate: 1.0.24.2-0ubuntu8
  Version table:
 *** 1.0.24.2-0ubuntu8 0
        500 http://rs.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

:~$ lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-12-generic 3.0.0-12.20
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: fglrx
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: instructor 19328 F.... pulseaudio
 /dev/snd/pcmC0D0p: instructor 19328 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfe9f8000 irq 43'
   Mixer name : 'Realtek ALC883'
   Components : 'HDA:10ec0883,1043829f,00100002'
   Controls : 37
   Simple ctrls : 22
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfeafc000 irq 44'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 4
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Thu Oct 20 19:31:13 2011
HibernationDevice: RESUME=UUID=cf6e9ff7-a63e-457c-aba4-706765c58de1
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: System manufacturer P5K
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic root=UUID=5611c46a-40ee-4ded-bbda-b8365335826b ro acpi_enforce_resources=lax quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-12-generic N/A
 linux-backports-modules-3.0.0-12-generic N/A
 linux-firmware 1.60
RfKill:

SourcePackage: linux
UpgradeStatus: Upgraded to oneiric on 2011-10-16 (3 days ago)
dmi.bios.date: 07/03/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0603
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5K
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0603:bd07/03/2007:svnSystemmanufacturer:pnP5K:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5K:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5K
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: instructor 19328 F.... pulseaudio
 /dev/snd/pcmC0D0p: instructor 19328 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfe9f8000 irq 43'
   Mixer name : 'Realtek ALC883'
   Components : 'HDA:10ec0883,1043829f,00100002'
   Controls : 37
   Simple ctrls : 22
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfeafc000 irq 44'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 4
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
NonfreeKernelModules: fglrx
Package: alsa-base 1.0.24+dfsg-0ubuntu2
PackageArchitecture: all
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Tags: oneiric
Uname: Linux 3.0.0-12-generic x86_64
UpgradeStatus: Upgraded to oneiric on 2011-10-16 (3 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 07/03/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0603
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5K
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0603:bd07/03/2007:svnSystemmanufacturer:pnP5K:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5K:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5K
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
---
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
NonfreeKernelModules: fglrx
Package: alsa-utils 1.0.24.2-0ubuntu8
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Tags: oneiric
Uname: Linux 3.0.0-12-generic x86_64
UpgradeStatus: Upgraded to oneiric on 2011-10-16 (3 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Dario Manesku (dariomanesku) wrote :
tags: added: apport-collected
description: updated
Revision history for this message
Dario Manesku (dariomanesku) wrote : AlsaDevices.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : AplayDevices.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : ArecordDevices.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : BootDmesg.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : Card1.Codecs.codec.0.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : Dependencies.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : PciMultimedia.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : ProcEnviron.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : PulseSinks.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : PulseSources.txt

apport information

description: updated
Revision history for this message
Dario Manesku (dariomanesku) wrote : Dependencies.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote : ProcEnviron.txt

apport information

Revision history for this message
Dario Manesku (dariomanesku) wrote :
Revision history for this message
LittleHorror (littlehorror) wrote :

On my machine all symptoms are exactly the same, so I consider this bug to be the same one.

In my case "amixer set Master toggle" toggles 2 channels (namely Master and PCM) but unmutes only one (Master, PCM stays muted).
"amixer set PCM toggle" behaves similarly - mutes both Master and PCM, but unmutes only PCM.

All mentioned is also true with sset and mute/unmute commands.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 878986] Re: amixer -q sset Master toggle does mute, but does not unmute!

Is this symptom reproducible without PulseAudio running?

Revision history for this message
Dario Manesku (dariomanesku) wrote :

Yes. I've run 'pulseaudio --kill' and I've followed the behavior in pavucontrol.

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

Did you also disable PulseAudio's autorespawn?

Revision history for this message
Dario Manesku (dariomanesku) wrote :

Good point, I didn't. After disabling autospawn, pavucontrol won't start nor mpd wants to play (as it's configured to use pulse audio).
It works good now. I've tested by playing a file in VLC and using alsamixer. Therefore, it's seems that the problem is in pulseaudio and not in alsa-utils.

Revision history for this message
Dario Manesku (dariomanesku) wrote :

Can you address the bug to pulseaudio or should I create a new one there ?

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

At this point it's unclear. However, are you able to correctly toggle the
mute status using amixer with the version of pulse in oneiric-proposed?

Revision history for this message
Dario Manesku (dariomanesku) wrote :

I've just activated oneiric-proposed software source and updated but everything remains the same.

Revision history for this message
Jmadero (jmadero) wrote :

This problem does exist, there is a workaround script floating around but it'd be nice to have the package fixed. Thanks for posting the bug

thinkpad (fellowsgarden)
tags: added: precise
Revision history for this message
David Henningsson (diwic) wrote :

I think the problem is the following:
1) You mute Master
2) Pulseaudio picks the change up, thinks you want to mute and mutes itself, as well as the other ones just to ensure you're really really muted everywhere.
3) You unmute Master
4) Pulseaudio does pick up that change, but at the same time, since other mixer controls are now muted, PulseAudio does nothing.

Btw, by controlling PulseAudio instead of amixer, your keyboard shortcuts will work correctly.

affects: alsa-utils (Ubuntu) → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
David Henningsson (diwic) wrote :

...and, if you're running Gnome at least, you can set your shortcuts in the system settings, these shortcuts go against PulseAudio.

Revision history for this message
thinkpad (fellowsgarden) wrote :

thx David! Might be helpful. However, could you plz elucidate a bit more? What would I need to change? Which command(s) would do the trick? This http://askubuntu.com/questions/77522/command-to-unmute-and-maximize-volume didn't work for me; haven't tried the bash script yet, though... I've always been confused by the difference between PulseAudio & alsamixer, and am not even sure what I'm using, what's installed & enabled, etc... thx again!

Revision history for this message
Raymond (superquad-vortex2) wrote :

This problem still exist in ubuntu 12.04, when using amixet mute master with -c0 , pulse audio server actually also mute PCM and surround on stac9708 but unumte master does not unmute PCM and surround

You have to kill pulse audio and stop autospawn feature to restore the normal behavior of amixer, alsamixer, was iced and gnome-alsamixer

Revision history for this message
Mateo Salta (mateo-salta) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

The ALC883 series 7.1+2 Channel High Definition Audio (HDA) codecs are compliant with Microsoft's UAA (Universal Audio Architecture). The ALC883 series provide 10 DAC channels that simultaneously support 7.1 sound playback, plus 2 channels of independent stereo sound output (multiple streaming) through the front panel stereo output.

there is no hareware control which allow you to mute the front panel and rear panel since they can play different stream

Revision history for this message
aka (vangop) wrote :

There seems to be a workaround (works for me)
$ amixer -D pulse set Master 1+ toggle

Revision history for this message
David Henningsson (diwic) wrote :

I'm setting this to "Wishlist", because it's not a currently supported way to mute/unmute the system, at least not when PulseAudio is running.

The supported way would be to use "pactl set-sink-mute" followed by sink name/index and "toggle".
"amixer -D pulse" should probably work as well.

I do understand that it is a bit confusing that muting works but not unmuting, so if anyone wants to submit a patch against PulseAudio that would improve this behaviour, feel free to give it a try.

Changed in pulseaudio (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Kevin Masterson (kmast1212) wrote :

Had same problem. After searching online i found this command.

amixer -D pulse set Master 1+ togglemute

Thats mutes and unmutes fine for me, but I had to bind it to ctrl+m
I cant seem to find a way to change the command for my laptops original mute function (fn+f6)

Hope this helps, and if anyone knows a way to change the command for the original laptop bindings, it would be much appreciated!

Revision history for this message
Taihsiang Ho (tai271828) wrote :

Kevin, please note the root cause is the communication between amixer and pulseaudio, see comment #29

command like "amixer -D pulse ..." could look like to "solve" this issue because amixer builds the mixer control directly from the "virtul" device Pulseaudio instead of the "real" device, say your audio card.

To bind the hotkey together with a new command like "amixer -D ..." is only a workaround.

PS
1. If you are interested in this, you could try "alsamixer" and "alsamixer -D pulse" and see what's difference between the device name on the alsamixer panel.

2. another interesting experiment: you could try to un-mute all of the channels besides Master (e.g. Speaker, Headphone, PCM ...etc. ), and you should see the sound comes back.

Revision history for this message
Raymond (superquad-vortex2) wrote :

:~$ amixer sset Master toggle
 Simple mixer control 'Master',0
   Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
   Playback channels: Mono
   Limits: Playback 0 - 31
   Mono: Playback 16 [52%] [-22.50dB] [off]

this means that ctl.default is not set to ctl.pulse as your master volume still have dB scale but pulseaudio master volume not yet implemented dB scale

Revision history for this message
Jarno Suni (jarnos) wrote :

As for comment #39 PS 2, it does not help, even if you un-mute all channels separately by amixer using the default (not pulse) device; sound stays muted until you unmute using pulseaudio mixer.

Revision history for this message
jimbo1qaz (jimbo1qaz-2) wrote :

I need this bug to be fixed. The issue is I am routing Pulseaudio through JACK plugin, and "amixer -D pulse" only mutes apps playing through PulseAudio but not JACK Audio, and is consequently not a working solution for me.

To post a comment you must log in.