[RESPONDED] Waking from suspend w/ lid closed

As a cheesy workaround, drop this script into /lib/systemd/system-sleep/20-disable-wakeup.sh and make it executable by root:

#!/bin/bash
shopt -s nullglob
case $1 in
    pre)
        systemctl stop bluetooth
        for d in /sys/bus/usb/devices/*/power/wakeup /sys/bus/i2c/devices/*/power/wakeup; do
            echo disabled > "$d"
        done
        ;;
    post)
        systemctl start bluetooth;;
esac

That will disable wakeup by all USB and i2c devices as well as disable bluetooth (which I have seen cause weird hangs during the suspend process).

You can then test it by running systemctl suspend, waiting for the laptop to sleep, and then do touchpad and keyboard stuff. It should stay asleep until you close/reopen the lid or hit the power button.

3 Likes