[Regression] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?

Bug #1856608 reported by dann frazier
70
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned

Bug Description

This appears to be a regression between 4.15.0-70.79 and 4.15.0-72.81.
This bug was fixed by simply reverting the offending change. Bug 1859873 tracks root causing the issue and reapplying the change w/ any necessary fixes.

[Impact]
USB port unusable and boot time takes ~5 minutes longer to complete.

Kernel emits messages like:
usb usb2-port2: Cannot enable. Maybe the USB cable is bad?

[Test Case]
dmesg | grep "Cannot enable"

[Fix]
[Regression Risk]

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1856608

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
dann frazier (dannf)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Triaged
assignee: nobody → dann frazier (dannf)
Changed in linux (Ubuntu Bionic):
status: New → Triaged
Changed in linux (Ubuntu Focal):
status: Triaged → New
Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Disco):
status: New → Incomplete
Changed in linux (Ubuntu Eoan):
status: New → Incomplete
Revision history for this message
dann frazier (dannf) wrote :

git bisect reports:

0b6a70743beacb15516ef9572b40c93b8b3892d3 is the first bad commit
commit 0b6a70743beacb15516ef9572b40c93b8b3892d3
Author: Jan-Marek Glogowski <email address hidden>
Date: Fri Feb 1 13:52:31 2019 +0100

usb: handle warm-reset port requests on hub resume

dann frazier (dannf)
description: updated
Revision history for this message
dann frazier (dannf) wrote :
Download full text (18.1 KiB)

Running upstream 5.5-rc2 mainline build:

$ dmesg | grep -e usb -e xhci -e hub
[ 13.482690] usbcore: registered new interface driver usbfs
[ 13.486685] usbcore: registered new interface driver hub
[ 13.490894] usbcore: registered new device driver usb
[ 20.767117] xhci_hcd 0000:00:14.0: xHCI Host Controller
[ 20.785496] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[ 20.798259] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000000009810
[ 20.811788] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[ 20.823094] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.05
[ 20.836334] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 20.848887] usb usb1: Product: xHCI Host Controller
[ 20.858017] usb usb1: Manufacturer: Linux 5.5.0-050500rc2-generic xhci-hcd
[ 20.869159] usb usb1: SerialNumber: 0000:00:14.0
[ 20.878106] hub 1-0:1.0: USB hub found
[ 20.886024] hub 1-0:1.0: 16 ports detected
[ 20.896244] xhci_hcd 0000:00:14.0: xHCI Host Controller
[ 20.905530] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[ 20.916945] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[ 20.927188] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.05
[ 20.939474] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 20.950664] usb usb2: Product: xHCI Host Controller
[ 20.959488] usb usb2: Manufacturer: Linux 5.5.0-050500rc2-generic xhci-hcd
[ 20.970333] usb usb2: SerialNumber: 0000:00:14.0
[ 20.979098] hub 2-0:1.0: USB hub found
[ 20.986792] hub 2-0:1.0: 10 ports detected
[ 20.995285] usb: port power management may be unreliable
[ 21.234739] usb 1-2: new high-speed USB device number 2 using xhci_hcd
[ 21.420393] usb 1-2: New USB device found, idVendor=0424, idProduct=2807, bcdDevice= 2.04
[ 21.438440] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 21.456273] usb 1-2: Product: USB2807 Hub
[ 21.475407] usb 1-2: Manufacturer: Microchip
[ 21.483366] hub 1-2:1.0: USB hub found
[ 21.497439] hub 1-2:1.0: 7 ports detected
[ 21.643079] usb 1-3: new high-speed USB device number 3 using xhci_hcd
[ 21.804368] usb 1-3: New USB device found, idVendor=04b4, idProduct=6570, bcdDevice=32.99
[ 21.818352] usb 1-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 21.828698] usb 1-3: Product: USB2.0 Hub
[ 21.845471] hub 1-3:1.0: USB hub found
[ 21.862212] hub 1-3:1.0: 4 ports detected
[ 21.882739] usb 1-2.1: new high-speed USB device number 4 using xhci_hcd
[ 21.991442] usb 1-2.1: New USB device found, idVendor=0403, idProduct=6011, bcdDevice= 8.00
[ 22.002897] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 22.013317] usb 1-2.1: Product: Quad RS232-HS
[ 22.020854] usb 1-2.1: Manufacturer: FTDI
[ 22.122687] usb 1-4: new high-speed USB device number 5 using xhci_hcd
[ 22.288257] usb 1-4: New USB device found, idVendor=04b4, idProduct=6570, bcdDevice=32.99
[ 22.302833] usb 1-4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 22.302835] usb 1-4: Product: USB2.0 Hub...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you please attach dmesg with kernel parameter `usbcore.dyndbg=+p`?

