Mint 19 wakes by mouse moving

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
vlad1777d
Level 1
Level 1
Posts: 33
Joined: Fri Mar 13, 2015 6:20 pm

Mint 19 wakes by mouse moving

Post by vlad1777d » Thu Jul 26, 2018 6:05 pm

Hello.

In Mint 18 (all versions), after suspending, system didn't wake after moving mouse, Mint 19 - does.
This leads to waking my PC and laptop after every hit in my room.

I'm sure it would be better to return previous behaviour.

Thanks.

User avatar
kyphi
Level 8
Level 8
Posts: 2328
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter, Australia

Re: Mint 19 wakes by mouse moving

Post by kyphi » Fri Jul 27, 2018 1:11 am

I have just tested Linux Mint 18 Cinnamon 64bit and mouse movement does wake from suspend as does a key stroke.

It is meant to work like that. How else would you restore the system?

What I do is switch the mouse off after clicking on "suspend".
Linux Mint 19 Cinnamon - 64bit

gm10
Level 12
Level 12
Posts: 4179
Joined: Thu Jun 21, 2018 5:11 pm

Re: Mint 19 wakes by mouse moving

Post by gm10 » Fri Jul 27, 2018 4:38 am

My mouse doesn't actually wake from suspend in Mint 19 but I think it's a question of the kernel used, they have different defaults. I'm currently not on a 4.15 series kernel.

However, here's a recent thread where I helped somebody to enable his trackball to wake on suspend, but if you read through the thread, mainly his first post and my (final) solution in there, you'll see how you can just set it to disabled instead:
viewtopic.php?p=1500647#p1500647

Let me know if you need help with that.

vlad1777d
Level 1
Level 1
Posts: 33
Joined: Fri Mar 13, 2015 6:20 pm

Re: Mint 19 wakes by mouse moving

Post by vlad1777d » Sat Jul 28, 2018 5:37 pm

Huh, strange.
My mouse wakes.

DIdn't got how to turn this off )

gm10
Level 12
Level 12
Posts: 4179
Joined: Thu Jun 21, 2018 5:11 pm

Re: Mint 19 wakes by mouse moving

Post by gm10 » Sat Jul 28, 2018 6:12 pm

vlad1777d wrote:
Sat Jul 28, 2018 5:37 pm
DIdn't got how to turn this off )
run

Code: Select all

lsusb -t
find the bus and the port of the Human Interface Devices.

Say your mouse is on Bus 01, Port 2, then you check for its wakeup setting like this (note the 1-2 for bus and port, adjust for your own values):

Code: Select all

cat /sys/bus/usb/devices/1-2/power/wakeup
I'm assuming it will say enabled. If it does, then do this (again adjust 1-2 to your own values):

Code: Select all

sudo echo disabled >  /sys/bus/usb/devices/1-2/power/wakeup
now put your computer to sleep and see if the mouse can wake it up. If yes, I'll tell you how to make it a permanent change.

vlad1777d
Level 1
Level 1
Posts: 33
Joined: Fri Mar 13, 2015 6:20 pm

Re: Mint 19 wakes by mouse moving

Post by vlad1777d » Sat Jul 28, 2018 6:34 pm

kyphi wrote:
Fri Jul 27, 2018 1:11 am
How else would you restore the system?
I thought about pressing any key, not just move mouse.
kyphi wrote:
Fri Jul 27, 2018 1:11 am
What I do is switch the mouse off after clicking on "suspend".
Most mouses I saw switch automatically after near 2 minutes of not using them.

vlad1777d
Level 1
Level 1
Posts: 33
Joined: Fri Mar 13, 2015 6:20 pm

Re: Mint 19 wakes by mouse moving

Post by vlad1777d » Sat Jul 28, 2018 6:40 pm

gm10 wrote:
Sat Jul 28, 2018 6:12 pm
now put your computer to sleep and see if the mouse can wake it up. If yes, I'll tell you how to make it a permanent change.
Thank you, that worked.

(of course, it would be better to wake only on mouse key pressed, not just when it's moved (now it doesn't wake laptop at all), but current behaviour is in times better than previous =) )

gm10
Level 12
Level 12
Posts: 4179
Joined: Thu Jun 21, 2018 5:11 pm

Re: Mint 19 wakes by mouse moving

Post by gm10 » Sat Jul 28, 2018 6:54 pm

vlad1777d wrote:
Sat Jul 28, 2018 6:40 pm
(of course, it would be better to wake only on mouse key pressed, not just when it's moved (now it doesn't wake laptop at all), but current behaviour is in times better than previous =) )
Wait, now I may be confused. Your goal was to NOT have the system wake up on mouse movement. Was that goal achieved? That above sounds like it's still happening?

If I got confused over nothing and the mouse doesn't wake you anymore, then make the change permanent like this:

Code: Select all

sudo nano /lib/systemd/system-sleep/mouse_disable_wakeup
Paste the following into it, again replacing 1-2 by whatever your values are:

Code: Select all

#!/bin/sh
case "$1" in
    pre)
        echo disabled > /sys/bus/usb/devices/1-2/power/wakeup
        ;;
esac
Press Ctrl+S to save and Ctrl+X to exit the editor, followed by this:

Code: Select all

sudo chmod +x /lib/systemd/system-sleep/mouse_disable_wakeup
All done.

Phuxxi
Level 1
Level 1
Posts: 3
Joined: Wed Aug 08, 2018 10:43 am

Re: Mint 19 wakes by mouse moving

Post by Phuxxi » Sat Aug 11, 2018 3:37 pm

To whine a bit, the power manager, is an overdose of micro managing, every little nuance.

I have this theory, in essence, if you need to use your computer, you have it on.

And if you don't use it, you either throw it into suspend, or turn it off.

And I see a lot of value for laptops, into throwing them into and out of suspend by linking that to the opening and closing of the lid....(with or without screen lock) and ALL the accessories can be locked out / disabled...

If you are really studying or working, you only need the screen opening switch and the off / on button, to maintain system access into running or suspended.


Of course I am mindful of battery management, but the current state of affairs is overly complex.

I'd like to recode a basic power manager for people who are either using their laptops or they are not.

Just a suggestion.

User avatar
BG405
Level 7
Level 7
Posts: 1551
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: Mint 19 wakes by mouse moving

Post by BG405 » Tue Aug 14, 2018 2:09 pm

Phuxxi wrote:
Sat Aug 11, 2018 3:37 pm
And I see a lot of value for laptops, into throwing them into and out of suspend by linking that to the opening and closing of the lid....(with or without screen lock) and ALL the accessories can be locked out / disabled...

If you are really studying or working, you only need the screen opening switch and the off / on button, to maintain system access into running or suspended.
Having the laptop go into sleep (or hibernate) mode when the lid is closed is not always a good option.

For example, cats chasing around, or when connected remotely via ssh or using scp, or whatever. Or down the Pub, when some joker decides to shut the lid when you're in the middle of something.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - Manjaro KDE, LM17.3 KDE 32
Toshiba NB305 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

Post Reply

Return to “Software & Applications”