[privacy breach] Mute sound on resume

Bug #364973 reported by Jeroen T. Vermeulen
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

It seems some of us have managed to embarrass ourselves at one time or another by putting their laptop to sleep while playing music in the evening, then opening it up again in a classroom or conference presentation the next morning. Instant attention as the music unexpectedly starts playing again.

Lars Wirzenius suggested filing a bug for muting or lowering the volume on resume.

(Somewhat related to bug 315583, which undoubtedly will make matters worse)

Tags: privacy
Revision history for this message
Stuart Langridge (sil) wrote :

Being able to mute sound with the media keys from gdm (which is apparently happening?) and the screensaver lock screen would be very useful here.

affects: ubuntu → pm-utils (Ubuntu)
Revision history for this message
Adam Porter (alphapapa) wrote :

I have tried everything I can think of to make this work, but there's a roadblock at the end of every path.

1. Scripts in /etc/apm/{resume,suspend}.d do not appear to run at all in Oneiric.
2. Scripts in /etc/pm/sleep.d do run, however...
a. using alsactl doesn't do anything, perhaps because of a conflict with PulseAudio. However, using alsactl manually, after the system has finished resuming, works fine.
b. Using pactl at suspend time causes suspend to fail completely. I have no idea why--all I know is that if I run "pactl set-sink-mute 0 1" at suspend time, suspending doesn't happen. If I run it only at resume time, suspend works, but...
c. Using pactl at resume time doesn't do anything. But if I run "pactl set-sink-mute 0 1" after I've resumed and logged back in, it works fine.

I even tried removing the executable bit from /sbin/alsactl, just in case the store/restore was conflicting with PA...but that made no difference.

It seems like there is just no way to make the system mute itself when suspending or resuming. I guess there is some race condition somewhere, maybe ALSA or PA are not ready yet when the scripts try to control them. The obvious solution is to mute it when suspending, but as I said, that causes suspend to completely fail for no apparent reason.

I'd really like to not have to worry about my system making noise when I open it up in a library, etc because I forgot to mute it.

Revision history for this message
Adam Porter (alphapapa) wrote :

Ok, I finally solved it. By naming the script "/etc/pm/sleep.d/00_mute-alsa", I guess it runs earlier in the suspend process, and doesn't cause a problem with PA and cause suspend to fail. Surprisingly, using amixer works, in spite of PA; I haven't tried using pactl, but since this works, I'm stopping here. :) So this script should work (adjust paramaters to amixer as needed):

----
$ cat /etc/pm/sleep.d/00_mute-alsa
#!/bin/sh

case "$1" in
        suspend|hibernate)
                amixer -c 1 set Master mute
esac

Changed in pm-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
londumas (helion331990) wrote :

This bug should be fixed and taken more seriously. It is a privacy breach because someone can have some information about a user without his knowledge. Some people put important things in recordings : their thought, and other important stuf.

Please fix that.

tags: added: privacy
summary: - Mute sound on resume
+ [privacy breach] Mute sound on resume
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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