Hi guys!
I may have asked this before a couple of years ago, but I can't find the answer, so please forgive my asking again if I had.

I have a desktop machine running Solus Plasma, connected to four USB input devices:

  • A trackball by Ploopy
  • A standard Logitech keyboard
  • A Wacom Intuos graphics tablet

These have something of a hair-trigger, and as I have cats that wander around on my desk, I would like to make sure that only the machine's power button wakes it up from suspend/hibernate states.

I tried following an online guide for creating udev rules for this purpose, but the guide either doesn't work for Solus, or I have made a mistake somewhere in following it, as it has no effect.

Any help would be appreciated - with thanks in advance.

  • BuzzPCSOS replied to this.
  • Thanks again to all who answered - I managed something for now:

    I looked up /proc/acpi/wakeup to see what devices were set to "enabled".
    All but one had a sysfs node that began with "pci" so I assumed the last one was the power button.
    I used a small script with a echo ???? >> /proc/acpi/wakeup line for each enabled device and ran it - this disabled the USB devices waking up the computer.

    Next, I followed this tutorial to get systemd to run my script on startup - since KDE's normal Autostart menu wouldn't run a script that requires sudo permissions.

    If I ever connect another USB input device to the machine, I'll have to update the script - and it might also fail if I disconnect and reconnect any of the current ones, but it does the job for now.

    Harvey - I went over the computer's UEFI settings again with a fine tooth comb, and couldn't find anything resembling the "USB Wake Support" menu, or find any documentation about it.
    Had my solution not worked, my next step would have been to open a support ticket with the manufacturer.

    I would try looking at the bios of the computer, an option to disable usb power on sleep.
    Maybe?

    inkbug Try some cooking foil on your desk. Not a permanent solution but it usually deters them for a while.
    More seriously, it might be worth setting your computer to require a password when waking as this would stop any feline keyboard capers.
    If you have an SSD then boot time should not be excessive. Avoiding hibernation entirely and just starting from a clean boot each time is better for your operating system and the environment. This of course will also solve the USB wake up issue for hibernation.

      What is able to wake from sleep/hibernate is not set at the OS level, as sangheeta suggested its in the BIOS / UEFI. Yours will not look like this but here is an example:

        It works fine for me, using "udev" in XFCE (maybe Plasma works differently)


        Don't forget to reboot or reload with sudo udevadm control --reload-rules

          Huh, guess I was wrong. Only ever set it in the BIOS/UEFI. Thanks for pointing it out.

          Thanks Harvey - I looked at the machine's UEFI settings and didn't find anything that looked like it might be related, but I'll check again. I'll also check the manufacturer's site to see if they call it something else.

          Thanks minh - I'll compare your example to what I did and see if I can pinpoint where I went wrong.

          Thanks BuzzPCSOS - The system does require a password when waking from suspend, and when it wakes from hibernation it also requires a passphrase to decrypt the OS drive, since hibernation is a sort of power-off mode. I'm not so worried about my cats getting up to shenanigans using the computer, as I am about the machine using power when I don't need to use it 😄
          I usually turn it off when I go to work, but I prefer the instant availability of the suspend state when I'm home and just happen to be away from it for a couple of hours.

          Thanks again to all who answered - I managed something for now:

          I looked up /proc/acpi/wakeup to see what devices were set to "enabled".
          All but one had a sysfs node that began with "pci" so I assumed the last one was the power button.
          I used a small script with a echo ???? >> /proc/acpi/wakeup line for each enabled device and ran it - this disabled the USB devices waking up the computer.

          Next, I followed this tutorial to get systemd to run my script on startup - since KDE's normal Autostart menu wouldn't run a script that requires sudo permissions.

          If I ever connect another USB input device to the machine, I'll have to update the script - and it might also fail if I disconnect and reconnect any of the current ones, but it does the job for now.

          Harvey - I went over the computer's UEFI settings again with a fine tooth comb, and couldn't find anything resembling the "USB Wake Support" menu, or find any documentation about it.
          Had my solution not worked, my next step would have been to open a support ticket with the manufacturer.