Can't wake with 8BitDo Controller

I'm unable to wake the computer with an 8BitDo Ultimate C 2.4GHz controller. I tried adding a udev rule for the controller, but I still can't use the controller to wake the computer.

The udev rule I tried is:

ACTION=="add|change", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", ATTR{power/wakeup}="enabled"
Solution
Here's the systemd service to get this working, even if the device is on at startup: Save this as /etc/systemd/system/usb_wake.service

[Unit]
Description=Enables wakeup for all usb devices

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/enable_wakeup.sh

[Install]
WantedBy=multi-user.target


The service runs this script. Save it as /usr/local/sbin/enable_wakeup.sh

#!/bin/sh
# Enables wakeup for all usb devices

for device in /sys/bus/usb/devices/usb*; do
    echo enabled > "$device"/power/wakeup
done


Enable the service with sudo systemctl enable --now usb_wake.

This will enable wakeup on all USB root hubs (e.g. /sys/bus/usb/devices/usb1). The udev rule solution is supposed to enable wakeup for a specific device/port (e.g. /sys/bus/usb/devices/1-1), but this isn't supported by (?) the 8bitdo controller. There is no need for a udev rule; this should only need to run once on startup.

This will enable wakeup for all usb controllers/devices, not just the 8BitDo controller.

The reason that turning off the controller causes the computer to wake up is because the disconnected dongle of the 8BitDo Ultimate C shows up as a device. It appears as 8BitDo IDLE in lsusb, and has a product id of 3016 (opposed to the controller, which has a product id of 3106). When you turn off the controller, the controller disconnects and 8BitDo IDLE connects instead, causing the computer to wake up. Unsure if there's a way to prevent this.
Was this page helpful?