USB controllers disconnects after random time

Bug #1908894 reported by james byerley
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Since I installed Ubuntu on my new convertible laptop, I got issues with the USB. Just after boot my USB controller is working properly (I can connect usb sticks, mices, and my internal camera works) and at some point long after it suddenly stop working (mices suddenly stop moving even when used, webcam and sticks no more detected).
This can happend few minuts after boot, or several days after.
Yet I have not been able to find what triggers the failure. It happends at any time during normal usage of the computer, including during the usb usage.

more concrete infos:
after failure, I get
$ dmesg

[ 2671.894099] perf: interrupt took too long (2512 > 2500), lowering kernel.perf_event_max_sample_rate to 79500
[ 3262.197917] xhci_hcd 0000:03:00.3: Mismatch between completed Set TR Deq Ptr command & xHCI internal state.
[ 3262.197927] xhci_hcd 0000:03:00.3: ep deq seg = 000000008dafef36, deq ptr = 000000005f96ce32
[ 3262.198052] xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000a address=0x0 flags=0x0000]
[ 3267.250397] xhci_hcd 0000:03:00.3: xHCI host not responding to stop endpoint command.
[ 3267.250428] xhci_hcd 0000:03:00.3: xHCI host controller not responding, assume dead
[ 3267.250463] xhci_hcd 0000:03:00.3: HC died; cleaning up
[ 3267.250499] usb 1-3: USB disconnect, device number 2
[ 3267.311251] usb 1-4: USB disconnect, device number 3

and lsusb doesn't show my devices anymore, even the newly inserted ones

config: Asus Zenbook flip 14 UM462DA

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-58-generic 5.4.0-58.64
ProcVersionSignature: Ubuntu 5.4.0-58.64-generic 5.4.73
Uname: Linux 5.4.0-58-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: jimy 1523 F.... pulseaudio
 /dev/snd/controlC0: jimy 1523 F.... pulseaudio
 /dev/snd/pcmC1D0p: jimy 1523 F...m pulseaudio
 /dev/snd/timer: jimy 1523 f.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Mon Dec 21 11:51:08 2020
InstallationDate: Installed on 2020-07-28 (146 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Lsusb:
 Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 003 Device 002: ID 8087:0a2b Intel Corp.
 Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: ASUSTeK COMPUTER INC. ZenBook UX462DA
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-58-generic root=UUID=ba0f4ac4-b614-4882-83d6-485690f9a61a ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-58-generic N/A
 linux-backports-modules-5.4.0-58-generic N/A
 linux-firmware 1.187.6
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/28/2020
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX462DA.307
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: UX462DA
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 31
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrUX462DA.307:bd09/28/2020:svnASUSTeKCOMPUTERINC.:pnZenBookUX462DA:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnUX462DA:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct31:cvr1.0:
dmi.product.family: ZenBook Flip
dmi.product.name: ZenBook UX462DA
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
james byerley (byerley) wrote :
Revision history for this message
james byerley (byerley) wrote :

I had an initial talk on that question: https://answers.launchpad.net/ubuntu/+question/694351

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Marco (marco93) wrote :
Download full text (5.2 KiB)

I experienced a similar issue twice during the last week with Ubuntustudio running with kernel:

5.4.0-58-lowlatency #64-Ubuntu SMP PREEMPT Wed Dec 9 09:48:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

The system completely freezes and I have to press the reset button.

These are the journal entries:

Dez 29 15:05:55 marco-MS-7817 kernel: xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
Dez 29 15:05:55 marco-MS-7817 kernel: xhci_hcd 0000:00:14.0: HC died; cleaning up
Dez 29 15:05:55 marco-MS-7817 kernel: r8712u 3-1:1.0 wlx485b39ebba55: xmit_bh => driver_stopped or surprise_removed
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWENCODEEXT]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWENCODE]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWENCODEEXT]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWENCODE]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWENCODEEXT]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWENCODE]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCGIWMODE]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWAP]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: ioctl[SIOCSIWESSID]: No such device
Dez 29 15:05:57 marco-MS-7817 wpa_supplicant[789]: Could not read interface wlx485b39ebba55 flags: No such device
Dez 29 15:06:25 marco-MS-7817 kernel: xhci_hcd 0000:03:00.0: xHCI host controller not responding, assume dead
Dez 29 15:06:25 marco-MS-7817 kernel: xhci_hcd 0000:03:00.0: HC died; cleaning up
Dez 29 15:06:25 marco-MS-7817 kernel: blk_update_request: I/O error, dev sdb, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
Dez 29 15:06:28 marco-MS-7817 kernel: Buffer I/O error on dev sdb1, logical block 30441472, lost sync page write
Dez 29 15:06:28 marco-MS-7817 kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Dez 29 15:06:28 marco-MS-7817 kernel: Aborting journal on device sdb1-8.
Dez 29 15:06:28 marco-MS-7817 kernel: Buffer I/O error on dev sdb1, logical block 30441472, lost sync page write
Dez 29 15:06:28 marco-MS-7817 kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Dez 29 15:06:28 marco-MS-7817 kernel: Buffer I/O error on dev sdc1, logical block 7372800, lost sync page write
Dez 29 15:06:28 marco-MS-7817 kernel: JBD2: Error -5 detected when updating journal superblock for sdc1-8.
Dez 29 15:06:28 marco-MS-7817 kernel: Aborting journal on device sdc1-8.
Dez 29 15:06:28 marco-MS-7817 kernel: Buffer I/O error on dev sdc1, logical block 7372800, lost sync page write
Dez 29 15:06:28 marco-MS-7817 kernel: JBD2: Error -5 detected when updating journal superblock for sdc1-8.
Dez 29 15:06:28 marco-MS-7817 kernel: Buffer I/O error on dev sdc1, logical block 0, lost sync page write
Dez 29 15:06:28 marco-MS-7817 kernel: EXT4-fs (sdc1): I/O error while writing superblock

