I have two keyboards.
- For the Coolermaster I can prevent the keyboard from waking the PC from sleep by adding a udev rule.
- For the Rii RK908 I cannot get the same change to work and I've no idea why.
- I've used the Coolermaster for years, the Rii is a new keyboard.
- Ubuntu 22.04 LTS
- The udev rules have the same file permissions.
- The issue doesn't appear to be the USB ports as I swap the keyboards between the same port.
- I've tried different USB ports and experience the same issues.
Coolermaster Strom QuickFire Rapid
lsusb gives: Bus 002 Device 005: ID 2516:0004 Cooler Master Co., Ltd. Storm QuickFire Rapid Mechanical Keyboard
udev rule is: ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="2516", ATTR{power/wakeup}="disabled"
Rii RK908
lsusb gives: Bus 002 Device 004: ID 1a2c:99f4 China Resource Semico Co., Ltd USB Gaming Keyboard
udev rule is: ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="1a2c", ATTR{power/wakeup}="disabled"
Underlying Issue The underlying issue I'm trying to solve is after putting the PC to sleep, if I have the Rii keyboard plugged in then it automatically wakes the PC after an amount of time, say 30 minutes. I've never had this issue with the Coolermaster.
So I want to do one of the following:
- Allow the Rii keyboard to wake the PC but only when I press a key.
- Prevent the Rii keyboard from waking the PC when even if I press a key i.e. I have to use the power button.
Am I doing anything wrong, what else can I try please ?
References: Using a udev rule came from: Make changes to `/proc/acpi/wakeup` permanent
Edit: I've added the output from more /proc/acpi/wakeup after the keyboard has been plugged in. The output is identical for both keyboards (only 1 keyboard is plugged in at once). Device S-state Status Sysfs node
PS2K S3 *disabled
PS2M S3 *disabled
P0P1 S4 *disabled
USB1 S3 *disabled
USB2 S3 *disabled
USB3 S3 *disabled
USB4 S3 *disabled
USB5 S3 *disabled
USB6 S3 *disabled
USB7 S3 *disabled
RP01 S4 *disabled pci:0000:00:1c.0
PXSX S4 *disabled
RP02 S4 *disabled
PXSX S4 *disabled
RP03 S4 *disabled pci:0000:00:1c.2
PXSX S4 *enabled pci:0000:03:00.0
RP04 S4 *disabled
PXSX S4 *disabled
RP05 S4 *disabled pci:0000:00:1c.4
PXSX S4 *disabled pci:0000:04:00.0
RP06 S4 *disabled
PXSX S4 *disabled
RP07 S4 *disabled
PXSX S4 *disabled
RP08 S4 *disabled
PXSX S4 *disabled
PEG0 S4 *disabled pci:0000:00:01.0
PEGP S4 *disabled
PEG1 S4 *disabled
PEG2 S4 *disabled
PEG3 S4 *disabled
GLAN S4 *disabled
EHC1 S4 *enabled pci:0000:00:1d.0
EHC2 S4 *enabled pci:0000:00:1a.0
XHC S4 *disabled
HDEF S4 *disabled pci:0000:00:1b.0
PWRB S3 *enabled platform:PNP0C0C:00
EHC,UHC,OHClines