From fabe06337ed54e72aaa2bdd5a0b40e8bda61e46b Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 23 Sep 2012 22:26:49 +0200 Subject: [PATCH] alsa.nix: initialize the sound card before restoring previously stored settings The sound card in my ThinkPad won't work unless "init" is run explicitly. --- modules/services/audio/alsa.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/audio/alsa.nix b/modules/services/audio/alsa.nix index 8212b3f9fd0..fa63bc74cfc 100644 --- a/modules/services/audio/alsa.nix +++ b/modules/services/audio/alsa.nix @@ -56,8 +56,9 @@ in '' mkdir -m 0755 -p $(dirname ${soundState}) - # Restore the sound state. - ${alsaUtils}/sbin/alsactl --ignore -f ${soundState} restore + # Try to restore the sound state. + ${alsaUtils}/sbin/alsactl --ignore init || true + ${alsaUtils}/sbin/alsactl --ignore -f ${soundState} restore || true ''; postStop =