Skip to content

Instantly share code, notes, and snippets.

@azazar
Created August 6, 2022 19:18
Show Gist options
  • Save azazar/48e8e81549adec2c7bc61737a4402262 to your computer and use it in GitHub Desktop.
Save azazar/48e8e81549adec2c7bc61737a4402262 to your computer and use it in GitHub Desktop.
#!/bin/bash
for dev in $(cat /proc/acpi/wakeup | grep '*enabled' | cut -d' ' -f1); do
if [ "$dev" = "PWRB" ]; then
continue
fi
echo $dev > /proc/acpi/wakeup
done
exit 0
# cat /etc/systemd/system/fix-wake-event-list.service
[Unit]
Description=Fix Wake Event List
Before=basic.target
After=local-fs.target sysinit.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/opt/fix-wake-event-list
[Install]
WantedBy=basic.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment