public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* g_webcam UVC gadget causes USB\DEVICE_DESCRIPTOR_FAILURE on Windows 11
@ 2025-05-28  2:48 Josh Cabarrus
  2025-05-28  4:34 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Cabarrus @ 2025-05-28  2:48 UTC (permalink / raw)
  To: linux-usb; +Cc: laurent.pinchart, balbi

Bug Report: g_webcam UVC gadget incompatible with Windows 11 USB
descriptor validation

To: linux-usb@vger.kernel.org
CC: laurent.pinchart@ideasonboard.com, balbi@kernel.org
Subject: g_webcam UVC gadget causes USB\DEVICE_DESCRIPTOR_FAILURE on Windows 11

Summary

The g_webcam UVC gadget driver fails to enumerate properly on Windows
11, returning USB\DEVICE_DESCRIPTOR_FAILURE in Device Manager, while
other USB gadgets (g_serial, g_mass_storage) work correctly on the
same hardware and Windows version. This represents a regression in
Windows compatibility.

System Information

Hardware: Raspberry Pi Zero W Rev 1.1 (BCM2835, Revision: 9000c1)
Kernel: Linux 6.12.25+rpt-rpi-v6 #1 Raspbian (armv6l)
USB Controller: dwc2 20980000.usb
Host OS: Windows 11 (up to date)

Problem Description

When g_webcam is loaded and the Pi Zero W is connected to Windows 11 via USB:

g_webcam behavior:

Loads successfully on Pi: g_webcam ready, bound driver g_webcam
UDC state remains: not attached (never reaches configured)
Windows shows: Unknown USB Device (Device Descriptor Request Failed)
Hardware ID: USB\DEVICE_DESCRIPTOR_FAILURE

g_serial behavior (control test):

Loads successfully: g_serial ready, bound driver g_serial
UDC state becomes: configured
Windows properly recognizes as COM port device

Steps to Reproduce

bash

# On Raspberry Pi Zero W:
sudo modprobe g_webcam
cat /sys/class/udc/20980000.usb/state  # Shows: not attached

# Connect USB cable to Windows 11
# Result: "Unknown USB Device" in Device Manager

# Control test:
sudo rmmod g_webcam
sudo modprobe g_serial
cat /sys/class/udc/20980000.usb/state  # Shows: configured
# Result: Working COM port in Windows

Expected vs Actual Behavior

Expected: g_webcam should enumerate successfully on Windows 11 like
other gadgets and previous Windows versions.

Actual: Windows 11 rejects the USB device descriptors with
DEVICE_DESCRIPTOR_FAILURE.

Analysis

The issue appears to be Windows 11's stricter USB descriptor
validation. The g_webcam UVC descriptors may not fully comply with:

USB Video Class specification requirements
Windows 11's enhanced USB security validation
Microsoft's USB descriptor formatting standards

Loaded Modules

g_webcam               16384  0
usb_f_uvc              77824  5
uvc                    12288  1 usb_f_uvc
libcomposite           69632  17 usb_f_acm,usb_f_uvc,g_webcam
dwc2                  176128  0

Kernel Messages

g_webcam gadget.0: uvc: uvc_function_bind()
g_webcam gadget.0: Webcam Video Gadget
g_webcam gadget.0: g_webcam ready
dwc2 20980000.usb: bound driver g_webcam

Impact

This affects numerous Raspberry Pi Zero W webcam projects and
tutorials that previously worked with Windows. Users report this issue
across multiple Pi Zero W webcam implementations.

Suggested Investigation Areas

USB Descriptor Compliance: Review g_webcam's USB descriptors against
latest USB Video Class specification
Windows 11 Requirements: Compare descriptor format with Windows 11's
validation requirements
VID/PID Issues: Verify Vendor/Product ID configuration doesn't trigger
Windows driver conflicts
UVC Version Compatibility: Check if UVC version advertised matches
capabilities provided

Request

Could the maintainers investigate updating g_webcam's USB descriptors
to meet Windows 11's stricter validation requirements? The fact that
g_serial works but g_webcam fails suggests this is a
descriptor-specific issue rather than hardware or driver framework
problem.

Additional Information Available

I can provide:

USB protocol analyzer captures
Testing with different Windows versions
Comparison with working UVC implementations
Further diagnostic information as needed

Thank you for maintaining the USB gadget subsystem.

Reporter: Josh Cabarrus joshcabarrus@gmail.com
Date: May 27, 2025

P.S.  I used anthropic's claude.ai running Claude Sonnet 4 to
troubleshoot this issue.  I can upload the full conversation with all
troubleshooting steps if needed.

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

end of thread, other threads:[~2025-05-28  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28  2:48 g_webcam UVC gadget causes USB\DEVICE_DESCRIPTOR_FAILURE on Windows 11 Josh Cabarrus
2025-05-28  4:34 ` Greg KH

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