The problems started when I connected a ASUS WLAN stick. I unplugged it now and check if the problem persists.

My system:

System: ...

Read more...

Revision history for this message
Brad Woodward (mcclaren-f1) wrote :

I've been having the same issue since building a new system a couple months ago. The frequency is inconsistent, but rarely happens more than once per day. Sometimes I'll lose my keyboard mid-sentence, and other times I won't be able to unlock the system in the morning.

Oddly, my USB mouse (a Razer Naga) always still works, and the side buttons which act as a number pad also always work. However, by USB hub loses power, and neither it nor my keyboard ever regain power or functionality when re-plugging or switching ports. It's always fixed by a reboot.

I'm on a Threadripper 3990x with an ASUS ROG Zenith II Extreme motherboard.

Here's the snippet from /var/log/syslog:

Jan 14 19:37:19 amaranth systemd[1]: fprintd.service: Succeeded.
Jan 14 19:38:44 amaranth kernel: [37857.592954] xhci_hcd 0000:49:00.3: Mismatch between completed Set TR Deq Ptr command & xHCI internal state.
Jan 14 19:38:44 amaranth kernel: [37857.592957] xhci_hcd 0000:49:00.3: ep deq seg = 000000003ccd0405, deq ptr = 000000006daebfd1
Jan 14 19:38:45 amaranth kernel: [37858.593779] xhci_hcd 0000:49:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x0 flags=0x0000]
Jan 14 19:38:50 amaranth kernel: [37863.667171] xhci_hcd 0000:49:00.3: xHCI host not responding to stop endpoint command.
Jan 14 19:38:50 amaranth kernel: [37863.667178] xhci_hcd 0000:49:00.3: xHCI host controller not responding, assume dead
Jan 14 19:38:50 amaranth kernel: [37863.667220] xhci_hcd 0000:49:00.3: HC died; cleaning up
Jan 14 19:38:50 amaranth kernel: [37863.667255] usb 9-3: USB disconnect, device number 2
Jan 14 19:38:50 amaranth kernel: [37863.667258] usb 9-3.1: USB disconnect, device number 4
Jan 14 19:38:50 amaranth kernel: [37863.667447] usb 10-3: USB disconnect, device number 2
Jan 14 19:38:50 amaranth kernel: [37863.667449] usb 10-3.2: USB disconnect, device number 4
Jan 14 19:38:50 amaranth kernel: [37863.667451] usb 10-3.2.4: USB disconnect, device number 5
Jan 14 19:38:50 amaranth kernel: [37863.668402] usb 10-4: USB disconnect, device number 3
Jan 14 19:38:50 amaranth kernel: [37863.735579] usb 9-3.2: USB disconnect, device number 6
Jan 14 19:38:50 amaranth kernel: [37863.735581] usb 9-3.2.3: USB disconnect, device number 7
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 17
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 8
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 9
Jan 14 19:38:50 amaranth kernel: [37863.979627] usb 9-3.2.4: USB disconnect, device number 9
Jan 14 19:38:50 amaranth kernel: [37863.979630] usb 9-3.2.4.4: USB disconnect, device number 10
Jan 14 19:38:50 amaranth kernel: [37864.076604] usb 9-4: USB disconnect, device number 3
Jan 14 19:38:50 amaranth kernel: [37864.076833] usb 9-5: USB disconnect, device number 5
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 7
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 10
Jan 14 19:38:50 amaranth kernel: [37864.231560] usb 9-6: USB disconnect, device number 8
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 11
Jan 14 19:38:50 amaranth acpid: input device has been disconnected, fd 12

