USB Wakeup Settings?

You can use this to find which devices can wake your PC:

for device in /sys/bus/usb/devices/*/power/wakeup; do 
    echo "$device - $(cat $device)"
done

And then for each of those run echo "disabled" | sudo tee /sys/bus/usb/devices/1-6/power/wakeup (where 1-6 is the device id).

You can add a service file like this at /etc/systemd/system/disable-usb-wake.service:

  GNU nano 8.1                                                                                                     /etc/systemd/system/disable-usb-wake.service                                                                                                                
[Unit]
Description=Disable USB Wake
After=suspend.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo "disabled" | sudo tee /sys/bus/usb/devices/1-6/power/wakeup'

[Install]
WantedBy=suspend.target

then run sudo systemctl daemon-reload and sudo systemctl enable --now disable-usb-wake. Worked for me, hope it will work for you as well!

1 Like