Score:3

How do I disable a faulty usb port?

ph flag

I'm on Ubuntu 20.04, and my computer has a webcam that has been faulty for a while. On sleep/suspend, I've been seeing a lot of usb 1-8: device descriptor read/8, error -71 errors. I've looked into dmesg output, and it appears that the camera is constantly disconnecting/reconnecting. This is what the dmesg output looks like:

[  +4.783224] usb 1-8: device descriptor read/8, error -71
[  +0.125049] usb 1-8: device descriptor read/8, error -71
[  +0.107840] usb usb1-port8: unable to enumerate USB device
[  +0.275899] usb 1-8: new high-speed USB device number 54 using xhci_hcd
[  +5.264005] usb 1-8: device descriptor read/64, error -71
[  +5.131901] usb 1-8: device descriptor read/64, error -71
[  +0.232009] usb 1-8: new high-speed USB device number 55 using xhci_hcd
[  +8.888373] usb 1-8: device descriptor read/all, error -71
[  +0.000095] usb usb1-port8: attempt power cycle
[  +0.415538] usb 1-8: new high-speed USB device number 56 using xhci_hcd
[  +4.314715] usb 1-8: New USB device found, idVendor=174f, idProduct=2435, bcdDevice= 0.22
[  +0.000004] usb 1-8: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  +0.000001] usb 1-8: Product: Integrated Camera
[  +0.000001] usb 1-8: Manufacturer: Sonix Technology Co., Ltd.
[  +0.002496] uvcvideo: Found UVC 1.00 device Integrated Camera (174f:2435)
[  +0.006175] input: Integrated Camera: Integrated C as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/input/input51
[  +7.039354] usb 1-8: USB disconnect, device number 56
[  +0.313458] usb 1-8: new high-speed USB device number 57 using xhci_hcd

I think this is also having downstream effects: lsusb takes a good ten seconds to run, and usb devices that I plug in sometimes minutes to be recognized. I intend to send this in to get the port itself looked at, but in the meantime, how can I disable the port? I've tried the solutions outlined in this question, but one of the problems is that in /sys/bus/usb/devices/, the symlink and folder for the fault usb device sometimes is there, and sometimes isn't, so I can't use the tee-based solution, and the udev based solution did not work.

N0rbert avatar
zw flag
Does this answer your question? [Is it possible to disable USB port with known physical location?](https://askubuntu.com/questions/1338682/is-it-possible-to-disable-usb-port-with-known-physical-location) I have the same problem, but on 18.04 LTS :)
sm flag
@N0rbert Probably not? That is the answer he has linked in his question. FWIW, I have also this issue, and, at least today, I have not seen any references in lsusb or dmesg to the camera or uvcvideo. I have found that I have a usb1-usb12 (1-12 is the failing port on my machine, a Dell Precision 5530), that is hardwired to the camera. Presumably the camera is not answering at all, so it would be nice if the port doesn't check.
ph flag
@N0rbert, I did try the solutions outlined in that post - as @ larsivi points out, it's the one I linked. For a while, this problem didn't seem to be as much of an issue: I think the problematic USB port had become flakier, but all of a sudden, it's back, and those two solutions still don't work :/
ph flag
A further update here: it turns out my computer allows disabling USB ports from the BIOS. Disabling the webcam from the BIOS essentially solved all of the problems that I was having - sleep/wakeup is now instantaneous again, apps that depend on the webcam, like Zoom, no longer freeze, `lsusb` is now functional again, and I'm no longer filling up my disk with udev logs.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.