How to Disable Mouse Sleep mode

I have an issue with the sleeping mode : the computer sometimes restart by itself without any action on keyboard or on mouse ; I suppose the mouse is too much sensible and then I would like to deactivate it of the sleep mode ending , then restart would be possible only by action on keyboard; is this possible with XFCE4?

The procedure will depend on your hardware and how your keyboard/mouse are connected. Read this

here an extract of my file wakeup for “enabled items” ; but how to identify them?where is the mouse , what are the others ?
XHCI S3|*enabled pci:0000:00:14.0
RP03 S4|*enabled pci:0000:00:1c.0
AWAC S4|*enabled platform:ACPI000E:00
PBTN S3|*enabled platform:PNP0C0C:00

I know I’m reviving this topic (just found it while searching for another sleep issue), but I had to research this a while back and wrote some little instructional notes on how to identify and disable USB devices waking up - so I am sharing for anyone who might come across it. Maybe there’s a more straightforward way, but this is what I wrote up to prevent sensitive gaming mouse from waking up the computer by accident, from reading this thread

Disabling wake up devices (like USB mouse)

Sensitive gaming mouse keeps waking the computer with even a slight vibration, which pretty much means even walking in this house. So I need to disable the specific USB device from being able to wake up the system. Instructions from this askubuntu answer.

First, list the USB devices and identify the mouse:

lsusb | sort

In my case, the culprit is easily identifiable:

Bus 007 Device 005: ID 046d:c08d Logitech, Inc. G502 LIGHTSPEED Wireless Gaming Mouse

The device ID does not seem to match exactly how they are identified in power wake up settings (although the Bus is), which we can list with this:

grep enabled /sys/bus/usb/devices/*/power/wakeup

In my case I get two devices, which turn out to be the mouse and keyboard, but I don’t know which is which:


apparently these device IDs is how they show up in dmesg, but to get a match betwen the name found with lsusb and the ids found under /sys/bus/usb/devices/*/power/wakeup, we need to search dmesg for the name and see which matches. For example, search Logitech, or Mouse, etc:

dmesg | grep Logitech | grep -o -P "usb.+?\s"

In my case, searching Logitech returned other products, but Mouse isolated it with this result:

usb 7-1.3: 

so then I need to use this command with a root shell:

echo 'disabled' > /sys/bus/usb/devices/7-1.3/power/wakeup
1 Like