On 6/4/23 19:20, Michael wrote:
> On Thursday, 6 April 2023 11:49:29 BST Frank Steinmetzger wrote:
>> Am Wed, Apr 05, 2023 at 05:35:52PM +0800 schrieb William Kenworthy:
>>>>> I have suspend/hibernate set up on a desktop ... it's been working
>>>>> fine for years. But recently, it's been occaisionally coming out of
>>>>> suspension some time after suspension without any intervention on my
>>>>> part. I am suspecting the mouse - I would prefer not to disable the
>>>>> mouse ... Is there an alternative? BillK
>>>> Often there are options in the BIOS/UEFI to choose what can cause it to
>>>> come out of suspension.
>>> Unfortunately they are already off (the bios has PS2 settings) - the mouse
>>> is part of a keyboard/mouse set using a Logitech unifying USB dongle. I
>>> can use a udev rule to turn off waking via the USB port, but I cant
>>> separate the mouse from the keyboard - and I need the keyboard enabled to
>>> wake the PC up.
>> Usually, Logitech mice have a switch on the bottom to physically turn them
>> on or off. Usually I use that to circumvent wake-on-USB, rather than pulling
>> out the USB wart.
> Have a look in '/sys/devices/.../power/wakeup files' to see if tweaking sys
> files can stop your USB mouse waking up the OS:
>
> https://www.kernel.org/doc/html/v6.1/driver-api/pm/devices.html#interfaces-for-entering-system-sleep-states
>
the above seems like a dead end - the mouse and keyboard share the usb device through the Logitech Unifying Receiver - they are not broken out at that level so disabling USB disables both ... and I need the keyboard to bring it out of suspend.
I think there are actually two problems ... any mouse movement immediately after clicking the button seems to be cached and triggers a resume within a few seconds after suspending and even a slight movement of the mouse at any time triggers a resume. Its an optical mouse, so movements are generated if you pick it up to turn it off so that's out. All I have been able to do is to position it out of the way, carefully click the button and immediately leave it alone ... this mostly works :(
This over-sensitive behaviour seems to have started with later 5.15 kernels and has become annoyingly worse with 6.1 - before that it seemed to have a threshold before it would resume, but thats probably just my imagination now its bugging me :)
I am starting to wonder if its a "just me" problem.
BillK