Mouse Awakens Laptop from Suspend
I have a Lenovo C940 with 16gb ram, 1tb ssd, running Fedora 39 Cinnamon desktop which is up to date. I am also using a wireless Logitech mouse with the dongle plugged into a type "A" usb port (there is only one type "A" port). This all works great except when the C940 is in suspend mode, the slightest movement of the mouse will awaken it. I have discovered that the following will prevent this from occurring:
Code:
sudo echo "XHC" > /proc/acpi/wakeup |
Does bios have any wake on settings?
|
Doesn't appear so. The only usb related settings:
Enable/disable boot for usb = enabled usb to lan device pxe boot =disabled Always on usb = disabled |
I'm not sure if this applies, but I also have a wireless Logitech mouse and dongle and it also wakes up my system if I move it (a really old XPS laptop running Debian 12). In my case, the mouse has a small switch on the bottom that turns the power to the mouse on and off (and if it's off, no amount of moving or clicking will wake up the system). Turn the switch back on, and any movement wakes the machine. The mouse is a "Logi" model M650 L. It uses a single replaceable AA battery (not rechargable by the way).
Hope this helps Dan (aka Lurchicus) |
Yes. That does work as long as I remember to switch off the mouse before closing the lid. The command in post #1 works just fine until a reboot then it has to be run again. I'm wondering how to put that command into the list of "startup application" in the "menu" "system settings" (cinnamon desktop). Thanks.
|
|
Thanks. I'll check those out.
The first thing I notice is that the video references Linux Mint. Also, this video shows only how to add an existing application to the startup menu in Linux Mint (I'm using Fedora) but it appears to work the same in this case. However my issue is, I think, that I need to add a custom command as su (not sudo). I ran across an old comment that said clicking on Startup Applications > + > Choose Application > Add Application the system will show every application available. So, if I add an executable file somewhere will it show up and be selectable here? That seems easy enough. However, I'm not sure how to deal with the fact that I need to be su to run the command. Also, where should the executable file be stored? Maybe there is a better way to do it? I searched the other 5 suggestions that rokytnji offered and found nothing that appears pertinent. |
I've found statements indicating that it is easy to add the command into the /etc/rc.local file which will run it at startup. These are the instructions I found:
Running a program automatically on Linux startup via rc.local rc.local is a legacy script from the System V init system, executed before displaying a login screen for the desktop environment or terminal login prompt. It is typically a Bash shell script capable of running any commands. To configure your rc.local script, follow these steps: As the root user, open or create the /etc/rc.local file using your preferred editor if it doesn't exist. Code:
$ sudo vi /etc/rc.local Insert commands and logic as needed. Code:
#!/bin/bash Code:
$ sudo chmod a+x /etc/rc.local Here is the resulting rc.local file: Code:
#!/bin/bash |
All times are GMT -5. The time now is 04:57 AM. |