From c55f496c5284808109aa2904cea941d85f449fc0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Aug 2010 11:55:52 +0000 Subject: [PATCH] * The ALSA job shouldn't be started until udevtrigger has finished. Otherwise the sound card drivers may not have been loaded yet, and restoring the mixer settings will fail. Also, since the ALSA job itself will fail, it won't save the mixer settings on shutdown. svn path=/nixos/trunk/; revision=23245 --- modules/services/audio/alsa.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/services/audio/alsa.nix b/modules/services/audio/alsa.nix index 81dd0ede208..9181a86b377 100644 --- a/modules/services/audio/alsa.nix +++ b/modules/services/audio/alsa.nix @@ -53,14 +53,13 @@ in }; jobs.alsa = - { startOn = "started udev"; + { startOn = "stopped udevtrigger"; preStart = '' mkdir -m 0755 -p $(dirname ${soundState}) # Load some additional modules. - ${optionalString config.sound.enableOSSEmulation '' for mod in snd_pcm_oss; do @@ -70,7 +69,7 @@ in } # Restore the sound state. - ${alsaUtils}/sbin/alsactl -f ${soundState} restore + ${alsaUtils}/sbin/alsactl -f ${soundState} restore || true ''; postStop =