Pi Zero 2 W: kernel Oops and unexpected reboots when exporting a DualSense controller over USB/IP

Đang mở
#7,818 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, linux

Hướng nghiên cứu

The report names drivers/usb/usbip/stub_rx.c and drivers/usb/usbip/stub_tx.c, and includes four experimental patches in the attachment. Start by reviewing those changes alongside the USB/IP logs and reproducing with the stock module on the Pi Zero 2 W. Done means identifying and validating a suitable fix for the failures without destabilizing the Pi; the report does not establish which workaround addresses the latest crash.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug

Exporting a Sony DualSense controller (054c:0ce6) over USB/IP from a Raspberry Pi Zero 2 W to Windows causes controller/audio failures, kernel instability, and unexpected reboots.

The latest reproduction used the stock usbip_host module from 6.18.65+rpt-rpi-v8, with the Pi's dwc_otg host driver. The controller initially attached, but subsequently disconnected or failed to reconnect. SSH became intermittently unresponsive, and the persistent journal recorded a kernel Oops followed by subsequent boots.

Related failures were previously reproduced on 6.18.60+rpt-rpi-v8. A Pi 5 using xHCI worked with its stock USB/IP module in earlier comparison testing.

Four experimental changes to usbip_host have allowed controller input, speaker playback, and microphone capture to work on the Zero. Rebuilding those changes for 6.18.65 restored operation in initial testing.

This is not established as a regression introduced by 6.18.65: I had been using an out-of-tree workaround on 6.18.60. A full upgrade installed 6.18.65, which loaded its stock module because the workaround had only been installed for the older kernel.

Steps to reproduce the behaviour
  1. Boot a Raspberry Pi Zero 2 W with the stock usbip_host module. The latest affected kernel tested was 6.18.65+rpt-rpi-v8.
  2. Use the default dwc_otg host controller and connect a DualSense controller (054c:0ce6) through a Waveshare PoE/Ethernet/USB hub HAT or a Micro to standard USB Adapter. Also confirmed the same issue exists on the dwc2 host controller.
  3. Run Linux usbipd and export the controller.
  4. Attach it from a Windows USB/IP client. My latest reproduction used a custom USBAnywhere client/server fork based on Windows client v3.6.2 and server v3.5.2. Earlier failures were also observed using released USBAnywhere builds.
  5. Test controller input in joy.cpl and allow Windows to enumerate the controller's speaker and microphone interfaces.
  6. Observe controller disconnects/reconnection failures and, in the captured failure, a kernel Oops and unexpected restarts.

Expected: the controller, speaker, and microphone work without destabilizing the Pi.

Actual: attachment may initially succeed, followed by USB transfer errors, stalled endpoints, loss of connectivity, and kernel instability.

The issue is intermittent; I do not yet have a minimal reproducer independent of the Windows USB/IP client.

The controller's interfaces on this device are:

  • Interfaces 0–2: USB Audio
  • Interface 3: HID

Earlier tests with the HAT removed, using a direct USB adapter and Wi-Fi, also encountered failures. Those were earlier tests, not a repeat of the latest 6.18.65 capture.

Device (s)

Raspberry Pi Zero 2 W

System

Board: Raspberry Pi Zero 2 W Rev 1.0

OS: Raspberry Pi OS image, Debian GNU/Linux 13 (trixie), ARM64.

cat /etc/rpi-issue:

Raspberry Pi reference 2026-06-18
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, ca8aeed0ae300c2a89f55ce9617d5f96a27e99e5, stage2

Affected kernel:

Linux pizero2w 6.18.65+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.18.65-1+rpt1 (2026-11-27) aarch64 GNU/Linux

The package changelog identifies Raspberry Pi Linux source commit:
5eafcb4f0fe5b158f2c91895d337cbe93bc55cdb.

Firmware (vcgencmd version):

Sep 14 2026 14:50:41
Copyright (c) 2012 Broadcom
version a86983925695a7e63166327d7c002d64040ed31d (clean) (release) (start)

USB topology: dwc_otg or dwc2 → USB 2.0 hub (1a40:0101) → DualSense and RTL8152 Ethernet (0bda:8152).

Controller: Sony DualSense 054c:0ce6, reported firmware 0x0110002a.

Windows client: Windows 11 Pro, build 26300.