Revision history for this message
dann frazier (dannf) wrote :

@kaihengfeng - sorry for the delay over the US holidays. I don't have physical access to the system myself, but I've made the request to a user who does.

Revision history for this message
dann frazier (dannf) wrote :
Connor Kuehl (connork)
Changed in linux (Ubuntu Eoan):
status: Incomplete → Fix Committed
Changed in linux (Ubuntu Disco):
status: Incomplete → Fix Committed
Revision history for this message
dann frazier (dannf) wrote :

I happened to notice these same errors on an arm64 server in our lab, running the 4.15.0-73-generic kernel. (A Cavium crb2s system named 'recht'). While this could be unrelated - perhaps an actual bad USB cable - it isn't an error I'd noticed before on this system, and it happened to be running a kernel containing the offending commit. The system is currently in-use, but I can check to see how reproducible it is once it is freed up.

Changed in linux (Ubuntu Focal):
assignee: dann frazier (dannf) → nobody
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-eoan
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-disco' to 'verification-done-disco'. If the problem still exists, change the tag 'verification-needed-disco' to 'verification-failed-disco'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-disco
Marcelo Cerri (mhcerri)
Changed in linux (Ubuntu Bionic):
status: Triaged → Fix Committed
Revision history for this message
dann frazier (dannf) wrote :

We reverted the offending patch while we continue to work towards root causing the failure. The revert will cause this bug to be resolved, so I've opened bug 1859873 to track fixing and reapplying the patch (+ any fixes). I suggest we move further technical discussion there.

description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Verification for the revert:

lab@hostname:~$ uname -a
Linux hostname 4.15.0-75-generic #85-Ubuntu SMP Wed Jan 15 00:31:23 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
lab@hostname:~$ dmesg | grep "Cannot enable"
lab@hostname:~$ dmesg | grep "Maybe"
lab@hostname:~$

Booting the bionic kernel 4.15.0-75-generic on an affected system does not trigger the warning messages. There are no complaints about slowdowns or anything that are present when the offending commit is present.

Marking this bug as verified.

tags: added: verification-done-bionic verification-done-disco verification-done-eoan
removed: verification-needed-bionic verification-needed-disco verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (22.6 KiB)

This bug was fixed in the package linux - 5.0.0-40.44

