Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Fix polaris suspend-fix failling on switch
Browse files Browse the repository at this point in the history
Simplify polaris suspend-fix to un-conditional echo.
  • Loading branch information
Rosuavio committed Jul 15, 2023
1 parent 77c5896 commit 78587d5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions module/polaris.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ let

inherit (sources) nixos-hardware impermanence;
lanzaboote = import sources.lanzaboote;
suspend-fix = pkgs.writeShellScriptBin "suspend-fix" ''
#!/usr/bin/env bash
isenabled=`cat /proc/acpi/wakeup | grep $1 | grep -o enabled`
if [ $isenabled == "enabled" ]; then
echo $1 > /proc/acpi/wakeup
else
exit
fi
'';
in
{
imports =
Expand Down Expand Up @@ -193,12 +184,15 @@ in
# B550I-AORUS-PRO-AX
suspend-fix = {
enable = true;

wants = [ "multi-user.target" ];
after = [ "multi-user.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Description = "Disable GPP0 to fix suspend issue";
Type = "simple";
ExecStart = lib.getExe suspend-fix + " GPP0";
ExecStart =
"${pkgs.bashInteractive}/bin/sh -c \"${pkgs.coreutils}/bin/echo GPP0 > /proc/acpi/wakeup\"";
};
};
};
Expand Down

0 comments on commit 78587d5

Please sign in to comment.