* [PATCH 0/2] USB: core: Disconnect a parent hub on suspend for HyperX QuadCast S
@ 2026-11-19 22:22 Oleh Kurudz via B4 Relay
2026-11-19 22:22 ` [PATCH 1/2] USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND Oleh Kurudz via B4 Relay
2026-11-19 22:22 ` [PATCH 2/2] USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S Oleh Kurudz via B4 Relay
0 siblings, 2 replies; 5+ messages in thread
From: Oleh Kurudz via B4 Relay @ 2026-11-19 22:22 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Randy Dunlap, Greg Kroah-Hartman
Cc: Alan Stern, linux-doc, linux-kernel, linux-usb, Oleh Kurudz
The HyperX QuadCast S microphone is an audio function and an HID (RGB)
function behind a hub built into the microphone. During system suspend
the HID function drops off that hub, and the hub then wakes the system
even though remote wakeup is disabled for it. On s2idle machines the
suspend bounces back within about a second. Users report the same
symptom online, with unplugging the microphone as the usual workaround.
The existing USB_QUIRK_DISCONNECT_SUSPEND would fix this if it were set
on the hub, but the hub is a generic Huasheng 214b:7250 chip, and setting
the quirk on it would also stop keyboards behind other hubs with that
chip from waking the system. So patch 1 adds a quirk for the child
device that makes usb_suspend() disable the upstream port of its parent
hub, and patch 2 sets it for the two QuadCast S functions.
Other QuadCast models (QuadCast, QuadCast 2, the HP-era 03f0:xxxx IDs)
may have the same problem, but I only have the QuadCast S to test with.
They can be tried with usbcore.quirks=<vid>:<pid>:s.
Tested on usb-next (7.4.0-rc3) on an AMD laptop with s2idle.
How this was made: I had been working around the problem with a
systemd-sleep hook that disabled the microphone's upstream port, and
asked an AI coding assistant (Claude, claude-opus-5-5) to turn it into
a kernel fix. It read the USB core code, proposed the approach, wrote
both patches and the changelogs, and built the test kernel. I reviewed
the patches and ran the tests on my laptop: with the quirk cleared via
usbcore.quirks the bouncing suspend is reproducible, with it the system
stays suspended. checkpatch.pl --strict is clean and each patch builds
on its own with W=1.
Signed-off-by: Oleh Kurudz <admin@or1k.net>
---
Oleh Kurudz (2):
USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND
USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S
Documentation/admin-guide/kernel-parameters.txt | 5 +++++
drivers/usb/core/driver.c | 20 +++++++++++++++++++-
drivers/usb/core/quirks.c | 9 +++++++++
include/linux/usb/quirks.h | 7 +++++++
4 files changed, 40 insertions(+), 1 deletion(-)
---
base-commit: f11fe7603df07fbb9fa02b0d385c1696c87a6dab
change-id: 20261120-quadcast-s-suspend-b1d21389ac8a
Best regards,
--
Oleh Kurudz <admin@or1k.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND
2026-11-19 22:22 [PATCH 0/2] USB: core: Disconnect a parent hub on suspend for HyperX QuadCast S Oleh Kurudz via B4 Relay
@ 2026-11-19 22:22 ` Oleh Kurudz via B4 Relay
2026-11-19 22:30 ` sashiko-bot
2026-11-19 22:22 ` [PATCH 2/2] USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S Oleh Kurudz via B4 Relay
1 sibling, 1 reply; 5+ messages in thread
From: Oleh Kurudz via B4 Relay @ 2026-11-19 22:22 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Randy Dunlap, Greg Kroah-Hartman
Cc: Alan Stern, linux-doc, linux-kernel, linux-usb, Oleh Kurudz
From: Oleh Kurudz <admin@or1k.net>
Some USB products are several functions behind a small hub inside the
same enclosure. On the HyperX QuadCast S microphone one of these
functions drops off the bus while the system is suspending, and the
built-in hub then reports the connect change upstream and wakes the
system, even though remote wakeup is disabled for the hub and for
everything behind it. On s2idle systems the suspend bounces back within
about a second.
USB_QUIRK_DISCONNECT_SUSPEND does not help here. Set on the function
that drops off, it disables that function's port on the built-in hub,
but the hub itself still signals the wakeup. Set on the hub, it would
affect every product that uses the same generic hub chip (a Huasheng
214b:7250 in this case), including ones with a keyboard behind it that
is expected to wake the system.
Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND. When a hub has a child with
this quirk, usb_suspend() disables the hub's upstream port after
suspending it, just as USB_QUIRK_DISCONNECT_SUSPEND would for the hub
itself. The children are checked at suspend time instead of copying the
flag to the hub at enumeration, because a reset-resume of the hub re-runs
usb_detect_quirks() and would drop a copied flag.
Like USB_QUIRK_DISCONNECT_SUSPEND, this only affects system sleep;
runtime suspend does not go through usb_suspend(). The quirk can also be
set with the usbcore.quirks parameter, using the letter 's'.
This patch and its changelog were written with the help of an AI
coding assistant (Claude, claude-opus-5-5). I reviewed the result and
tested it on my hardware, see the next patch.
Signed-off-by: Oleh Kurudz <admin@or1k.net>
---
Documentation/admin-guide/kernel-parameters.txt | 5 +++++
drivers/usb/core/driver.c | 20 +++++++++++++++++++-
drivers/usb/core/quirks.c | 3 +++
include/linux/usb/quirks.h | 7 +++++++
4 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 176648941..7751c373a 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -8235,6 +8235,11 @@ Kernel parameters
9-bytes configuration descriptor request.
Ask for 255-bytes request instead to mirror
Windows' behavior);
+ s = USB_QUIRK_DISCONNECT_PARENT_SUSPEND
+ (Device sits behind a hub that signals
+ a spurious wakeup when the device drops
+ off the bus during suspend; disconnect
+ the hub before suspend);
Example: quirks=0781:5580:bk,0a5c:5834:gij
usbhid.mousepoll=
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index d3a61ebc6..a40d9595b 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1620,6 +1620,23 @@ static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
udev->do_remote_wakeup = w;
}
+/*
+ * Check whether a child of @hdev wants @hdev disconnected during system
+ * suspend. The caller must hold @hdev's device lock, which keeps the set of
+ * children stable.
+ */
+static bool usb_child_wants_parent_disconnect(struct usb_device *hdev)
+{
+ struct usb_device *child;
+ int port1;
+
+ usb_hub_for_each_child(hdev, port1, child) {
+ if (child->quirks & USB_QUIRK_DISCONNECT_PARENT_SUSPEND)
+ return true;
+ }
+ return false;
+}
+
/* The device lock is held by the PM core */
int usb_suspend(struct device *dev, pm_message_t msg)
{
@@ -1637,7 +1654,8 @@ int usb_suspend(struct device *dev, pm_message_t msg)
if (r)
return r;
- if (udev->quirks & USB_QUIRK_DISCONNECT_SUSPEND)
+ if ((udev->quirks & USB_QUIRK_DISCONNECT_SUSPEND) ||
+ (udev->parent && usb_child_wants_parent_disconnect(udev)))
usb_port_disable(udev);
return 0;
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index a4bcbe9c9..3933cf9c0 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -146,6 +146,9 @@ static int quirks_param_set(const char *value, const struct kernel_param *kp)
case 'r':
flags |= USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE;
break;
+ case 's':
+ flags |= USB_QUIRK_DISCONNECT_PARENT_SUSPEND;
+ break;
/* Ignore unrecognized flag characters */
}
}
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index a4043b33c..101dd1ca4 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -84,4 +84,11 @@
/* Use a 255 bytes config descriptor request mirroring windows behavior */
#define USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE BIT(19)
+/*
+ * Device sits behind a hub that signals a spurious wakeup when the device
+ * drops off the bus during system suspend; the hub needs to be disconnected
+ * before suspend.
+ */
+#define USB_QUIRK_DISCONNECT_PARENT_SUSPEND BIT(20)
+
#endif /* __LINUX_USB_QUIRKS_H */
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S
2026-11-19 22:22 [PATCH 0/2] USB: core: Disconnect a parent hub on suspend for HyperX QuadCast S Oleh Kurudz via B4 Relay
2026-11-19 22:22 ` [PATCH 1/2] USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND Oleh Kurudz via B4 Relay
@ 2026-11-19 22:22 ` Oleh Kurudz via B4 Relay
2026-11-19 22:27 ` sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: Oleh Kurudz via B4 Relay @ 2026-11-19 22:22 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Randy Dunlap, Greg Kroah-Hartman
Cc: Alan Stern, linux-doc, linux-kernel, linux-usb, Oleh Kurudz
From: Oleh Kurudz <admin@or1k.net>
The HyperX QuadCast S microphone has a built-in Huasheng 214b:7250 hub
with two functions behind it: an audio device (0951:171d) and an HID
device for the RGB lighting (0951:171f). During system suspend the HID
function drops off the built-in hub, and the hub wakes the system even
though remote wakeup is disabled. On an AMD laptop using s2idle the
first suspend after boot comes back within about a second:
[ 68.618009] PM: suspend entry (s2idle)
[ 69.752213] usb 1-1.3.1: usb suspend, wakeup 0
[ 69.753139] usb 1-1.3.4: usb suspend, wakeup 0
[ 69.753876] hub 1-1.3:1.0: hub_suspend
[ 69.754488] usb 1-1.3: usb suspend, wakeup 0
[ 69.775275] PM: suspend-to-idle
[ 69.775287] ACPI: PM: ACPI non-EC GPE wakeup
[ 69.775305] PM: resume from suspend-to-idle
[ 69.775319] amd_pmc AMDI0009:00: Last suspend didn't reach deepest state
[ 69.780417] usb 1-1.3-port1: status 0101 change 0001
[ 69.793138] PM: suspend exit
Here 1-1.3 is the built-in hub, 1-1.3.1 the HID function and 1-1.3.4
the audio function.
Disconnect the built-in hub during system suspend. Both functions get
the quirk, so it still applies if one of them failed to enumerate. The
microphone then cannot wake the system, which it is not expected to do
anyway, and on resume the hub is reset and both functions come back as
the same devices.
Tested on an AMD laptop (s2idle) with the microphone behind an external
hub that also carries a keyboard and a mouse: with this patch the system
stays in s2idle, the keyboard behind the external hub still wakes it,
and the microphone records normally after resume. Booting with
usbcore.quirks=0951:171d:s,0951:171f:s, which clears the quirk again,
brings the bouncing suspend back.
This patch and its changelog were written with the help of an AI
coding assistant (Claude, claude-opus-5-5). I reviewed the result and
ran the tests described above.
Signed-off-by: Oleh Kurudz <admin@or1k.net>
---
drivers/usb/core/quirks.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 3933cf9c0..97c63aabb 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -428,6 +428,12 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Kingston DataTraveler 3.0 */
{ USB_DEVICE(0x0951, 0x1666), .driver_info = USB_QUIRK_NO_LPM },
+ /* HyperX QuadCast S, audio and HID functions behind its built-in hub */
+ { USB_DEVICE(0x0951, 0x171d), .driver_info =
+ USB_QUIRK_DISCONNECT_PARENT_SUSPEND },
+ { USB_DEVICE(0x0951, 0x171f), .driver_info =
+ USB_QUIRK_DISCONNECT_PARENT_SUSPEND },
+
/* TOSHIBA TransMemory-Mx */
{ USB_DEVICE(0x0930, 0x1408), .driver_info = USB_QUIRK_NO_LPM },
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S
2026-11-19 22:22 ` [PATCH 2/2] USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S Oleh Kurudz via B4 Relay
@ 2026-11-19 22:27 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-19 22:27 UTC (permalink / raw)
To: Oleh Kurudz; +Cc: linux-usb
> From: Oleh Kurudz <admin@or1k.net>
>
> The HyperX QuadCast S microphone has a built-in Huasheng 214b:7250 hub
> with two functions behind it: an audio device (0951:171d) and an HID
> device for the RGB lighting (0951:171f). During system suspend the HID
> function drops off the built-in hub, and the hub wakes the system even
> though remote wakeup is disabled. On an AMD laptop using s2idle the
> first suspend after boot comes back within about a second:
>
> [ 68.618009] PM: suspend entry (s2idle)
> [ 69.752213] usb 1-1.3.1: usb suspend, wakeup 0
> [ 69.753139] usb 1-1.3.4: usb suspend, wakeup 0
> [ 69.753876] hub 1-1.3:1.0: hub_suspend
> [ 69.754488] usb 1-1.3: usb suspend, wakeup 0
> [ 69.775275] PM: suspend-to-idle
> [ ... ]
> This patch and its changelog were written with the help of an AI
> coding assistant (Claude, claude-opus-5-5). I reviewed the result and
> ran the tests described above.
>
> Signed-off-by: Oleh Kurudz <admin@or1k.net>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-quadcast-s-suspend-v1-0-add8ccf12c8f@or1k.net?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND
2026-11-19 22:22 ` [PATCH 1/2] USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND Oleh Kurudz via B4 Relay
@ 2026-11-19 22:30 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-19 22:30 UTC (permalink / raw)
To: Oleh Kurudz; +Cc: linux-usb
> From: Oleh Kurudz <admin@or1k.net>
>
> Some USB products are several functions behind a small hub inside the
> same enclosure. On the HyperX QuadCast S microphone one of these
> functions drops off the bus while the system is suspending, and the
> built-in hub then reports the connect change upstream and wakes the
> system, even though remote wakeup is disabled for the hub and for
> everything behind it. On s2idle systems the suspend bounces back within
> about a second.
>
> USB_QUIRK_DISCONNECT_SUSPEND does not help here. Set on the function
> that drops off, it disables that function's port on the built-in hub,
> but the hub itself still signals the wakeup. Set on the hub, it would
> affect every product that uses the same generic hub chip (a Huasheng
> 214b:7250 in this case), including ones with a keyboard behind it that
> [ ... ]
> This patch and its changelog were written with the help of an AI
> coding assistant (Claude, claude-opus-5-5). I reviewed the result and
> tested it on my hardware, see the next patch.
>
> Signed-off-by: Oleh Kurudz <admin@or1k.net>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-quadcast-s-suspend-v1-0-add8ccf12c8f@or1k.net?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-19 22:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 22:22 [PATCH 0/2] USB: core: Disconnect a parent hub on suspend for HyperX QuadCast S Oleh Kurudz via B4 Relay
2026-11-19 22:22 ` [PATCH 1/2] USB: core: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND Oleh Kurudz via B4 Relay
2026-11-19 22:30 ` sashiko-bot
2026-11-19 22:22 ` [PATCH 2/2] USB: quirks: Add USB_QUIRK_DISCONNECT_PARENT_SUSPEND for HyperX QuadCast S Oleh Kurudz via B4 Relay
2026-11-19 22:27 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox