Mint 19 wakes by mouse moving

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
vlad1777d

Mint 19 wakes by mouse moving

Post by vlad1777d »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
kyphi
Level 9
Level 9
Posts: 2735
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: Mint 19 wakes by mouse moving

Post by kyphi »

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 21.3 Cinnamon
gm10

Re: Mint 19 wakes by mouse moving

Post by gm10 »

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

Re: Mint 19 wakes by mouse moving

Post by vlad1777d »

Huh, strange.
My mouse wakes.

DIdn't got how to turn this off )
gm10

Re: Mint 19 wakes by mouse moving

Post by gm10 »

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

Re: Mint 19 wakes by mouse moving

Post by vlad1777d »

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

Re: Mint 19 wakes by mouse moving

Post by vlad1777d »

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

Re: Mint 19 wakes by mouse moving

Post by gm10 »

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: 14
Joined: Wed Aug 08, 2018 10:43 am

Re: Mint 19 wakes by mouse moving

Post by Phuxxi »

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 9
Level 9
Posts: 2508
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: Mint 19 wakes by mouse moving

Post by BG405 »

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-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
Phuxxi
Level 1
Level 1
Posts: 14
Joined: Wed Aug 08, 2018 10:43 am

Re: Mint 19 wakes by mouse moving

Post by Phuxxi »

Yeah but the issue of your cats, your friends at the pub, and your excuses, as "valid reasons" - from you and for you, for not throwing my own laptop into suspend by me closing my laptops screen, that is more like bad management, and it's not something I am interested in hearing about.

My cats do not walk over my keyboards or piss around near my computers, and my friends are not retarded drunken cock heads, who interfere with my computers mid session.

That is called maturity, self respect and base level intelligence - or "If it's not yours, don't rainbows with it".


I have my lappy running, internetting away, log out, or working and I save everything, close laptop, and it's automatically in suspend.

That's how I like it.

What you do with your chaos, is not my problem.

I am not interested in people with problems, who provide no solutions to anything.
Locked

Return to “Software & Applications”