From: Oliver Neukum <oneukum@suse.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Michael Wu <michael@allwinnertech.com>
Cc: jikos@kernel.org, benjamin.tissoires@redhat.com,
linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, mario.limonciello@amd.com,
richard.gong@amd.com
Subject: Re: [PATCH] HID: usbhid: enable remote wakeup for mice
Date: Thu, 23 Feb 2023 13:01:54 +0100 [thread overview]
Message-ID: <801338c3-7c0d-6b3e-eac8-872ee5add466@suse.com> (raw)
In-Reply-To: <Y/dMq2KKYfdMdrjh@kroah.com>
On 23.02.23 12:23, Greg KH wrote:
>> I just want to explain the background of my patch, to prove we could use a
>> similar way to avoid such a "disturbing" situation.
>> To reduce the influence, my patch enables remote wakeup for USB mouse
>> devices refer to what keyboard do.
>
> Keyboards are not mice :)
>
OK, let me explain, why I never proposed switching on autosuspend
for mice or using them as a system wakeup source. The reasons are very
similar.
Basically the standard gives us no way to ask a device what constitutes
a wakeup event for it. We just get the blanket statement of support
or no support.
For runtime PM I would want my mouse to generate a remote wakeup
whenever a button is pressed or the mouse is moved. Under this
premise runtime PM with a mouse works wonderfully. Testing that,
however, is a challenge.
It turns out that mice that claim that they support remote wakeup
by and large deactivate their LED/laser when you send them into
suspension. Hence they react only to buttons being pressed or mouse
wheels moved.
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.
I suspect that most, but _not_ _all_ mice, are designed for use
with a system that ties power management to the screen saver.
That is a mode of operation that due to the lack of coupling
between GUI and kernel is hard to copy.
Frankly given these constraints the only default safe in every
case seems to me to leave the kernel's default at off and
put the work into udev's hwdb. Not that that is a good solution,
merely the best I can come up with.
Regards
Oliver
next prev parent reply other threads:[~2023-02-23 12:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 1:39 Michael Wu
2023-02-22 6:04 ` Greg KH
2023-02-22 19:50 ` Limonciello, Mario
2023-02-23 11:41 ` Oliver Neukum
2023-02-23 11:18 ` Michael Wu
2023-02-23 11:23 ` Greg KH
2023-02-23 12:01 ` Oliver Neukum [this message]
2023-02-23 19:41 ` Limonciello, Mario
2023-02-28 9:03 ` Oliver Neukum
2023-02-28 18:50 ` Limonciello, Mario
2023-02-28 19:05 ` Greg KH
2023-02-28 19:07 ` Limonciello, Mario
2023-02-24 7:02 ` Michael Wu
2023-02-22 8:59 ` Sergei Shtylyov
2023-02-23 4:01 ` Michael Wu
2023-02-22 9:34 ` Oliver Neukum
2023-02-23 11:22 ` Michael Wu
2023-02-23 11:47 ` Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2011-10-14 7:54 Benson Leung
2011-10-14 8:18 ` Oliver Neukum
2011-10-14 13:56 ` Alan Stern
2011-10-14 14:00 ` Jiri Kosina
2011-10-14 14:58 ` Benson Leung
2011-10-14 15:09 ` Alan Stern
2011-10-15 9:43 ` Oliver Neukum
2011-10-15 19:07 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=801338c3-7c0d-6b3e-eac8-872ee5add466@suse.com \
--to=oneukum@suse.com \
--cc=benjamin.tissoires@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=michael@allwinnertech.com \
--cc=richard.gong@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®