Power status: vcgencmd get_throttled returned 0x0 after recovery. This does not rule out every possible transient power issue.

Module identification:

  • Stock module srcversion: 1597FC344CDBE32FB678F8F
  • Experimental patched module srcversion: 0355150BB6FC710A4967BDA

The captured crash occurred with the stock module. The Pi is currently running the experimental module rebuilt for 6.18.65.

Logs

The attached ZIP contains persistent-journal captures, the experimental source patches, and the matching patched-module build record.

Excerpt from the 6.18.65 stock-module failure:

usbip-host 1-1.2: usbip-host: register new device (bus 1 dev 4)
usbip-host 1-1.2: stub up
usbip-host 1-1.2: usb_set_interface done: inf 1 alt 0
usbip-host 1-1.2: usb_set_interface done: inf 2 alt 0
usbip-host 1-1.2: urb completion with non-zero status -71
usbip-host 1-1.2: usb_clear_halt done: devnum 4 endp 4
usbip-host 1-1.2: endpoint 0 is stalled
usbip-host 1-1.2: endpoint 0 is stalled
usbip-host 1-1.2: endpoint 0 is stalled
Unable to handle kernel paging request at virtual address 0000000200000007
Internal error: Oops: 0000000096000005 [#1] SMP
CPU: 2 UID: 0 PID: 687 Comm: sshd
Tainted: G         C          6.18.65+rpt-rpi-v8
pc : account_kernel_stack.isra.0+0x30/0x80
lr : copy_process+0x204/0x15f0
x0 : 00000001ffffffff
Call trace:
 account_kernel_stack.isra.0+0x30/0x80
 copy_process+0x204/0x15f0
 kernel_clone+0xa8/0x468
 __do_sys_clone+0x74/0xb0
 __arm64_sys_clone+0x28/0x40
 invoke_syscall+0x4c/0x100
 el0_svc_common.constprop.0+0x48/0xf0
 do_el0_svc+0x24/0x38
 el0_svc+0x38/0x120
 el0t_64_sync_handler+0xa0/0xe8
 el0t_64_sync+0x198/0x1a0

The journal shows subsequent boots that I did not initiate. A hardware watchdog was enabled, but I have not established what triggered each restart.

The latest Oops is in process creation while handling SSH, rather than directly in USB/IP. Its timing follows the USB/IP errors, but that alone does not prove the corruption originated there.

An earlier 6.18.60 reproduction faulted at:

stub_send_ret_submit+0xdc/0x618 [usbip_host]

pi-kernel-report-attachments.zip

Additional context

Earlier investigation and discussion:
https://github.com/oscarlosu-lab/USBAnywhere/issues/9

The attached patches modify only:

  • drivers/usb/usbip/stub_rx.c
  • drivers/usb/usbip/stub_tx.c

They implement four experimental workarounds:

  1. URB packet count: preserve the count used when allocating URBs after decoding incoming request fields. Incoming non-isochronous requests were observed with number_of_packets=-1.

  2. High-speed isochronous interval: derive the interval from the endpoint descriptor. Captures showed incoming interval 4 for an endpoint whose decoded interval is 8 microframes. This corrected accelerated playback in earlier testing. Whether the Windows client should supply a different value needs review.

  3. Isochronous IN aggregate length: validate packet lengths and sum them into urb->actual_length before serialization. Earlier dwc2 microphone testing produced nonzero packet lengths with an aggregate length of zero, causing USB/IP's consistency check to terminate the connection. The permanent fix may belong in the host-controller driver.

  4. Control-IN short transfers: adjust flag filtering so URB_SHORT_NOT_OK is not retained for control transfers. This is also experimental and requires independent review.

Earlier patched testing achieved working controller input, speaker playback, and microphone capture with both dwc_otg and dwc2. Initial testing after rebuilding all four patches for 6.18.65 restored operation again.

These results do not establish that all four patches are necessary for the latest crash, that they fix a single underlying defect, or that the workarounds are suitable for upstream inclusion unchanged.

Local audio-interface de-authorization through udev did not reliably prevent the earlier failures; it did not remove those interfaces from the USB configuration Windows enumerated.

I can provide earlier usbmon captures and perform targeted testing if helpful.

Ngôn ngữ chính
C
Star
13.4k
Fork
5.5k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của raspberrypi/linux

Tất cả issue của raspberrypi/linux

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.