public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] USB/UVC: Add quirks to prevent Razer Kiyo Pro xHCI cascade failure
@ 2026-03-31  0:38 JP Hein
  2026-03-31  0:38 ` [PATCH v5 1/3] USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam JP Hein
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: JP Hein @ 2026-03-31  0:38 UTC (permalink / raw)
  To: Laurent Pinchart, Hans de Goede, Greg Kroah-Hartman
  Cc: linux-media, linux-usb, Ricardo Ribalda, Michal Pecio, JP Hein

The Razer Kiyo Pro (1532:0e05) is a USB 3.0 webcam whose firmware has a
well-documented failure mode that cascades into complete xHCI host
controller death, disconnecting every USB device on the bus -- including
keyboards and mice, requiring a hard reboot.

The device has two crash triggers:

  1. LPM/autosuspend resume: Device enters LPM or autosuspend, fails to
     reinitialize on resume, producing EPIPE (-32) on UVC SET_CUR. The
     stalled endpoint triggers an xHCI stop-endpoint timeout, and the
     kernel declares the host controller dead.

  2. Rapid control transfers: sustained rapid UVC SET_CUR operations
     (hundreds over several seconds) overwhelm the firmware. The error-code query
     (GET_CUR on UVC_VC_REQUEST_ERROR_CODE_CONTROL) amplifies the
     failure by sending a second transfer to the already-stalling device,
     pushing it into a full lockup and xHCI controller death.

This has been reported as Ubuntu Launchpad Bug #2061177, with reports
across kernel versions 6.5 through 6.8.

This series adds three patches:

Patch 1: USB core -- USB_QUIRK_NO_LPM to prevent Link Power Management
  transitions that destabilize the device firmware.

Patch 2: UVC driver -- introduce UVC_QUIRK_CTRL_THROTTLE to rate-limit
  SET_CUR control transfers (50ms minimum interval) and skip the
  error-code query after EPIPE errors on affected devices.

Patch 3: UVC driver -- add Razer Kiyo Pro device table entry with
  UVC_QUIRK_CTRL_THROTTLE, UVC_QUIRK_DISABLE_AUTOSUSPEND, and
  UVC_QUIRK_NO_RESET_RESUME to address both crash triggers.

Together, these keep the device in a stable active state, prevent rapid
control transfer crashes, and avoid the power management transitions
that trigger the firmware bug.

Testing on 6.17.0-19-generic (Ubuntu 24.04 HWE) with dynamic debug
enabled and NO patches or workarounds applied:
  - v4l2-ctl stress test (control transfers only): passes 50/50
  - Starting a video call: triggers hc_died() via LPM disable failure
    during isochronous stream setup
  - Stress test during active video call: firmware stalls at round 19,
    repeated endpoint stalls with -32 EPIPE

The 6.8 -> 6.17 xHCI error handling improvements help with control
transfer recovery, but the firmware lockup during video streaming still
cascades to hc_died(). The patches in this series prevent the firmware
from reaching the lockup state in the first place.

Changes since v4:
  - Dropped stable CC (new quirks, not regression fixes)
  - Updated cover letter with 6.17 test results

Changes since v3:
  - Regenerated patches against media-committers next branch to fix
    context mismatch (v3 was based on Ubuntu 6.8 source)

Tested on:
  - Kernel: 6.17.0-19-generic (Ubuntu 24.04 HWE) and 6.8.0-106-generic
  - Hardware: Intel Cannon Lake PCH xHCI (8086:a36d)
  - Device: Razer Kiyo Pro (1532:0e05), firmware 1.5.0.1

Stress test, crash evidence, and debug logs:
  https://github.com/jphein/kiyo-xhci-fix

JP Hein (3):
  USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam
  media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile firmware
  media: uvcvideo: add quirks for Razer Kiyo Pro webcam

 drivers/media/usb/uvc/uvc_driver.c | 17 ++++++++++++++++
 drivers/media/usb/uvc/uvc_video.c  | 32 ++++++++++++++++++++++++++++++
 drivers/media/usb/uvc/uvcvideo.h   |  3 +++
 drivers/usb/core/quirks.c          |  2 ++
 4 files changed, 54 insertions(+)

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

end of thread, other threads:[~2026-04-11 13:39 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31  0:38 [PATCH v5 0/3] USB/UVC: Add quirks to prevent Razer Kiyo Pro xHCI cascade failure JP Hein
2026-03-31  0:38 ` [PATCH v5 1/3] USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam JP Hein
2026-03-31  0:38 ` [PATCH v5 2/3] media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile firmware JP Hein
2026-04-09  6:45   ` Ricardo Ribalda
     [not found]     ` <CAD5VvzAu8+Qz7hEEBzuKvO11X=YD-wrtX3_Tk77g2Cq5rZZD0Q@mail.gmail.com>
2026-04-09  7:51       ` Jeffrey Hein
2026-04-09  8:02     ` Michal Pecio
2026-04-09  8:15       ` Jeffrey Hein
2026-04-09 20:17       ` Michal Pecio
2026-04-10  0:01         ` Jeffrey Hein
2026-04-10  0:24           ` Jeffrey Hein
2026-04-10  4:47             ` Michal Pecio
2026-04-10 21:48         ` Mathias Nyman
2026-04-10 23:06           ` Jeffrey Hein
2026-04-11 13:39           ` Michal Pecio
2026-03-31  0:38 ` [PATCH v5 3/3] media: uvcvideo: add quirks for Razer Kiyo Pro webcam JP Hein
2026-04-09  6:49   ` Ricardo Ribalda
2026-04-09  7:38     ` Jeffrey Hein
2026-04-09  7:42 ` [PATCH v6 0/2] media: uvcvideo: Add quirks to prevent Razer Kiyo Pro xHCI cascade failure JP Hein
2026-04-09  7:42   ` [PATCH v6 1/2] media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile USB firmware JP Hein
2026-04-09  7:57     ` Ricardo Ribalda
2026-04-09  8:12       ` Jeffrey Hein
2026-04-09  7:42   ` [PATCH v6 2/2] media: uvcvideo: add Razer Kiyo Pro to device info table JP Hein
2026-04-09  7:57     ` Ricardo Ribalda
2026-04-09  8:13       ` Jeffrey Hein
2026-04-10  0:28 ` [PATCH v7 0/2] media: uvcvideo: Add quirks to prevent Razer Kiyo Pro xHCI cascade failure JP Hein
2026-04-10  0:28   ` [PATCH v7 1/2] media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile USB firmware JP Hein
2026-04-10  0:28   ` [PATCH v7 2/2] media: uvcvideo: add Razer Kiyo Pro to device info table JP Hein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox