Skip to content

Instantly share code, notes, and snippets.

@abairo
Last active May 29, 2025 00:45
Show Gist options
  • Save abairo/ff11443afb06cfe439c94dc573816566 to your computer and use it in GitHub Desktop.
Save abairo/ff11443afb06cfe439c94dc573816566 to your computer and use it in GitHub Desktop.
Fix Linux suspend mode

Fixing the wake up immediately after suspend problem

Ref.: Reddit

Tested with Gygabyte B550M AORUS ELITE BIOS Version: F20d

Instructions

First of all, create a file called disable-wakeup.service at /etc/systemd/system/ with the content below:

[Unit]
Description=Desabilita dispositivos que acordam o sistema
After=suspend.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo GPP0 > /proc/acpi/wakeup'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

After creating the file, you should enable the service:

 sudo systemctl daemon-reexec 
 sudo systemctl enable disable-wakeup.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment