[kwlug-disc] Mouse waking up laptop from sleep
Khalid Baheyeldin
kb at 2bits.com
Tue Jun 23 13:49:15 EDT 2020
Here is another discovery: a problem, and its solution ...
The new (to me) laptop was waking up from sleep whenever the wireless mouse
was moved. That was very annoying.
The solution is to disable wakeup for that specific device. To do this, I
have a small script, and I invoke it on boot from cron.
#!/bin/sh
# Disable wakeup from suspend on wireless mouse moving ...
DEVICE="c52b" # This is the USB product id from lsusb
DEVICE_PROD=`grep $DEVICE /sys/bus/usb/devices/*/idProduct | awk -F':'
{'print $1'}`
DEVICE_DIR=`dirname $DEVICE_PROD`
echo "disabled" > $DEVICE_DIR/power/wakeup
Then in root's crontab, I have:
@reboot sleep 30; /home/myname/bin/no-usb-wakeup.sh
--
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal performance optimization, hosting and consulting.
"Sooner or later, this combustible mixture of ignorance and power is going
to blow up in our faces." -- Dr. Carl Sagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20200623/97a68c81/attachment.htm>
More information about the kwlug-disc
mailing list