Restore Sound after suspend

The sound on my laptop has always been muted after a suspend/resume cycle. I had hope Edgy would resolve that, but it didn't. The various posts (1, 2) I could find on the issue suggested a combination of toggling KDE's KMix setting "Restore volumes on login" (which would logically only apply on startup, anyway) and the alsa-utils save/restore. Nothing ever worked, so I had to manually reactivate the sound by both unmuting the channels in KMix and setting the levels to something non-zero.After a few weeks of this, I realized I need to automate the reset. After digging around a bit, I discovered that the alsa-utils init script has a reset stanza that does just this. The resume script only called a restart, which reloads the driver, but it doesn't reset the levels. So I just updated /etc/acpi/resume.d/67-sound.sh to look like:<br />#!/bin/sh<br /><br /># Get sound back<br />if [ -x /etc/init.d/alsa-utils ]; then<br />  /etc/init.d/alsa-utils restart<br />  /etc/init.d/alsa-utils reset<br />fi<br />and now my sounds comes back perfectly on restore!

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>, <shell>, <c>, <drupal6>, <java>, <javascript>, <objc>, <perl>, <php>, <python>, <rails>, <ruby>, <sql>, <xmlcode>. The supported tag styles are: <foo>, [foo].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.