sound is muted before suspend, but on resume is not muted

Bug #483900 reported by Russ Phillips
124
This bug affects 27 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Low
Daniel T Chen

Bug Description

HP Mini 311, running Ubuntu 9.10 Karmic Koala.

I have my laptop configured to suspend when I close the lid. I usually have sound muted, but if sound is muted when I close the lid (and thus suspend), it is no longer muted when I open the lid & it resumes.

Note that this may be a duplicate of bug #483287, but that didn't appear in the "is it one of these bugs" list.

ProblemType: Bug
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: NVidia [HDA NVidia], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 2/2
   Subdevice #0: subdevice #0
   Subdevice #1: subdevice #1
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: russ 1738 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0x53100000 irq 20'
   Mixer name : 'Nvidia MCP7A HDMI'
   Components : 'HDA:111d7605,103c3651,00100402 HDA:10de0007,10de0101,00100100'
   Controls : 30
   Simple ctrls : 17
Date: Mon Nov 16 23:36:02 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia wl
Package: alsa-base 1.0.20+dfsg-1ubuntu5
PackageArchitecture: all
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: alsa-driver
Uname: Linux 2.6.31-14-generic i686
XsessionErrors:
 (gnome-settings-daemon:1753): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:1753): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:1851): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:1881): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (gnome-panel:1850): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -6 and height 24

Related branches

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

This symptom is actually intentional, because we currently don't have a way to store sink and source state in PA prior to muting both (necessary to prevent loud pops when suspending/resuming). For this reason, we:

* unconditionally mute all sinks and sources prior to suspending
* unconditionally unmute all sinks and sources after resuming

I recognize that this is slightly annoying behavior. You can work around this symptom by editing /usr/lib/pm-utils/sleep.d/01PulseAudio and commenting out the desired lines.

affects: alsa-driver (Ubuntu) → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
assignee: nobody → Daniel T Chen (crimsun)
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Russ Phillips (avantman42) wrote :

Thanks for the very quick response. I understand the decision to do this to prevent pops when suspending/resuming, but just to be clear, if I use the workaround you suggest, will that result in pops when I suspend/resume?

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 483900] Re: HP Mini 311 - sound is muted before suspend, but on resume is not muted

Possibly; I don't have your hardware locally to verify.

On Nov 17, 2009 6:35 AM, "avantman42" <email address hidden> wrote:

Thanks for the very quick response. I understand the decision to do this
to prevent pops when suspending/resuming, but just to be clear, if I use
the workaround you suggest, will that result in pops when I
suspend/resume?

-- HP Mini 311 - sound is muted before suspend, but on resume is not muted
https://bugs.launchpad....

Audio Team, which is subscribed to pulseaudio in ubuntu. Status in
“pulseaudio” package in Ubuntu: ...

Bug description: HP Mini 311, running Ubuntu 9.10 Karmic Koala. I have my
laptop configured to susp...

Revision history for this message
Russ Phillips (avantman42) wrote : Re: HP Mini 311 - sound is muted before suspend, but on resume is not muted

I hadn't realised it would be hardware-dependent. Mainly for reference in case other Mini 311 owners see this bug:

I tried editing the file /usr/lib/pm-utils/sleep.d/01PulseAudio (edited version is attached). It did resolve the muting issue, and didn't cause pops on suspend/resume, but it also made the boot time longer (by approx 7 seconds) and login time also seemed to be longer.

Daniel T Chen (crimsun)
summary: - HP Mini 311 - sound is muted before suspend, but on resume is not muted
+ sound is muted before suspend, but on resume is not muted
Revision history for this message
Julian Lam (julian-lam) wrote :

Thanks Daniel for merging my bug report.

So this is a hardware-specific issue? If that's the case, then in the interest of usability, shouldn't we keep the old behaviour and wait for hardware to comply with software?

On second thought - wouldn't it be easier if the current state of PA (muted/unmuted) was saved to RAM before sleep, and restored upon restoration?

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 483900] Re: sound is muted before suspend, but on resume is not muted

On Thu, Nov 19, 2009 at 12:57 PM, Julian Lam <email address hidden> wrote:
> So this is a hardware-specific issue? If that's the case, then in the
> interest of usability, shouldn't we keep the old behaviour and wait for
> hardware to comply with software?

No, the all unmuted behavior is caused by 01PulseAudio, the pm-utils
script. What is hardware specific is the popping upon suspend and/or
resume.

> On second thought - wouldn't it be easier if the current state of PA
> (muted/unmuted) was saved to RAM before sleep, and restored upon
> restoration?

We do save this state already directly in the ALSA driver, because PA
syncs its volumes with that reported to/by the driver. The problem is
that you need to mute the sink & sources prior to suspend, which
causes the ALSA driver to store muted state. Notice how there isn't an
ability to store prior state, because that's what's needed: you need
to save the state prior to the muted state so that the pop isn't
audible.

Revision history for this message
Michael Rooney (mrooney) wrote :

As per https://wiki.ubuntu.com/Bugs/Importance I'll change this importance to Low, as it certainly is not a request for a new feature but in fact a regression.

Changed in pulseaudio (Ubuntu):
importance: Wishlist → Low
tags: added: regression-release
Revision history for this message
Daniel T Chen (crimsun) wrote :

Michael, I am happy to reassign this bug to you if you feel that you wish to implement the feature in PulseAudio.

Revision history for this message
Michael Rooney (mrooney) wrote :

As a triager I am going by the Importances on the wiki. If you'd like
to not classify this is a regression in pulseaudio but instead a new
feature, then there needs to be some task against which we CAN
classify this as a regression becacuse at the distribution level, it
is a regression with a non-wishlist importance. Please let me know
what package/project that might be so we can get this bug in line with
the guidelines, thanks!

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

The symptom points to a regression in pulseaudio's pm-utils script. Removing the added functions will fix *this* bug and reopen the original audio anomaly bug. Fixing the symptom requires the addition of features to both pulseaudio and linux.

Revision history for this message
Michael Rooney (mrooney) wrote :

Ah okay, thanks for your input. One of the bugs that was marked as a
duplicate of this had a pm-utils task, if that task is valid, does it
make sense to migrate that task to this master report?

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

A pm-utils task would be invalid.

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Chow Loong Jin (hyperair) wrote :

For those interested, I've made some changes to the existing 01Pulseaudio script, which now reads the muted state of each sink/source and saves it using pm-utils' savestate and restorestate features. This should provide an answer to both issues, i.e. glitches in sound when suspend/hibernating/resuming as well as this bug. Below is a link to the file in my bzr branch.

http://bazaar.launchpad.net/~hyperair/pulseaudio/ubuntu-save-muted-state/annotate/head:/debian/01PulseAudio

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

This bug was fixed in the package pulseaudio - 1:0.9.21-0ubuntu1

---------------
pulseaudio (1:0.9.21-0ubuntu1) lucid; urgency=low

  [ Daniel T Chen ]
  * New upstream bugfix release
  * debian/control: pulseaudio-module-raop must Depends
    pulseaudio-module-zeroconf (LP: #484870). Thanks, Dominic Evans!
  * Bump for 0.9.21:
    + debian/libpulse0.shlibs
    + debian/pulseaudio.shlibs
    + debian/rules
  * debian/pulseaudio.install:
    debian/copyright: Amend for addition of:
    + module-device-manager.so
  * debian/README.Debian: Update for Ubuntu 9.04+.
  * 0002-Fix-makefiles-to-include-all-alsa-path-files-on-inst.patch:
    Drop, fixed upstream.
  * 0051-fix-sigfpe-mcalign.patch: Drop, needs fixing in alsa-kernel
    and alsa-lib.

  [ Chow Loong Jin ]
  * debian/01PulseAudio: Add/modify functions to (re)store sink/source
    state for (resume/)suspend (LP: #404986, #483900)

  [ Luke Yelavich ]
  * Remove wrapper scripts and accessibility special case, to help with the
    desktop startup time. The accessibility case should be solved in
    speech-dispatcher by the time lucid ships.
    - debian/patches/0006-a11y-special-case-disable.patch: Removed
    - debian/70pulseaudio: Removed
    - debian/pulse-session: Removed
    - debian/pulseaudio.install: Re-add the xdg autostart desktop file
    - debian/pulseaudio.preinst: Instead of removing the xdg autostart desktop
      file on upgrade, remove the 70pulseaudio X Session script on upgrade
 -- Daniel T Chen <email address hidden> Wed, 25 Nov 2009 16:34:54 -0500

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
rolfepope (rolfe-f-pope) wrote :

If this bug is fixed, how come when I have applied all updates, I still do not have any sound?

Rolfe Pope

Revision history for this message
Thilo-Alexander Ginkel (thilo.ginkel) wrote :

@rolfepope: This bug is about the sound being unmuted after a suspend/resume cycle although it was muted before suspending. So, not getting any sound at all is a different story. I'd propose to file a separate bug (if there is not already an existing one).

Apart from that, would it be possible to packport the bugfix mentioned in comment #15 to Karmic?

Revision history for this message
Thilo-Alexander Ginkel (thilo.ginkel) wrote :

s/packport/backport/

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

See the ubuntu-audio-dev PPA

On Nov 29, 2009 5:45 PM, "Thilo-Alexander Ginkel" <email address hidden> wrote:

@rolfepope: This bug is about the sound being unmuted after a
suspend/resume cycle although it was muted before suspending. So, not
getting any sound at all is a different story. I'd propose to file a
separate bug (if there is not already an existing one).

Apart from that, would it be possible to packport the bugfix mentioned
in comment #15 to Karmic?

-- sound is muted before suspend, but on resume is not muted
https://bugs.launchpad.net/bugs/48390...

Revision history for this message
Jeffrey Baker (jwbaker) wrote :

Regrettably, the PPA actually prevents the system from suspending. So it's quite difficult to tell if the fix for this bug really fixed anything, or simply inhibits suspend.

Revision history for this message
Arvind S Raj (arvindsraj-deactivatedaccount) wrote :

I am using Karmic Koala right now: fully updated till date and I still have this problem. I have successfully reproduced this bug nearly 10 times now; not hard I know. But proof it still exists(no pulseaudio update: I just checked for any updates now).

Revision history for this message
Arvind S Raj (arvindsraj-deactivatedaccount) wrote :

I just checked it and it's still existent. verified it's existence so changing it to confirmed.

Changed in pulseaudio (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Daniel T Chen (crimsun) wrote :

Arvind, unless you're running Lucid, you should change this status
back to Fix Released. This bug report deals very specifically with a
script error, not a hardware error. You would need to file a separate
bug report.

Revision history for this message
Michael Rooney (mrooney) wrote :

If this is intended to be fixed for Karmic perhaps we should open up a distro task, but this is fixed for me as the original reporter out of the box on Lucid, so I believe the Fix Released is still valid.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
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.