This is a pretty short question.
My ethernet port works, but none of the usb ports seem to do anything when I plug anything in them. This is the case with a fresh raspi os image.
How can I debug this?
I would start by measuring the VBUS voltage on the affected USB ports under load. Perhaps the easiest test is to plug a device which has distinguishable powered state, such as a spinning HDD or a charging phone. If there is no power coming out of the USB port while the rest of the Pi is powered, then it's likely a failed protection issue such as a defective polyfuse or current limiting device somewhere. Note that measuring 5V on VBUS with a voltmeter is inconclusive, as the blown polyfuse can still provide enough current for the voltmeter to work.
Polyfuses or current limiting chips can be replaced with some soldering skills.
If the power is there but USB ports won't work, it would mean your USB hub is partially working (the Ethernet on Pi 3 is also connected to USB). Run sudo dmesg
after plugging in a standard USB device (like a mouse) and check the messages. In case of errors you will typically see one of the USB error codes. Error codes can be investigated using errno
(or just by googling, error codes are pretty stable across the Linux ecosystem):
$sudo apt install moreutils
$sudo dmesg | grep usb
...
[123.45] usbhid: probe failed with error -22
...
$errno 22
EINVAL 22 Invalid argument
Then you can look up EINVAL
in the kernel docs and find out what it means:
Invalid transfer type specified (or not supported)
Invalid or unsupported periodic transfer interval
ISO: attempted to change transfer interval
ISO: number_of_packets is < 0
various other cases
There is usually not much you can do with this information if standard devices like keyboards / mice don't work. It usually means a HW problem, perhaps damaged data pins on the USB hub chip. In this case it's easier just to buy a new Pi.
"You should not use rpi-update on any system unless recommended to do so by a Raspberry Pi engineer. It may leave your system unreliable or even completely broken. It should not be used as part of any regular update process."" https://www.raspberrypi.com/documentation/computers/os.html#rpi-update Even the rpi-update documentation now warns "Even on Raspbian/ you should only use this with a good reason. This gets you the latest bleeding edge kernel/firmware."
You may have a defective Pi. Try running
sudo su
rpi-update
reboot
If this doesn't work plug in any usb device and run the command
lsusb
If nothing comes up you could try installing a different image like Raspbian or ubuntu, if none of this works you most likely have a defective Pi and should just connect to it using ssh and vnc.
If something does come up when you run the command, you may need to install the drivers for your specific usb devices or install a different image.
I hope this helps!
sudo su
?? one or the other. Either sudo rpi-update
and sudo reboot
or su
and then rpi-update
and reboot
.
Commented
Sep 24, 2022 at 6:42
sudo su
is the equivalent of using sudo rpi-update
, except you don't have to use sudo. Once you run sudo su
you can omit any elevation commands (example: sudo apt update
to apt update
. It does not matter which command set you use. I was trying to be helpful by consolidating and expounding on previous information. This answer was meant to give a more step by step troubleshooting explanation. I simply said sudo su, out of habit and not necessarily out of necessity.
Commented
Sep 24, 2022 at 17:31
:)
Commented
Sep 25, 2022 at 2:11
"You should not use rpi-update on any system unless recommended to do so by a Raspberry Pi engineer. It may leave your system unreliable or even completely broken. It should not be used as part of any regular update process."" https://www.raspberrypi.com/documentation/computers/os.html#rpi-update Even the rpi-update documentation now warns "Even on Raspbian/ you should only use this with a good reason. This gets you the latest bleeding edge kernel/firmware."
Try running the following commands:
1. sudo rpi-update
2. sudo reboot
none of the usb ports seem to do anything when I plug anything in them
- what do you plug into them? what do you expect will happen when you plug in an undisclosed USV device into a USB port? -lsusb
may helpsudo dmesg -wT
and check the output carefully. You can edit your question to provide additional details. Also trylsusb
before and after plugging in the device and see if there is any difference in output.