Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB Touchscreen kills xHCI Controller #6079

Open
s-dinda opened this issue Mar 27, 2024 · 13 comments
Open

USB Touchscreen kills xHCI Controller #6079

s-dinda opened this issue Mar 27, 2024 · 13 comments

Comments

@s-dinda
Copy link

s-dinda commented Mar 27, 2024

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

@pelwell
Copy link
Contributor

pelwell commented Mar 27, 2024

  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?

@s-dinda
Copy link
Author

s-dinda commented Mar 27, 2024

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.

@x130844
Copy link

x130844 commented Mar 28, 2024

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.

@6by9
Copy link
Contributor

6by9 commented Mar 28, 2024

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

@x130844
Copy link

x130844 commented Mar 29, 2024

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)

@Winor
Copy link

Winor commented Apr 29, 2024

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.

@Winor
Copy link

Winor commented May 1, 2024

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?

@timg236
Copy link
Contributor

timg236 commented May 1, 2024

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

@Winor
Copy link

Winor commented May 1, 2024

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?

@Winor
Copy link

Winor commented May 1, 2024

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 !

@Seattle-NK
Copy link

Jumping on this thread as I have the same issue, but the 2024-04-17-2712 EEPROM release did not fix the issue. I've only tried the latest Bookworm so far.

$ cat /etc/rpi-issue
Raspberry Pi reference 2024-10-22
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, ecda2579ebbc125b321984c571e3128f6fd959d4, stage4
$ vcgencmd version
2024/04/17 13:54:23
Copyright (c) 2012 Broadcom
version 0b7b6f28 (release) (embedded)
$ uname -a
Linux domepi2 6.6.51+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
$ 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 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 1a40:0101 Terminus Technology Inc. Hub
        |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 258a:6a88
        |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 258a:6a88
        |__ Port 3: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 04f2:0939 Chicony Electronics Co., Ltd Amazon Basics mouse
/:  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
[ 1947.751928] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
[ 1947.865414] usb 1-1.1: New USB device found, idVendor=0416, idProduct=c168, bcdDevice= 0.00
[ 1947.865420] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1947.865424] usb 1-1.1: Product: MTouch
[ 1947.865427] usb 1-1.1: Manufacturer: TSTP
[ 1947.865429] usb 1-1.1: SerialNumber: CMTP_1.0
[ 1958.183849] xhci-hcd xhci-hcd.0: xHCI host not responding to stop endpoint command
[ 1958.204029] xhci-hcd xhci-hcd.0: xHCI host controller not responding, assume dead
[ 1958.204046] xhci-hcd xhci-hcd.0: HC died; cleaning up
[ 1958.205040] usb 1-1: USB disconnect, device number 2
[ 1958.205052] usb 1-1.1: USB disconnect, device number 3
[ 1958.205451] usb 2-1: USB disconnect, device number 2

^ This last dmesg output was a test with an un-powered USB hub between the Pi and the touchscreen. I actually tried three different hubs (two unpowered and one powered) and got the same results as when I plugged it directly into the Pi.

The touchscreen is powered separately, and the Pi has been powered through both a POE+ HAT and the official Raspberry 5A power supply.

@janosch1337
Copy link

hi,

same issue here. rpi 4 with this mtouch usb c monitor is working fine without installing anything. just flash image and touch is working.

then rpi 5 booting up and is not recognizing the touch. mtouch with lsusb is also now showing up....

@Wgelyjr
Copy link

Wgelyjr commented Jan 14, 2025

TSTP touchscreen does not work with 4/17/24 EEPROM, nor latest as of writing. Identical XHCI prints as Seattle-NK, TSTP MTouch device. 5A PSU. Latest Bookworm, full Raspian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants