mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: "Limonciello, Mario" <Mario.Limonciello@amd.com>,
	Oliver Neukum <oneukum@suse.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Michael Wu <michael@allwinnertech.com>
Cc: "jikos@kernel.org" <jikos@kernel.org>,
	"benjamin.tissoires@redhat.com" <benjamin.tissoires@redhat.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Gong, Richard" <Richard.Gong@amd.com>
Subject: Re: [PATCH] HID: usbhid: enable remote wakeup for mice
Date: Tue, 28 Feb 2023 10:03:22 +0100	[thread overview]
Message-ID: <f2142d88-259f-302d-da61-e0fc39d1f041@suse.com> (raw)
In-Reply-To: <MN0PR12MB6101B1BF9748F0602684FED5E2AB9@MN0PR12MB6101.namprd12.prod.outlook.com>

On 23.02.23 20:41, Limonciello, Mario wrote:

Hi,

>> 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.

Yes, that is sensible. If these patches are to be taken at all, that will
be a necessary condition to meet. But it is not sufficient.
  
> 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"

If user space needs to manipulate sysfs at all, we can have user space
tell kernel space exactly what to do. Hence I see no point in
conditional interpretations values in sysfs at that point.

We are discussing the kernel's default here.

> * 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

To my mind these defaults make sense.
However, do they make much more sense than what we are doing now?

> With that type of policy on how to handle the suspend call in place
> perhaps we could set it to enabled by default?

It pains me to say, but I am afraid in that regard the only
decision that will not cause ugly surprises is to follow Windows.
Yet, what is wrong about the current defaults?
  
> Turning on "autosuspend" for USB mice makes them behave pretty
> similarly to how they work when they're marked for remote wakeup.

Because it is exactly the same mechanism.
  
> On some mice the lasers turn off, and they only wakeup when you
> press a button or roll a wheel.

Yes. And _some_ is the exact problem. If we could tell, _how_ mice
react, this discussion were unnecessary.

	Regards
		Oliver

  reply	other threads:[~2023-02-28  9:03 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
2023-02-23 19:41         ` Limonciello, Mario
2023-02-28  9:03           ` Oliver Neukum [this message]
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=f2142d88-259f-302d-da61-e0fc39d1f041@suse.com \
    --to=oneukum@suse.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Richard.Gong@amd.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=michael@allwinnertech.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

Powered by JetHome