As a system wakeup source a mouse that generates events when
it is moved, however, would make the system unsuspendable, whenever
even
a bit of vibration is acting on the system.
And as S4 is used in many setups to prevent an uncontrolled shutdown
at low power, this must work.
At least in my version of the series, this is part of the reason that it was
only intended to be used with s2idle.
The kernel driver is well aware of what power state you're in the suspend
callback (pm_suspend_target_state).
What about if we agreed to treat this one special by examining that?
If the sysfs is set to "enabled"
* During suspend if your target is s2idle -> program it
* During suspend if your target is mem -> disable it
* During suspend if your target is hibernate -> disable it
With that type of policy on how to handle the suspend call in place
perhaps we could set it to enabled by default?
Turning on "autosuspend" for USB mice makes them behave pretty
similarly to how they work when they're marked for remote wakeup.
On some mice the lasers turn off, and they only wakeup when you
press a button or roll a wheel.