upower: Work around the daemon getting stuck after a suspend

This commit is contained in:
Eelco Dolstra 2012-10-04 21:58:40 -04:00
parent 7d26dde69a
commit 9b431cb24e

View File

@ -50,6 +50,15 @@ with pkgs.lib;
mkdir -m 0755 -p /var/lib/upower
'';
# The upower daemon seems to get stuck after doing a suspend
# (i.e. subsequent suspend requests will say "Sleep has already
# been requested and is pending"). So as a workaround, restart
# the daemon.
powerManagement.resumeCommands =
''
${config.system.build.systemd}/bin/systemctl try-restart upower
'';
};
}