Revision history for this message
Simon Douglas (sidouglas) wrote :

Can report today the same issue - this happened on my Asrock x300 running popos 20.04 LTS

Revision history for this message
Piotr Henryk Dabrowski (phd) wrote :

This issue persists in Ubuntu 21.10.
My external USB drives get disconnected randomly.

Setting "XHCI Hand-off" in BIOS to Disabled *SOLVED* this problem for me.
It seems kernel/Ubuntu fails to handle USB properly when given control over it by BIOS.

My kernel log:

Apr 22 23:57:43 phd kernel: usb 2-4: USB disconnect, device number 4
Apr 22 23:57:43 phd kernel: sd 7:0:0:0: [sde] Synchronizing SCSI cache
Apr 22 23:57:43 phd kernel: sd 7:0:0:0: [sde] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Apr 22 23:57:44 phd kernel: usb 2-4: new SuperSpeed USB device number 5 using xhci_hcd
Apr 22 23:57:44 phd kernel: usb 2-4: New USB device found, idVendor=0000, idProduct=0000, bcdDevice= 1.44
Apr 22 23:57:44 phd kernel: usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 22 23:57:44 phd kernel: usb 2-4: Product: USB 3.0
Apr 22 23:57:44 phd kernel: usb 2-4: Manufacturer: KESU
Apr 22 23:57:44 phd kernel: usb 2-4: SerialNumber: 000000128453
Apr 22 23:57:44 phd kernel: usb-storage 2-4:1.0: USB Mass Storage device detected
Apr 22 23:57:44 phd kernel: scsi host8: usb-storage 2-4:1.0
Apr 22 23:57:45 phd kernel: scsi 8:0:0:0: Direct-Access KESU USB 3.0 2210 PQ: 0 ANSI: 6
Apr 22 23:57:45 phd kernel: sd 8:0:0:0: Attached scsi generic sg5 type 0
Apr 22 23:57:45 phd kernel: sd 8:0:0:0: [sdf] 976773164 512-byte logical blocks: (500 GB/466 GiB)
Apr 22 23:57:45 phd kernel: sd 8:0:0:0: [sdf] Write Protect is off
Apr 22 23:57:45 phd kernel: sd 8:0:0:0: [sdf] Mode Sense: 2f 00 00 00
Apr 22 23:57:45 phd kernel: sd 8:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Apr 22 23:57:45 phd kernel: sdf: sdf1
Apr 22 23:57:45 phd kernel: sd 8:0:0:0: [sdf] Attached SCSI disk

Revision history for this message
Piotr Henryk Dabrowski (phd) wrote :

I had problems with my USB 3.5" hard disk case disconnecting randomly.

I found recommendation to turn off USB xHCI Handoff option in BIOS.

I also disabled USB autosuspend with `usbcore.autosuspend=-1` kernel parameter (`GRUB_CMDLINE_LINUX_DEFAULT="..."` in /etc/default/grub, then `sudo update-grub`)

Neither of the above helped.

Then I added `no-usb-handoff` kernel parameter,
and also `usbcore.quirks=1234:5678:en` quirk [1],
where 1234:5678 is the idVendor:idProduct identifier of your device, obtainable with `lsusb`:

e = USB_QUIRK_RESET (device can't be reset (e.g morph devices), don't use reset);
n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a pause after every control message);

And that seems to have finally done the trick. No more disconnects.

[1] https://www.kernel.org/doc/html/v5.0/admin-guide/kernel-parameters.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.