fix suspend!
This commit is contained in:
parent
08f5805f1c
commit
d2c5931131
1 changed files with 29 additions and 0 deletions
|
|
@ -29,4 +29,33 @@
|
||||||
"i915.enable_fbc=1"
|
"i915.enable_fbc=1"
|
||||||
"i915.enable_gvt=1"
|
"i915.enable_gvt=1"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# fix sleep/suspend
|
||||||
|
# ty https://github.com/3ulalia/flake/blob/aaddbef19979c6d952f7a763cd9e6225d6330a02/hosts/catalina/default.nix
|
||||||
|
systemd.services."suspend-fix-t2" = {
|
||||||
|
enable = true;
|
||||||
|
unitConfig = {
|
||||||
|
Description = "Disable and Re-Enable Apple BCE Module (and Wi-Fi)";
|
||||||
|
Before = "sleep.target";
|
||||||
|
StopWhenUnneeded = "yes";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
ExecStart = [
|
||||||
|
"/run/current-system/sw/bin/modprobe -r brcmfmac_wcc"
|
||||||
|
"/run/current-system/sw/bin/modprobe -r brcmfmac"
|
||||||
|
"/run/current-system/sw/bin/modprobe -r hci_bcm4377"
|
||||||
|
"/run/current-system/sw/bin/rmmod -f apple-bce"
|
||||||
|
];
|
||||||
|
ExecStop = [
|
||||||
|
"/run/current-system/sw/bin/modprobe apple-bce"
|
||||||
|
"/run/current-system/sw/bin/modprobe hci_bcm4377"
|
||||||
|
"/run/current-system/sw/bin/modprobe brcmfmac"
|
||||||
|
"/run/current-system/sw/bin/modprobe brmcfmac_wcc"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
wantedBy = ["sleep.target"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue