diff --git a/machines/hyper/hardware-configuration.nix b/machines/hyper/hardware-configuration.nix index 98c44e6..f2a6dcf 100644 --- a/machines/hyper/hardware-configuration.nix +++ b/machines/hyper/hardware-configuration.nix @@ -46,6 +46,26 @@ }; }; + # https://www.reddit.com/r/gigabyte/comments/p5ewjn/b550i_pro_ax_f13_bios_sleep_issue_on_linux/ + systemd.services.suspend-fix = { + wantedBy = [ "multi-user.target" ]; + description = "Fix suspend"; + + script = '' + if grep -q "GPP0 .* \*enabled" /proc/acpi/wakeup; then + echo GPP0 > /proc/acpi/wakeup + echo "Disabled wakeup for GPP0" + else + echo "Wakeup for GPP0 already disabled" + fi + ''; + + serviceConfig = { + Type = "oneshot"; + }; + }; + + fileSystems = { "/" = { device = "/dev/disk/by-uuid/53f4e762-39fa-41a6-8b78-4999d38e6e88";