mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
only toggle sleep mobo fix if needed
This commit is contained in:
parent
ed19eaafd1
commit
c052813f6d
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
@ -6,12 +6,12 @@
|
|||||||
powerManagement.powerDownCommands = ''
|
powerManagement.powerDownCommands = ''
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
for power in /sys/bus/i2c/devices/i2c-*/device/power; do echo disabled > ''${power}/wakeup || true; done
|
|
||||||
for power in /sys/bus/usb/devices/1-*/power; do echo disabled > ''${power}/wakeup || true; done
|
|
||||||
|
|
||||||
# Fix for Gigabyte motherboard
|
# Fix for Gigabyte motherboard
|
||||||
# /r/archlinux/comments/y7b97e/my_computer_wakes_up_immediately_after_i_suspend/isu99sr/
|
# /r/archlinux/comments/y7b97e/my_computer_wakes_up_immediately_after_i_suspend/isu99sr/
|
||||||
echo GPP0 > /proc/acpi/wakeup
|
# Disable if enabled
|
||||||
|
if (grep "GPP0.*enabled" /proc/acpi/wakeup >/dev/null); then
|
||||||
|
echo GPP0 | ${pkgs.doas}/bin/doas tee /proc/acpi/wakeup
|
||||||
|
fi
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user