Bug#913102: pulseaudio does not restore correct mic/speaker state

Alexandre Vaissière avaiss at fmiw.org
Sun Jan 6 13:22:29 GMT 2019


Le 07/11/2018 à 05:32, Alexandre Vaissière a écrit :
> Le 06/11/2018 à 23:55, Felipe Sateler a écrit :
>> Control: tags -1 moreinfo
>>
>> On Tue, Nov 6, 2018 at 7:27 PM Alexandre Vaissiere <avaiss at fmiw.org
>> <mailto:avaiss at fmiw.org>> wrote:
>>
>>     Package: pulseaudio
>>     Version: 12.2-2
>>     Severity: normal
>>
>>
>>     * Expected behaviour
>>
>>     When I restart my machine, I expect that the sound/mic state is
>>     properly
>>     restored:
>>     - If sound/mic was muted at shutdown, I expect for it to be muted
>>     at startup,
>>     - If sound/mic was unmuted at shutdown, I expect for it to be
>>     unmuted at
>>     startup.
>>
>>     * Current behaviour
>>
>>     Currently, whatever the state was at shutdown, mic and sound are
>>     *unmuted* at
>>     startup.
>>
>> This doesn't look like pulseaudio, but that someone is changing the
>> mute level. The first potential culprit is gnome-shell. Does this
>> problem happen if you log into a console instead of gnome?
>
> You seem to be right: if I log into a console, and I start pulseaudio
> (as it does not start by itself in this case) with systemctl --user
> start pulseaudio, then both mic/sound are correctly muted.
>
> What is maybe weirder is that if afterthat:
>
> - I close my console session
> - I open a gnome session
>
> Then in this case, the mic/sound remains muted in gnome.
>
> In log files, the difference between when it works and when it does
> not seems to be the bolded lines, that are not printed when it works.
>
> nov. 07 06:22:26 brisingr pulseaudio[1379]: I: [pulseaudio]
> module-suspend-on-idle.c: Source
> alsa_input.pci-0000_00_1f.3.analog-stereo idle for too long,
> suspending ...
> nov. 07 06:22:26 brisingr pulseaudio[1379]: I: [alsa-source-ALC257
> Analog] alsa-source.c: Device suspended...
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] source.c:
> alsa_input.pci-0000_00_1f.3.analog-stereo: suspend_cause: (none) -> IDLE
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] source.c:
> alsa_input.pci-0000_00_1f.3.analog-stereo: state: IDLE -> SUSPENDED
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] core.c:
> Hmm, no streams around, trying to vacuum.
> nov. 07 06:22:26 brisingr pulseaudio[1379]: I: [pulseaudio]
> module-suspend-on-idle.c: Sink
> alsa_output.pci-0000_00_1f.3.analog-stereo idle for too long,
> suspending ...
> nov. 07 06:22:26 brisingr pulseaudio[1379]: I: [alsa-sink-ALC257
> Analog] alsa-sink.c: Device suspended...
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] sink.c:
> alsa_output.pci-0000_00_1f.3.analog-stereo: suspend_cause: (none) -> IDLE
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] sink.c:
> alsa_output.pci-0000_00_1f.3.analog-stereo: state: IDLE -> SUSPENDED
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] source.c:
> alsa_output.pci-0000_00_1f.3.analog-stereo.monitor: suspend_cause:
> (none) -> IDLE
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] source.c:
> alsa_output.pci-0000_00_1f.3.analog-stereo.monitor: state: IDLE ->
> SUSPENDED
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio] core.c:
> Hmm, no streams around, trying to vacuum.
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio]
> module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
> nov. 07 06:22:26 brisingr pulseaudio[1379]: D: [pulseaudio]
> module-udev-detect.c: Resuming all sinks and sources of card
> alsa_card.pci-0000_00_1f.3.
> *nov. 07 06:22:30 brisingr pulseaudio[1379]: D: [alsa-sink-ALC257
> Analog] alsa-sink.c: Read hardware volume: front-left: 30129 /  46% /
> -20,25 dB,   front-right: 30129 /  46% / -20,25 dB**
> **nov. 07 06:22:30 brisingr pulseaudio[1379]: D: [pulseaudio] sink.c:
> The mute of sink alsa_output.pci-0000_00_1f.3.analog-stereo changed
> from yes to no.**
> **nov. 07 06:22:30 brisingr pulseaudio[1379]: D: [alsa-sink-ALC257
> Analog] alsa-sink.c: Read hardware volume: front-left: 30129 /  46% /
> -20,25 dB,   front-right: 30129 /  46% / -20,25 dB**
> **nov. 07 06:22:30 brisingr pulseaudio[1379]: I: [pulseaudio]
> module-device-restore.c: Storing volume/mute for device+port
> sink:alsa_output.pci-0000_00_1f.3.analog-stereo:analog-output-speaker.**
> **nov. 07 06:22:30 brisingr pulseaudio[1379]: D: [alsa-source-ALC257
> Analog] alsa-source.c: Read hardware volume: front-left: 20724 /  32%
> / -30,00 dB,   front-right: 20724 /  32% / -30,00 dB**
> **nov. 07 06:22:30 brisingr pulseaudio[1379]: D: [pulseaudio]
> source.c: The mute of source alsa_input.pci-0000_00_1f.3.analog-stereo
> changed from yes to no.**
> **nov. 07 06:22:30 brisingr pulseaudio[1379]: I: [pulseaudio]
> module-device-restore.c: Storing volume/mute for device+port
> source:alsa_input.pci-0000_00_1f.3.analog-stereo:analog-input-internal-mic.**
> **nov. 07 06:22:40 brisingr pulseaudio[1379]: I: [pulseaudio]
> module-device-restore.c: Synced.*
>
After more tests, I noticed that the mute was changed right when gdm
session was killed.

I then guessed that when pulseaudio service spawned by Debian-gdm user
is killed, it somewhat overrode the settings for sound/speaker that had
been set for my user by its own pulseaudio service right before that.

And indeed, if I mute speaker and sound in gdm before logging in, then
my speaker/sound are not unmuted anymore, logs become:

janv. 06 14:09:18 brisingr pulseaudio[1898]: D: [alsa-source-ALC257
Analog] alsa-source.c: Read hardware volume: front-left: 65535 / 100% /
-0,00 dB,   front-right: 65535 / 100% / -0,00 dB
janv. 06 14:09:18 brisingr pulseaudio[1898]: D: [pulseaudio] source.c:
The reference volume of source alsa_input.pci-0000_00_1f.3.analog-stereo
changed from front-left: 20724 /  32% / -30,00 dB,   front-right: 20724
/  32% / -30,00 dB to front-left: 65535 / 100% / -0,00 dB,  
front-right: 65535 / 100% / -0,00 dB.
janv. 06 14:09:18 brisingr pulseaudio[1898]: D: [alsa-source-ALC257
Analog] alsa-source.c: Read hardware volume: front-left: 65535 / 100% /
-0,00 dB,   front-right: 65535 / 100% / -0,00 dB
janv. 06 14:09:18 brisingr pulseaudio[1898]: I: [pulseaudio]
module-device-restore.c: Storing volume/mute for device+port
source:alsa_input.pci-0000_00_1f.3.analog-stereo:analog-input-internal-mic.

So I would say this problem is pulseaudio related only. I have a
workaround: ensures that both Debian-gdm and my user have same settings.

Regards,

Alexandre.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-pulseaudio-devel/attachments/20190106/20891b4c/attachment.html>


More information about the pkg-pulseaudio-devel mailing list