Short-circuit in pm-utils hook can cause incorrect mixer state to be (re)stored
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pulseaudio (Ubuntu) |
Fix Released
|
Low
|
Daniel T Chen | ||
Lucid |
Won't Fix
|
Low
|
Daniel T Chen |
Bug Description
-- Lucid SRU report follows --
Impact: A short-circuit in PulseAudio's pm-utils hook to check for the ConsoleKit active seat when (re)storing sink and source states can result in the wrong states being stored. (This change was introduced for suspend-to-* and resume optimization.)
Bug resolution: Prior to suspend-to-*, save all PA users' sink & source states and then mute only the active ConsoleKit seat's sink & source. After resume, restore all PA users' pre-suspend sink & source states. This change has been made in revision 292: http://
Minimal patch: http://
TEST CASE: Detailed below in the original defect report
Regression potential: Suspend-to-* and resume will require [negligibly] more time. Otherwise, there are no identified regressions.
-- Original defect report follows --
Binary package hint: pulseaudio
I noticed this the other day after accidentally going into "Switch User" mode: I had my own pulseaudio instance, and gdm had its own. I then suspending my machine, and upon resuming, sound was muted.
The reason for this happening is due to a bug in the 01Pulseaudio pm-utils hook.
1. First, it checks the status of gdm's pulseaudio, stores it, then mutes it.
2. Then, it checks the status of my pulseaudio, stores it, and also mutes it. Due to #1, the sink is already muted, as both sinks were pointing to the same physical device. Hence, the stored states are as follows: gdm's sink is not muted, but mine is.
Upon resuming:
1. It reads gdm's state, and unmutes the sink.
2. Then it reads my pulseaudio's saved state, and mutes the sink again.
Result: The sink is muted after resuming from suspend.
N.B.:
This seems to be a corner case that only occurs when multiple pulseaudio instances are running, and both contain sinks pointing to the same underlying device. It can probably be fixed by changing the pm-utils hook order to read and store all the states of the sinks prior to muting them.
description: | updated |
Changed in pulseaudio (Ubuntu Lucid): | |
milestone: | none → lucid-updates |
assignee: | nobody → Daniel T Chen (crimsun) |
status: | Triaged → Fix Committed |
description: | updated |
tags: | added: testcase |
Actually, the proper fix is to rip out the pm-utils hook altogether. It's merely a workaround for broken HDA drivers (sadly, nearly all of them) anyhow.