Recently I bought a Logitech MX Anywhere 3S mouse. Since my Bluetooth connection is a bit flaky (my PC is under my desk and plenty of metal is in the way) I prefer to use it together with the supplied Logi Bolt receiver USB dongle.
That works like a charm, right out of the box. However, when I put my PC in hibernation or sleep, it woke up, a few seconds after it went to sleep…
Switching off the mouse didn’t make a difference. But removing the USB Logi Bolt receiver dongle before Hibernation/Suspend prevented the PC from waking up again.
Turning to Google, I found a few suggestions for checking if the BIOS provided an option to disable USB activity to wakeup the PC. Unfortunately, that wasn’t an option for my BIOS.
Then I found this helpful forum post
By adding a new udev
rule, it’s possible to disable a specific USB device from waking up your PC.
The first thing we need to find out is the idVendor
and idProduct
ID’s. This can easily be achieved with lsusb
:
$ lsusb
...
Bus 001 Device 005: ID 046d:c548 Logitech, Inc. Logi Bolt Receiver
...
This tells us that:
idVendor
= 0x046d
and idProduct
= 0xc548
Now, we need to create a new udev-rule
script with e.g. nano
. E.g.:
sudo nano /etc/udev/rules.d/90-disable-mouse.rules
with the following content (don’t forget you’ll need root access to be able to write out this file):
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", ATTR{../power/wakeup}="disabled"
where:
XXXX
is idVendor and YYYY
is idProduct.
Thus, in my case this becomes:
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c548", ATTR{../power/wakeup}="disabled"
After writing out this new udev
rule file, run this following command as well:
sudo mkinitcpio -P
And then do a reboot to activate this rule. From now on, your PC should continue sleeping.
Important
If this trick doesn’t work immediately, then I found that unplugging the USB Logi Bolt receiver dongle and plugging it back in solved it and my PC stayed in Suspend or Hibernate mode.
The same when a big update happened that required rebuilding the kernel images (or switching to another kernel). In those cases I needed to unplug and plug the USB Logi Bolt receiver dongle back in again to prevent the wake up again. Which is of course rather annoying.