---------------
linux (5.0.0-40.44) disco; urgency=medium

  * disco/linux: 5.0.0-40.44 -proposed tracker (LP: #1859724)

  * use-after-free in i915_ppgtt_close (LP: #1859522) // CVE-2020-7053
    - SAUCE: drm/i915: Fix use-after-free when destroying GEM context

  * CVE-2019-14615
    - drm/i915/gen9: Clear residual context state on context switch

  * System hang with kernel traces while entering reboot process on a Disco
    ARM64 moonshot node (LP: #1859582)
    - Revert "RDMA/cm: Fix memory leak in cm_add/remove_one"

linux (5.0.0-39.43) disco; urgency=medium

  * disco/linux: 5.0.0-39.43 -proposed tracker (LP: #1858547)

  * [Regression] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
    (LP: #1856608)
    - SAUCE: Revert "usb: handle warm-reset port requests on hub resume"

  * PAN is broken for execute-only user mappings on ARMv8 (LP: #1858815)
    - arm64: Revert support for execute-only user mappings

  * Fix unusable USB hub on Dell TB16 after S3 (LP: #1855312)
    - SAUCE: USB: core: Make port power cycle a seperate helper function
    - SAUCE: USB: core: Attempt power cycle port when it's in eSS.Disabled state

  * [sas-1126]scsi: hisi_sas: Fix out of bound at debug_I_T_nexus_reset()
    (LP: #1853992)
    - scsi: hisi_sas: Fix out of bound at debug_I_T_nexus_reset()

  * [sas-1126]scsi: hisi_sas: Assign NCQ tag for all NCQ commands (LP: #1853995)
    - scsi: hisi_sas: Assign NCQ tag for all NCQ commands

  * [sas-1126]scsi: hisi_sas: Fix the conflict between device gone and host
    reset (LP: #1853997)
    - scsi: hisi_sas: Fix the conflict between device gone and host reset

  * scsi: hisi_sas: Check sas_port before using it (LP: #1855952)
    - scsi: hisi_sas: Check sas_port before using it

  * CVE-2019-18885
    - btrfs: refactor btrfs_find_device() take fs_devices as argument
    - btrfs: merge btrfs_find_device and find_device

  * Integrate Intel SGX driver into linux-azure (LP: #1844245)
    - [Packaging] Add systemd service to load intel_sgx

  * [SRU][B/OEM-B/OEM-OSP1/D/E/F] Add LG I2C touchscreen multitouch support
    (LP: #1857541)
    - SAUCE: HID: multitouch: Add LG MELF0410 I2C touchscreen support

  * cifs: DFS Caching feature causing problems traversing multi-tier DFS setups
    (LP: #1854887)
    - cifs: Fix retrieval of DFS referrals in cifs_mount()

  * qede driver causes 100% CPU load (LP: #1855409)
    - qede: Handle infinite driver spinning for Tx timestamp.

  * [roce-1126]RDMA/hns: bugfix for slab-out-of-bounds when loading hip08 driver
    (LP: #1853989)
    - RDMA/hns: Bugfix for slab-out-of-bounds when unloading hip08 driver
    - RDMA/hns: bugfix for slab-out-of-bounds when loading hip08 driver

  * [roce-1126]RDMA/hns: Fixs hw access invalid dma memory error (LP: #1853990)
    - RDMA/hns: Fixs hw access invalid dma memory error

  * [hns-1126]net: hns3: revert to old channel when setting new channel num fail
    (LP: #1853983)
    - net: hns3: revert to old channel when setting new channel num fail

  * [hns-1126]net: hns3: fix port setting handle for fibre port
    (LP: #1853984)
    - net: hns3: fix port setting handle for fibre...

Changed in linux (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.3.0-29.31

---------------
linux (5.3.0-29.31) eoan; urgency=medium

  * eoan/linux: 5.3.0-29.31 -proposed tracker (LP: #1860119)

  * Integrate Intel SGX driver into linux-azure (LP: #1844245)
    - [Packaging] Add systemd service to load intel_sgx

linux (5.3.0-28.30) eoan; urgency=medium

  * eoan/linux: 5.3.0-28.30 -proposed tracker (LP: #1859694)

  * CVE-2019-14615
    - drm/i915/gen9: Clear residual context state on context switch

  * PAN is broken for execute-only user mappings on ARMv8 (LP: #1858815)
    - arm64: Revert support for execute-only user mappings

  * Miscellaneous Ubuntu changes
    - update dkms package versions

linux (5.3.0-27.29) eoan; urgency=medium

  * eoan/linux: 5.3.0-27.29 -proposed tracker (LP: #1858943)

  * [Regression] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
    (LP: #1856608)
    - SAUCE: Revert "usb: handle warm-reset port requests on hub resume"

 -- Marcelo Henrique Cerri <email address hidden> Fri, 17 Jan 2020 10:59:16 -0300

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 4.15.0-76.86

---------------
linux (4.15.0-76.86) bionic; urgency=medium

  * bionic/linux: 4.15.0-76.86 -proposed tracker (LP: #1860123)

  * Integrate Intel SGX driver into linux-azure (LP: #1844245)
    - [Packaging] Add systemd service to load intel_sgx

  * [Regression] Bionic kernel 4.15.0-71.80 can not boot on ThunderX
    (LP: #1853326) // Bionic kernel panic on Cavium ThunderX CN88XX
    (LP: #1853485) // Cavium ThunderX CN88XX crashes on boot (LP: #1857074)
    - arm64: Check for errata before evaluating cpu features
    - arm64: add sentinel to kpti_safe_list

linux (4.15.0-75.85) bionic; urgency=medium

  * bionic/linux: 4.15.0-75.85 -proposed tracker (LP: #1859705)

  * use-after-free in i915_ppgtt_close (LP: #1859522) // CVE-2020-7053
    - SAUCE: drm/i915: Fix use-after-free when destroying GEM context

  * CVE-2019-14615
    - drm/i915/gen9: Clear residual context state on context switch

  * PAN is broken for execute-only user mappings on ARMv8 (LP: #1858815)
    - arm64: Revert support for execute-only user mappings

  * [Regression] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
    (LP: #1856608)
    - SAUCE: Revert "usb: handle warm-reset port requests on hub resume"

  * Miscellaneous Ubuntu changes
    - update dkms package versions

 -- Marcelo Henrique Cerri <email address hidden> Fri, 17 Jan 2020 10:59:22 -0300

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
cruiseoveride (cruiseoveride) wrote :

I don't know if this is the right place but I don't think this is fixed in 20.04 (focal).

[517928.746183] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517929.718230] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517929.718327] usb usb3-port1: attempt power cycle
[517931.001933] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517931.945888] ucsi_acpi USBC000:00: PPM NOT RESPONDING
[517931.945894] ucsi_acpi USBC000:00: con2: failed to register partner alternate modes
[517931.969927] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517931.970038] usb usb3-port1: unable to enumerate USB device
[517934.170175] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517935.138142] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517935.138230] usb usb3-port1: attempt power cycle
[517936.425890] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517937.397879] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517937.397957] usb usb3-port1: unable to enumerate USB device
[517939.609851] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
[517940.581894] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?

Swapping ports and cables made no difference. Everything worked fine with 18.04

Revision history for this message
Anatolii Saienko (tsayen) wrote :

I can confirm this issue still being present in 20.04, kernel 5.4.0-31-generic

[ +4.459108] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.469264] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.421456] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.461852] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.416677] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.469571] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.420318] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.465287] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ +4.416749] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?

Revision history for this message
David Morgan (david-sinnott-morgan) wrote :

Also appears in focal, generating a syslog warning about every 5 seconds, which makes using a tty console quite difficult:

$ uname -r
5.4.0-33-generic

$ tail /var/log/syslog
Jun 4 21:48:16 alpe kernel: [ 1350.631168] usb usb4-port1: Cannot enable. Maybe the USB cable is bad?
Jun 4 21:48:20 alpe kernel: [ 1355.047109] usb usb4-port1: Cannot enable. Maybe the USB cable is bad?
Jun 4 21:48:25 alpe kernel: [ 1359.507044] usb usb4-port1: Cannot enable. Maybe the USB cable is bad?

Revision history for this message
Bamoqi (bamoqi) wrote :

I can confirm this issue in 20.04 linux-image-5.4.0-42. This message only appear for my usb3.1 gen1 type-c hub when it is connected on boot. If I re-plug the hub after boot, the message stops. It doesn't appear for another connected usb3 type-a hub.

In /var/log/syslog, it prints every 4 seconds:

Aug 3 01:57:37 fox kernel: [ 6020.600964] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
Aug 3 01:57:41 fox kernel: [ 6024.672925] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
Aug 3 01:57:45 fox kernel: [ 6028.744888] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
Aug 3 01:57:49 fox kernel: [ 6032.816854] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?

Revision history for this message
Bamoqi (bamoqi) wrote :

To add to above:

When the error is on, running `sudo lshw` causes the program to hang:

fox:~% sudo lshw
USB <-- program hang like this

Revision history for this message
Milan Bulat (speedym) wrote :

I can also confirm that the bug is not fixed, and I can also confirm two Bamoqi's posts - I'm testing it on various mobile phones and it's messing up my development workflow as phones sometimes do not connect when attached to USB cable.

I have tried three different USB-A -> USB-C cables from various manufacturers, and they are all reported as bad by the kernel.

Very annoying bug.

Revision history for this message
dann frazier (dannf) wrote :

fyi, the system for which I originally filed this bug was conclusively determined to have an out-of-spec USB cable, for which the manufacturer is providing replacements.

Revision history for this message
Milan Bulat (speedym) wrote :

I can also confirm that upgrading to kernel 5.8.0 didn't fix the problem.

@dannf: I have tried three different USB cables with exactly the same results. I'm pretty sure the problem is in the USB kernel drivers.

Revision history for this message
dann frazier (dannf) wrote :

@Milan: I don't doubt that there maybe also be a driver issue, but that wasn't the root cause of this issue.

@All: It might be helpful to know, for each of these cases, if what you are seeing is also correlated with the patch we reverted (and are planning to reintroduce) in older releases. To do so, you could try reverting:
commit 0b6a70743beacb ("usb: handle warm-reset port requests on hub resume").

Alternatively, if you're not comfortable w/ building your own kernel and the bionic kernel supports your hardware, you could try comparing the results of 4.15.0-70.79 and 4.15.0-72.81.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

@bamoqi, @speedym, @david-sinnott-morgan:

I have prepared a test kernel based on 5.4.0-42-generic, for Ubuntu 20.04 in the following ppa.
It hasn't finished building yet, Launchpad is taking a long time. Please make sure it has finished building before installing.

https://launchpad.net/~mruffell/+archive/ubuntu/lp1856608-test

The test kernel has this commit reverted:

commit: 4fdc1790e6a9ef22399c6bc6e63b80f4609f3b7e
Author: Jan-Marek Glogowski <email address hidden>
Date: Fri Feb 1 13:52:31 2019 +0100
Subject: usb: handle warm-reset port requests on hub resume
Link: https://github.com/torvalds/linux/commit/4fdc1790e6a9ef22399c6bc6e63b80f4609f3b7e

This is the commit which this Launchpad bug was originally made for. As @dannf mentioned before, when we looked into this, the systems that were affected had USB cables with mixed up Tx and Rx lines, and weren't USB spec complaint.

Anyway, the code is still present in 5.8, so if you could, please do some testing:

1) Install the official 5.4.0-42-generic kernel from the normal Ubuntu repos.
If you see "usb usb2-port2: Cannot enable. Maybe the USB cable is bad?" in dmesg, go to step 2.

2) Add the ppa with the test kernel. The kernel is the same as 5.4.0-42-generic, but with the above commit reverted.

$ sudo add-apt-repository ppa:mruffell/lp1856608-test
$ sudo apt-get update

Then install the kernel:

$ sudo apt install linux-image-unsigned-5.4.0-42-generic linux-modules-5.4.0-42-generic linux-modules-extra-5.4.0-42-generic linux-headers-5.4.0-42-generic linux-headers-5.4.0-42

If you get asked to abort the kernel install, say no.

$ sudo reboot
$ uname -rv

You should see a uname like "5.4.0-42.46+TEST1856608v20200805b1". Make sure it has the TEST1856608v20200805b1 part somewhere, or you are running the wrong kernel, and need to edit your grub settings to boot into the test kernel.

Reproduce the problem. Plug your USB devices in, and check dmesg. Do you still see "usb usb2-port2: Cannot enable. Maybe the USB cable is bad?"?

If you do, then this commit isn't the problem, and it is something else. Or, it could be non compliant hardware.

If it fixes the problem, well, we will have to go and talk to the USB maintainer again and get this fixed.

Revision history for this message
Jeremy Nixon (jeremyn54) wrote :

@mruffell

I had the aforementioned USB error almost constantly spamming my syslog. Since I have installed your kernel, it is gone completely. It was not affecting USB hub function in my case, however was quite annoying.

jeremy@730U3E:~$ uname -rv
5.4.0-42-generic #46+TEST1856608v20200805b1-Ubuntu SMP Tue Aug 4 21:56:57 UTC 202

Anyway I'm no-longer able to reproduce the problem so it seems you're onto something here. Have attached output of lshw for your reference.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

@jeremyn54

Thanks for testing the test kernel. I suppose this means that "usb: handle warm-reset port requests on hub resume" is still causing us trouble.

@everyone

Can you please unplug all USB devices from your computer, and connect them one by one until you find the device which causes the "usb usb2-port2: Cannot enable. Maybe the USB cable is bad?" in dmesg?

When you find the device which is causing problems, can you write back with
1) What it is: Manufacturer, Make, Model etc.
2) The output the kernel has for it in demsg when you plug it in.

E.g. The device which started this whole thing:
https://www.spinics.net/lists/linux-usb/msg175832.html

Sandisk Ultra T C.
[ 1.868336] usb 3-3: New USB device found, idVendor=0781, idProduct=5596, bcdDevice= 1.00
[ 1.868337] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.868338] usb 3-3: Product: Ultra T C
[ 1.868339] usb 3-3: Manufacturer: SanDisk
[ 1.868340] usb 3-3: SerialNumber: 4C530001090830111403

The above device is an example of a device that only works when "usb: handle warm-reset port requests on hub resume" is applied, and is the reason for the commit to exist in the first place.

We want to collect a list of devices that now fail to work when "usb: handle warm-reset port requests on hub resume" has been applied.

We will take the list of devices that fail, and write to the USB maintainer on linux-usb mailing list and see what we can do to fix things.

As a final note, if you can, please change out any USB cables for different ones, since they may be broken or not spec complaint, and testing with different cables can rule out hardware failures.

Thanks,
Matthew

Revision history for this message
Jeremy Nixon (jeremyn54) wrote :

Ok I have found the trigger for the usb error on my system. I did not have to insert/remove any device as such, but simply put the laptop into suspend mode. At the moment it resumes from suspend, the error can be consistently reproduced on both signed and testing kernels.

There are a number of other internal devices on the USB hub, such as WebCam SC-10HDP12631N, and ELAN Touchscreen. See my attached kern.log for full usb and suspend output.

Aug 14 18:05:57 730U3E kernel: [ 95.978282] usb 1-1.5: reset full-speed USB device number 4 using ehci-pci
Aug 14 18:05:57 730U3E kernel: [ 95.978287] usb 2-1.5: reset full-speed USB device number 3 using ehci-pci
Aug 14 18:05:57 730U3E kernel: [ 95.978520] usb 3-3: reset high-speed USB device number 2 using xhci_hcd
Aug 14 18:05:57 730U3E kernel: [ 96.166202] usb 1-1.4: reset high-speed USB device number 3 using ehci-pci
Aug 14 18:06:01 730U3E kernel: [ 100.429382] usb usb4-port2: Cannot enable. Maybe the USB cable is bad?
Aug 14 18:06:05 730U3E kernel: [ 104.520742] usb usb4-port2: Cannot enable. Maybe the USB cable is bad?
Aug 14 18:06:10 730U3E kernel: [ 108.592236] usb usb4-port2: Cannot enable. Maybe the USB cable is bad?

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Hi @jeremyn54

> the error can be consistently reproduced on both signed and testing kernels.

Reproduced on the test kernel? The one that I built in the ppa? If that's the case, then "usb: handle warm-reset port requests on hub resume" might not be to blame after all.

I had a look at your kernel log:

> usb usb4-port2: Cannot enable. Maybe the USB cable is bad?

The bad device is usb4-port2 in your system. The log's don't show what device this is. It only mentions the root hub, and not the device:

usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: xHCI Host Controller
usb usb4: Manufacturer: Linux 5.4.0-42-generic xhci-hcd
usb usb4: SerialNumber: 0000:00:14.0

We need to know what device is plugged into "port 2" of that hub, i.e. "usb 4-2". Can you try determine what the device is?

Revision history for this message
Pau Capdevila (pau-capdevila) wrote :

Facing the same on a recently upgraded 20.04. The device is an HP printer.

[ 1459.458363] usb 1-1.2.1: new full-speed USB device number 12 using ehci-pci
[ 1459.538367] usb 1-1.2.1: device descriptor read/64, error -32
[ 1459.726396] usb 1-1.2.1: device descriptor read/64, error -32
[ 1459.914372] usb 1-1.2.1: new full-speed USB device number 13 using ehci-pci
[ 1459.994367] usb 1-1.2.1: device descriptor read/64, error -32
[ 1460.182371] usb 1-1.2.1: device descriptor read/64, error -32
[ 1460.290662] usb 1-1.2-port1: attempt power cycle
[ 1460.894375] usb 1-1.2.1: new full-speed USB device number 14 using ehci-pci
[ 1461.310384] usb 1-1.2.1: device not accepting address 14, error -32
[ 1461.390385] usb 1-1.2.1: new full-speed USB device number 15 using ehci-pci
[ 1461.806383] usb 1-1.2.1: device not accepting address 15, error -32
[ 1461.806550] usb 1-1.2-port1: unable to enumerate USB device
[ 1462.254387] usb 1-1.2.1: new full-speed USB device number 16 using ehci-pci
[ 1462.334376] usb 1-1.2.1: device descriptor read/64, error -32
[ 1462.522384] usb 1-1.2.1: device descriptor read/64, error -32
[ 1462.710398] usb 1-1.2.1: new full-speed USB device number 17 using ehci-pci
[ 1462.790390] usb 1-1.2.1: device descriptor read/64, error -32
[ 1462.978385] usb 1-1.2.1: device descriptor read/64, error -32
[ 1463.086633] usb 1-1.2-port1: attempt power cycle
[ 1463.690390] usb 1-1.2.1: new full-speed USB device number 18 using ehci-pci
[ 1464.106375] usb 1-1.2.1: device not accepting address 18, error -32
[ 1464.186390] usb 1-1.2.1: new full-speed USB device number 19 using ehci-pci
[ 1464.602381] usb 1-1.2.1: device not accepting address 19, error -32
[ 1464.602611] usb 1-1.2-port1: unable to enumerate USB device

pau@DELL:~/Downloads$ uname -a
Linux DELL 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
pau@DELL:~/Downloads$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

Printing with my other laptop with Kubuntu 19.04 was plug and play. If I can provide some additional information, please tell me. But I feel I lost to many hours with this. Some things in Linux Desktop seem to never change

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Hi @pau-capdevila

Your USB problem is unrelated to the issue in this bug, since your USB device fails to do the initial handshake and enumeration.

> usb 1-1.2.1: device descriptor read/64, error -32

From /usr/include/asm-generic/errno-base.h, Error -32 is:
#define EPIPE 32 /* Broken pipe */

Try shutting your computer down, unplug the power supply, let it rest for 10 minutes and then try again. If you still have issues, try the USB device on another computer to see if it works, and if it does, then file a new bug report.

Some users have had success when they enabled IOMMU in the system BIOS / EFI shell.

Some links:
https://stackoverflow.com/questions/22340730/usb-device-enumeration-fails-device-descriptor-read-64-error-32/22342619
https://askubuntu.com/questions/1111732/how-can-i-restore-usb-2-0-functionality-after-an-upgrade-to-ubuntu-18-10
https://askubuntu.com/questions/1220635/how-fix-usb-device-descriptor-read-64-error

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Pau, please try "usbcore.quirks=" described here:
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Jeremy Nixon (jeremyn54) wrote :

@mruffell

> Reproduced on the test kernel? The one that I built in the ppa?

Yes 100% sure, took the laptop out of suspend on both kernels.

> We need to know what device is plugged into "port 2" of that hub, i.e. "usb 4-2". Can you try determine what the device is?

Believe me I've tried. Have identified the function of every other host controller on the system except for the one marked *-usbhost:1 in the attached lshw bus output, which is also the origin of the error. All my inserted devices (USB & Card Reader) appear on the *-usbhost:0 branch. The laptop has a single USB 3.0 port, but when a device is inserted it always appears on the USB 2.0 controller.

Even Windows 10 seems to have trouble loading drivers for this, so maybe some hardware wasn't made to spec. If there was something on the system that was actually malfunctioning then I might have more to go on.

Revision history for this message
Motiejus (motiejus) wrote :

I have an identical error message on Debian Bullseye after kernel upgrade:

- 5.8.0-3-amd64: works well "enough"
- 5.9.0-1-amd64: experiencing similar symptoms when Dell S2719DC monitor is connected.

By "similar symptoms", I mean:
- everything that is plugged to USB in the monitor works well.
- everything I've tried to plug into USB slot of the computer is sluggish to respond: looks like it's not receiving attention.
- the error message is the same: "usb usb2-port2: Cannot enable. Maybe the USB cable is bad?"

I will try to bisect the kernel at some point. However, the kernel versions seem to be quite different, so this seems like a similar, but different issue.

Revision history for this message
Motiejus (motiejus) wrote :

Sorry, that was not the kernel. It was (is?) a bad usb socket. I plugged the monitor to a different usb-c port and it works without complaints on all tried kernels (5.6, 5.8, 5.9).

Device: "20NYS8QG0B (LENOVO_MT_20NY_BU_Think_FM_ThinkPad T490s)"

Revision history for this message
Lars Marqvart (marqvart) wrote :

I'm also affected by this bug. I just did a fresh install of Xubuntu 20.04.1 and see the issue.

In my case it's "usb usb2-port1: Cannot enable. Maybe the USB cable is bad?".

There are no USB devices connected at all, so I get the bug with only the motherboard root hub present. I can make the log messages to syslog stop by inserting a USB3 device in one of the ports connected to usb2 (a USB2 device connected to the same physical port on the PC gets connected to a different bus so that will not make the log messages stop).

Booting Matthew's test kernel (5.4.0-42.46+TEST1856608v20200805b1) makes the bug go away. Booting the regular kernel (in this case 5.4.0-58-generic) and the bug is back.

So please revert the git commit on 20.04 (Focal) also until a fix is found.

I'll be happy to provide further info if needed.

Lars Marqvart (marqvart)
Changed in linux (Ubuntu Focal):
status: Incomplete → Confirmed
Revision history for this message
shruthi (iamshruthivhegde) wrote :

I'm also seeing this issue when connecting an android device via usb adb.

[ +0.996452] usb 2-2.4-port2: Cannot enable. Maybe the USB cable is bad?

I am unsure how to proceed, I tried changing cables and ports but this error message does not go away.

Revision history for this message
dann frazier (dannf) wrote :

@mruffell: Is there any specific info you'd like people to continue to capture if they see this symptom? If so, maybe we put those steps in the Description.

I also wonder if this bug has become too unwieldly due to the number of reports w/ likely different underlying causes, that we can never really call it "closed" - esp. since the original report was truly a hardware issue.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

@dannf: Yes, this bug sure is a tricky one.

Most of these reports will be due to failing / faulty / non-spec complaint USB devices or cables, like the original reason for this bug being opened. Although, there have been some reports where user's systems do go back to working when they install my test kernel which reverts "usb: handle warm-reset port requests on hub resume".

When we wrote to the USB subsystem maintainer last year about the commit, they were pretty sure the commit worked as intended and that the USB device itself was malfunctioning. The commit is also in all of the upstream -stable kernels, in mainline, with no changes since when it was introduced. Which means that it works for the vast majority of users, and only fails for a very small minority of users.

We don't want to deviate from mainline by reverting patches we don't need to.

I suppose we could ask affected users for a debug trace of the USB subsystem during a boot, or plugging in a device which causes these messages, and start building a case against "usb: handle warm-reset port requests on hub resume", but at the same time, these errors could be due to failing hardware, and we don't have too many ways of figuring that out, especially if it happens to be a root hub that breaks.

It's tricky. We might have to read the USB spec again to see if "usb: handle warm-reset port requests on hub resume" is complaint, but I think it would be since it lasted in mainline this long.

Revision history for this message
Antoine Glacet (tanukishouten) wrote :

Hello,
I am also affected by this bug.
no device plugged in but have the message flooding my log.

would be happy to provide further info if it helps

(ubuntu server 20.04LTS)

Changed in linux (Ubuntu Focal):
status: Confirmed → Fix Committed
dann frazier (dannf)
Changed in linux (Ubuntu Focal):
status: Fix Committed → Confirmed
Revision history for this message
Gregory Tursky (gildebrand) wrote (last edit ):

Hello.
I have this bug too:
[ 944.504716] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
When I had 5.4.0-74 core this bug was unconditional, i.e. it was when even no one usb devices was plugged.
Know I have 5.8.0-55 and this bug occurs only when second usb monitor is plugged (it used displaylink driver).
max@Latitude:~$ uname -a
Linux Latitude 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Tom (rellimmot) wrote :

I am getting the same bug. 21' System76 Gazelle (gaze16), Ubuntu 20.04LTS.
I am getting this bug with the new INC-004 Belkin CONNECT 11-in-1 USB-C Multiport Hub. Ethernet and HDMI display output are working but USB throws errors.

-----uname -a--------------------
5.11.0-7620-generic #21~1626191760~20.04~55de9c3~dev-Ubuntu SMP Tue Jul 20 18:02:09 x86_64 x86_64 x86_64 GNU/Linux

-----cat /var/log/syslog | grep kernel------------
Aug 18 13:48:25 exfil kernel: [ 5659.363129] usb 2-3: new SuperSpeed Gen 1 USB device number 9 using xhci_hcd
Aug 18 13:48:25 exfil kernel: [ 5659.385549] usb 2-3: New USB device found, idVendor=2109, idProduct=0817, bcdDevice= 3.b4
Aug 18 13:48:25 exfil kernel: [ 5659.385559] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 18 13:48:25 exfil kernel: [ 5659.385562] usb 2-3: Product: USB3.0 Hub
Aug 18 13:48:25 exfil kernel: [ 5659.385565] usb 2-3: Manufacturer: VIA Labs, Inc.
Aug 18 13:48:25 exfil kernel: [ 5659.387948] hub 2-3:1.0: USB hub found
Aug 18 13:48:25 exfil kernel: [ 5659.388502] hub 2-3:1.0: 4 ports detected
Aug 18 13:48:29 exfil kernel: [ 5663.471049] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:29 exfil kernel: [ 5663.471134] usb usb1-port3: attempt power cycle
Aug 18 13:48:33 exfil kernel: [ 5667.906931] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:37 exfil kernel: [ 5672.003075] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:37 exfil kernel: [ 5672.003155] usb usb1-port3: unable to enumerate USB device
Aug 18 13:48:41 exfil kernel: [ 5676.235101] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:46 exfil kernel: [ 5680.323145] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:46 exfil kernel: [ 5680.323227] usb usb1-port3: attempt power cycle
Aug 18 13:48:50 exfil kernel: [ 5684.731150] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:54 exfil kernel: [ 5688.819059] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:48:54 exfil kernel: [ 5688.819109] usb usb1-port3: unable to enumerate USB device
Aug 18 13:48:58 exfil kernel: [ 5693.051196] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:49:02 exfil kernel: [ 5697.139187] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:49:02 exfil kernel: [ 5697.139272] usb usb1-port3: attempt power cycle
Aug 18 13:49:07 exfil kernel: [ 5701.551207] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:49:11 exfil kernel: [ 5705.639242] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
Aug 18 13:49:11 exfil kernel: [ 5705.639326] usb usb1-port3: unable to enumerate USB device

Revision history for this message
Oliver Mattos (omattos) wrote :

The next step to resolve this issue is to capture a trace of the USB bus with a logic analyzer.

Does anyone affected by this problem happen to have access to a logic analyzer? If so, post a trace here and someone can see if it is the device, the cable, or the computer misbehaving.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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