Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save shaybensasson/613845c2da59dd312f786c705983a0d9 to your computer and use it in GitHub Desktop.

Select an option

Save shaybensasson/613845c2da59dd312f786c705983a0d9 to your computer and use it in GitHub Desktop.
A systemmd service that Fixes immediate wakeup after suspend, by disabling all triggers but power/sleep btn (X1 extreme)
[Unit]
Description="Fixes immediate wakeup after suspend, by disabling all trigers but power/sleep btn"
# https://askubuntu.com/a/1139215/562313
[Service]
ExecStart=/bin/bash -c "echo PEG0 > /proc/acpi/wakeup && echo PEGP > /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup && echo RP09 > /proc/acpi/wakeup && echo PXSX > /proc/acpi/wakeup"
[Install]
WantedBy=multi-user.target
@shaybensasson

Copy link
Copy Markdown
Author
  1. subl /etc/systemd/system/Fix.immediate.wakeup.after.suspend.service

  2. ln -s /etc/systemd/system/Fix.immediate.wakeup.after.suspend.service /etc/systemd/system/multi-user.target.wants/

  3. sudo systemctl daemon-reload

Sanity:
4. sudo systemctl start Fix.immediate.wakeup.after.suspend.service
5. sudo systemctl status Fix.immediate.wakeup.after.suspend.service

Run on startup:
sudo systemctl enable Fix.immediate.wakeup.after.suspend.service

The idea was originally posted in here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment