I have two keyboards. 

  1. For the Coolermaster I can prevent the keyboard from waking the PC from sleep by adding a udev rule.
  2. For the Rii RK908 I cannot get the same change to work and I've no idea why. 
  3. I've used the Coolermaster for years, the Rii is a new keyboard.
  4. Ubuntu 22.04 LTS
  5. The udev rules have the same file permissions.
  6. The issue doesn't appear to be the USB ports as I swap the keyboards between the same port.
  7. 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:

  1. Allow the Rii keyboard to wake the PC but only when I press a key.
  2. 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

  • Hm, that wakeup functionality is not a feature of your keyboard, nor really of the operating system (as that's not running before getting woken up), it's functionality of the ACPI controller that can be programmed to ignore some sources of wakeup. That makes it surprising this is USB device-specific! Nov 20 at 13:08
  • Can you add the content of /proc/acpi/wakeup after the Rii keyboard has been plugged in, and before? might be sufficient to look at the EHC, UHC, OHC lines Nov 20 at 13:09
  • Marcus: I've added the output of /proc/acpi/wakeup
    – Phil Smith
    Nov 20 at 13:27
  • 1
    Marcus: Thanks for the tip about /proc/acpi/wakeup. After some Googling I've disabled ECH1 and the PC no longer wakes when I press a key on the keyboard. I need to test this definitely doesn't randomly wake up my PC by leaving it overnight, then I need to make this a permanent change. I appreciate your comment as it's help me make progress.
    – Phil Smith
    Nov 20 at 18:26
  • Hope it works out, Phil! If it does, don't forget to leave what you did here as answer to your own question – that's highly encouraged! Nov 20 at 21:58

1 Answer 1


The issue was the acpi controller and the solution was to disable EHC1, as suggested in the comments by Marcus Müller. Thank you very much for helping.

In /proc/acpi/wakeup EHC1 was originally enabled: EHC1 S4 *enabled pci:0000:00:1d.0

I toggled this from enabled to disabled using echo EHC1 | sudo tee /proc/acpi/wakeup

When I left the PC in sleep mode overnight, it was still in sleep mode the next morning, which solves my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.