linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend
@ 2023-11-26 23:05 Luke D. Jones
  2023-11-26 23:05 ` [PATCH v2 1/1] " Luke D. Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Luke D. Jones @ 2023-11-26 23:05 UTC (permalink / raw)
  To: hdegoede
  Cc: ilpo.jarvinen, corentin.chary, platform-driver-x86, linux-kernel,
	Luke D. Jones

This is a fix for the ROG Ally not being able to use the N-Key device after a suspend/resume cycle.

The root of the issue is that ASUS changed the MCU firmware to dfisconnect the USB0 hub when the
screen is switched off during the s2idle suspend path. I tried many many different tactics to try
and get this s2idle part to work but it seems there are races between this and other subsystems.

What has so far been reliable and consistent is a manual call to the CSEE method that is called in
ACPI by the Microsoft DSM screen off path followed by a short sleep in asus-wmi. The PM prepare
hook looks to be the earliest possible place. A sleep that is too long ends up with USB subsystem
registering a disconnect, and thus on resume the device paths change. Too short and it is unreliable.

Some discussion regarding this mess is at https://gitlab.freedesktop.org/drm/amd/-/issues/2719#note_2181402

Changelog:
- v2:
  - Emit dev_err(), but don't return error codes
  - Add check for MCU power save mode being enabled and disable if active
  - General cleanup and rename some vars/funcs
- v1: https://lore.kernel.org/all/20231124082749.23353-1-luke@ljones.dev/

Luke D. Jones (1):
  platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend

 drivers/platform/x86/asus-wmi.c            | 50 ++++++++++++++++++++++
 include/linux/platform_data/x86/asus-wmi.h |  3 ++
 2 files changed, 53 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-11-28 13:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-26 23:05 [PATCH v2 0/1] platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend Luke D. Jones
2023-11-26 23:05 ` [PATCH v2 1/1] " Luke D. Jones
2023-11-27  8:03   ` Philip Müller
2023-11-27  8:53   ` Hans de Goede
2023-11-27 20:17     ` Luke Jones
2023-11-27 22:39       ` Hans de Goede
2023-11-28  0:57         ` Luke Jones
2023-11-27 20:14   ` Mario Limonciello
2023-11-27 20:46     ` Luke Jones
2023-11-27 20:55       ` Mario Limonciello
2023-11-27 21:44         ` Armin Wolf
     [not found]         ` <fb8ebdfb-fc53-4343-8df3-96f04b405ace@gmx.de>
2023-11-28  0:54           ` Luke Jones
2023-11-28  1:16             ` Armin Wolf
2023-11-28  1:20               ` Luke Jones
2023-11-28  1:30                 ` Mario Limonciello
2023-11-26 23:10 ` [PATCH v2 0/1] " Luke Jones
2023-11-28 13:21 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).