[NixOS] Add service to fix immediate resume after suspend on blade
This commit is contained in:
parent
672b40c3ee
commit
263108e92e
@ -32,6 +32,18 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
systemd.services.resume-fix = {
|
||||
description = "Fixes acpi immediate resume after suspend";
|
||||
wantedBy = [ "multi-user.target" "post-resume.target" ];
|
||||
after = [ "multi-user.target" "post-resume.target" ];
|
||||
script = ''
|
||||
if ${pkgs.gnugrep}/bin/grep -q '\bXHC\b.*\benabled\b' /proc/acpi/wakeup; then
|
||||
echo XHC > /proc/acpi/wakeup
|
||||
fi
|
||||
'';
|
||||
serviceConfig.Type = "oneshot";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.hostName = "ivanm-dfinity-razer";
|
||||
|
Loading…
Reference in New Issue
Block a user