public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-pm@vger.kernel.org, Richard Gong <richard.gong@amd.com>,
	linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 10/10] HID: usbhid: Set USB mice as s2idle wakeup resources
Date: Fri, 1 Jul 2022 08:57:11 +0200	[thread overview]
Message-ID: <Yr6ax+aEuNaB98BR@kroah.com> (raw)
In-Reply-To: <20220701023328.2783-10-mario.limonciello@amd.com>

On Thu, Jun 30, 2022 at 09:33:28PM -0500, Mario Limonciello wrote:
> The USB HID transport layer doesn't configure mice for wakeup by default.
> Thus users can not wake system from s2idle via USB mouse. However, users
> can wake the same system from Modern Standby on Windows with the same USB
> mouse.
> 
> Microsoft documentation indicates that all USB mice and touchpads should
> be waking the system from Modern Standby.
> 
> Many people who have used Windows on a PC that supports Modern Standby
> have an expectation that s2idle wakeup sources should behave the same in
> Linux. For example if your PC is configured "dual-boot" and is used docked
> it's very common to wakeup by using a USB mouse connected to your dock in
> Windows. Switching to Linux this is not enabled by default and you'll
> need to manually turn it on or use a different wakeup source than you did
> for Windows.
> 
> Changes for wakeups have been made in other subsystems such as the PS/2
> keyboard driver which align how wakeup sources in Linux and Modern Standby
> in Windows behave. To align expectations from users on USB mice, make this
> behavior the same when the system is configured both by the OEM and the
> user to use s2idle in Linux.
> 
> This means that at a minimum supported mice will be able to wakeup by
> clicking a button. If the USB mouse is powered over the s2idle cycle (such
> as a wireless mouse with a battery) it's also possible that moving it
> may wake up the system.  This is HW dependent behavior.
> 
> If the user sets the system to use S3 instead of s2idle, or the OEM ships
> the system defaulting to S3, this behavior will not be turned on by
> default.
> 
> Users who have a modern laptop that supports s2idle and use s2idle but
> prefer the previous Linux kernel behavior can turn this off via a udev
> rule.
> 
> Link: https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-wake-sources#input-devices-1
> Link: https://lore.kernel.org/linux-usb/20220404214557.3329796-1-richard.gong@amd.com/
> Suggested-by: Richard Gong <richard.gong@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> More people keep coming to us confused that they couldn't wake a Linux system
> up from sleep using a mouse, so this patch is being revived.
> 
> Microsoft documentation doesn't indicate any allowlist for this behavior, and
> they actually prescribe it for all USB mice and touchpads.

Note, this is very different than older versions of Windows.  Any idea
when this behavior and prescription changed?

Also, how are you going to handle the differences between "internal" and
"external" USB mice and touchpads?  The microsoft link above only
references external USB and Bluetooth devices, not internal ones.

> 
> changes from v2->v3:
>  * Use `pm_suspend_preferred_s2idle`
>  * Drop now unnecessary acpi.h header inclusion
>  * Update commit message
>  * Adjust comments from v2 per thread
> 
> changes from v1->v2:
>  * Resubmit by Mario
>  * Update commit message
>  * Only activate on systems configured by user and OEM for using s2idle
> ---
>  drivers/hid/usbhid/hid-core.c | 37 ++++++++++++++++++++++++-----------
>  1 file changed, 26 insertions(+), 11 deletions(-)

Where are patches 1-9 of this series?

confused,

greg k-h

  reply	other threads:[~2022-07-01  6:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  2:33 [PATCH v3 01/10] PM: suspend: Introduce `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-01  2:33 ` [PATCH v3 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-13 18:33   ` Rafael J. Wysocki
2022-07-01  2:33 ` [PATCH v3 03/10] ACPI: LPIT: " Mario Limonciello
2022-07-01 13:01   ` kernel test robot
2022-07-01  2:33 ` [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-01  5:06   ` Damien Le Moal
2022-07-01 18:01     ` Mario Limonciello
2022-07-02  9:34   ` kernel test robot
2022-07-01  2:33 ` [PATCH v3 05/10] rtc: cmos: " Mario Limonciello
2022-07-01 11:50   ` kernel test robot
2022-07-01  2:33 ` [PATCH v3 06/10] thermal: intel: pch: " Mario Limonciello
2022-07-01  2:33 ` [PATCH v3 07/10] drm/amd: " Mario Limonciello
2022-07-01  2:33 ` [PATCH v3 08/10] drm/amd: Use `pm_suspend_default_s2idle` Mario Limonciello
2022-07-01  2:33 ` [PATCH v3 09/10] HID: I2C-HID: Use `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-01  2:33 ` [PATCH v3 10/10] HID: usbhid: Set USB mice as s2idle wakeup resources Mario Limonciello
2022-07-01  6:57   ` Greg KH [this message]
2022-07-01  6:58   ` Greg KH
2022-07-01 18:00     ` Mario Limonciello
2022-07-01 11:30   ` kernel test robot
2022-07-12 19:06 ` [PATCH v3 01/10] PM: suspend: Introduce `pm_suspend_preferred_s2idle` Rafael J. Wysocki
2022-07-12 20:16   ` Limonciello, Mario
2022-07-13 18:27     ` Rafael J. Wysocki

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=Yr6ax+aEuNaB98BR@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario.limonciello@amd.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