raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

USB Touchscreen kills xHCI Controller

s-dinda opened this issue · comments

Describe the bug

On Pi5 Bookworm an external usb touchscreens seems to kill the xHCI controller. The same device worked fine with a previous Pi4B (Bullseye).

I am trying to connect a touchscreen via USB and HDMI, unfortunately connecting the USB device seems to kill some of the other connected USB devices - until a reboot.

Thanks in advance!

Steps to reproduce the behaviour

  1. Boot with all devices connected except the touchscreen.
  2. Connect the USB touchscreen (with or without an additional powered USB Hub)
  3. The touchscreen doesn't work at all. Instead the xHCI Controller died.

Device (s)

Raspberry Pi 5

System

$ cat /etc/rpi-issue
Raspberry Pi reference 2024-03-15
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, f19ee211ddafcae300827f953d143de92a5c6624, stage4
$ vcgencmd version
2024/02/16 15:28:41
Copyright (c) 2012 Broadcom
version 4c845bd3 (release) (embedded)
$ uname -a
Linux fotobox 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux

Logs

dmesg

...
[  855.080358] usb 1-2: new full-speed USB device number 3 using xhci-hcd
[  855.229606] usb 1-2: New USB device found, idVendor=0416, idProduct=c168, bcdDevice= 0.00
[  855.229611] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  855.229614] usb 1-2: Product: MTouch
[  855.229617] usb 1-2: Manufacturer: TSTP
[  855.229619] usb 1-2: SerialNumber: CMTP_1.0
[  865.656274] xhci-hcd xhci-hcd.0: xHCI host not responding to stop endpoint command
[  865.676453] xhci-hcd xhci-hcd.0: xHCI host controller not responding, assume dead
[  865.676464] xhci-hcd xhci-hcd.0: HC died; cleaning up
[  865.677182] usb 1-1: USB disconnect, device number 2
[  865.736634] usb 1-2: USB disconnect, device number 3

Additional context

No response

  1. Which power supply are you using on the Pi?
  2. What devices are attached to it?
  3. Are any of those devices independently powered?

I'm using the official 27W Power Supply

The other devices are a printer, a DSLR and a mouse:

$ lsusb -tv
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Printer, Driver=, 480M
        ID 06d3:3b36 Mitsubishi Electric Corp. CP-D80DW
    |__ Port 2: Dev 3, If 0, Class=Imaging, Driver=, 480M
        ID 04a9:32b4 Canon, Inc. EOS Rebel T6
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 046a:b091 CHERRY Mouse

The touchscreen and all of them (except the mouse) are independently powered.

Same problem here, with the Canakit 45W usb-c PD power supply.
the usb sees mtouch, then destroys the all USBs.
Another touch driver (I have a 2nd screen) using the elecrow. ads7846. has issues as well, it sees SOME touch inputs, once every 20 seconds or so.
If I set the exact same OS (raspbian) with same settings, same literal displays on the rpi4 everything works as expected.
I have no idea what's happening.

commented

ads7846 is totally unrelated as it is an I2C touchscreen. Should already be fixed via #6029.

ads7846 is totally unrelated as it is an I2C touchscreen. Should already be fixed via #6029.

I can confirm that the ads7846 display works now, thx!
Sadly the USB one still is not (mtouch one)

I'm having the same problem with Mtouch on bookworm and latest stable firmware on pi5, seems like there is no solution. I was using Ubuntu before on the same pi5 and the touchscreen was working

EDIT:
I reinstalled Ubuntu 24.04LTS server and it seems like I am now getting the same xHCI host controller not responding, assume dead error when connecteing the touch screen. I'm pretty sure I had Ubuntu 23.10 desktop installed on the Pi5 when it was working.

So I had (a lot) of free time to play with this issue and I think I just found something interesting!

What did I do?

When I first got this rpi few good months ago I definitely installed Ubuntu 23.10 (luckily Ubuntu is changing its default background every release making it easy to know what version was installed even after wiping the sd card) and the mtouch screen was working wonderfully, until...

  • I wiped the sd card and Installed latest bookworm
    I updated things and installed my software over ssh just to find out the touch screen was not working. and dmesg started showing the xHCI host controller not responding, assume dead when connecteing the mtouch screen USB cable to the Pi or during boot.
  • I wiped the sd card again and Installed Ubuntu 24.04LTS
    the touch screen was not working. with the same xHCI host controller not responding, assume dead mesage.
  • at this point I just wanted to go back, I found out I had Ubuntu 23.10 when things were working so I wiped my SD card again expecteing everything to work just as it did before I decided to mess with everything but magically the touch screen was still giving the same notorious dmesg error.

What else could have changed?

The eeprom!! I suspect that bookworm automatically updated my outdated 2023 bootloader to the 2024-XX-XX-XX version in which something has changed. so I went back to 2023-10-30-2712 and the touch screen was working again under Ubuntu 23.10! and I will soon test with newer OSs

Was it the EEPROM all along?

What could have changed on the EEPROM side that could effect this?

https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware-2712/release-notes.md

This is possibly a duplicate of this issue although the symptoms don't sound identical

2024-04-18: Update RP1 firmware to extend PCIe L1 entry timeout to 32 us (latest)

Extend PCIe L1 entry timeout to 32us Fix xhci soft reset on link-down Set useful xhci compatibility bits in GUCTL See raspberrypi/firmware#1877

If it is the RP1 firmware change then it should work in Ubuntu 24.04 LTS now since the rpi-eeprom-update service never automatically downgrades

It appears that you are correct, I tested and the latest working release from github releases is 2024-04-17-2712 and with the 2024-04-20 EEPROM release the touch screen no longer works. So I assume the RP1 firmware change is what broke my mtouch display. now the other folks on this thread reported this issue on March 27 so maybe it's a different issue for them?

For now I went back to 2024-04-17-2712, installed latest bookworm and disabled rpi-eeprom-update service with
sudo systemctl mask rpi-eeprom-update and my mtouch screen works perfectly !