Linux USB Not Detected or Not Working? 5 Common Issues and Fixes
You've hooked up a USB flash drive, or a keyboard or mouse to your Linux PC. But nothing is happening.
What's going on? Why won't your Linux computer detect the device? Is it a Linux thing, or has your USB device stopped working? Here's what to do on Linux if your USB drive is not detected or recognized.
USB Device Not Working in Ubuntu?
Disk drives, card readers, phones, media players, and media peripherals… they're all useful, but if there's a problem with your system's USB port or drivers, they're not going to work. This can be particularly frustrating if you use a Bluetooth keyboard or mouse (with a USB dongle) as it means digging out wired USB alternatives.
However, it might not be the port that doesn't work. Perhaps the USB device you're using has developed a fault and cannot be detected.
Dealing with USB issues can be tricky, but it's not impossible to diagnose a fault and make the necessary fixes.
There are five steps to follow to fix USB issues in Linux:
- Confirm the USB port is detected
- Make any necessary repairs to the port
- Fix or repair USB devices
- Reboot your Linux operating system
- Confirm the presence of device drivers
Let's look at each of these in turn and learn how to deal Linux not recognizing USB devices.
1. USB Device Not Detected by Linux
The first thing to check upon inserting your USB device in your Linux computer is whether it is being detected. USB device detection is usually not as verbal or audible as it is in Windows or macOS, which means that often you need to check that the device has been picked up by the operating system.
Fortunately, this is simple.
First, disconnect the USB device you're querying. Then, open a terminal window and input the "list USB" command:
lsusb
Make a note of the results, then connect the USB device, and run lsusb again.
This time, you should see an extra device listed, with a Bus ID, Device ID, USB ID, and a description. If you can't work out what the extra device is (you may have an internal USB device, perhaps Ethernet), try a different command.
dmesg | grep -i USB
The dmesg command will list the connected USB devices on your system. It will also include non-USB hardware, and unfortunately offers an overwhelming amount of information. To counter this, you can try
dmesg | less
Finally, you could just rely on the more user-friendly
usb-devices
This is like a cross between the dmesg and lsusb commands, listing connected USB hardware with enough information to identify them.
So, is the USB you've connected listed here? If not, then perhaps the port is damaged or there is a problem with the device. Equally, the device may not be compatible with Linux.
2. How to Check Your USB Port
If the USB device isn't showing, it could be due to an issue with the USB port.
The best way to check this quickly is to simply use a different USB port on the same computer. If the USB hardware is now detected, then you know you have a problem with the other USB port.
If another USB port is not available, you'll need to try the USB device on another PC or laptop. This may not be ideal, however, as you may only have a Windows or macOS computer as an alternative. As some USB devices cannot be used on Linux it will be difficult to ascertain whether it is the USB device, or the USB port that is causing you problems.
For the best results, where possible stick to Linux-compatible hardware when troubleshooting USB devices.
3. Fix Broken USB Hardware
If your USB hardware is not showing up in Linux and you suspect it is defective, you have two choices: fix or return.
A fix will typically involve checking the USB port, as well as the device that is currently not working. For peripherals devices, fixes will almost always center around the USB cable, and the port on your computer. USB cables can usually be replaced, however, while ports can be repaired.
A physical check of USB equipment is a good idea. Cables should be sturdy, without any splits; the plugs should be solid, with the metal section firmly attached.
USB ports, meanwhile, should be checked with your PC switched off, and disconnected from the mains supply. Check the ports are firmly seated; wobbly USB ports are an indication of hardware that is wearing out.
If the USB port is coming loose, you may be able to solder it back into place. Of course, you should already know how to solder; never attempt DIY jobs without prior experience.
Also, check for dust and dirt in your USB ports, especially those around the back of your PC where dust regularly collects. Dust is the enemy of PCs, so it is worth keeping your system in a dust free environment to encourage performance. As dust can work its way into your PC via USB slots, take the time to keep these ports clean. Use a can of compressed air to disperse dust and dirt.
Can you return your USB device? If it's new, then probably. The problem is, unless it is explicitly labeled as running under Linux, then, the retailer is unlikely to accept a return. You may need to be a little selective with the facts you share with them…
4. Restarting Linux to Fix a USB Port
In some cases---such as if you're using a laptop---power issues might be affecting its ability to detect USB devices. The autosuspend setting is designed to reduce power usage on Linux laptops, but it can prove counterproductive.
So, what can you do?
First, check whether autosuspend is causing the problem. You can do this by rebooting your computer; if the USB device works, then that USB port is receiving power. The problem occurs when the power management software decides to stop sending power to the USB port.
The next step is to ensure this doesn't happen again. On Ubuntu 20.04 you can open a terminal and enter:
udisksctl power-off -b /dev/sdX
If you're using an older version of Ubuntu, different commands are required. For example, the following command line tricks are for Ubuntu 18.10.
Open a terminal window and input:
cat /sys/module/usbcore/parameters/autosuspend
This should return a value of 2, which means autosuspend is enabled.
You can fix this by editing the grub file. Enter:
sudo nano /etc/default/grub
Here, look for
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Change this to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"
Press Ctrl + X to save the file, and exit. Next, update grub:
sudo update-grub
When that completes, restart Ubuntu.
After rebooting, log into your account and enter the cat command again:
cat /sys/module/usbcore/parameters/autosuspend
This time, the value returned should be -1. You've disabled autosuspend, so USB devices connected to your laptop should not fail due to power issues.
As you can see, this is a wildly different procedure. Check for the correct steps on your preferred Linux distribution.
5. Checking USB Device Drivers on Linux
Once upon a time, USB devices didn't often work in Linux. Only devices produced by OEMs with an interest in Linux (perhaps they used it for development) would offer a Linux driver.
These days, things are very different, with most manufacturers offering a Linux driver. In most cases, this will already be available in your Linux operating system, via the kernel. You shouldn't need to install any USB drivers.
If a driver is unavailable, you'll probably be able to find it by contacting the USB device manufacturer.
USB Drive Not Showing Up in Linux? Try This
For USB flash storage devices, troubleshooting is a different matter. Flash storage is prone to failure, especially if the device is dropped or used frequently. In this case, try using the storage on a different computer; if it won't work, try data recovery and reformatting.
A failed USB flash storage device may be a symptom of a damaged USB port on your computer, however. For example, a bad port could be overpowering your USB drives, with unsuitable power variations damaging data. A such, it is vital that you use the steps above to rule out an issue with your PC or laptop.
Most importantly, don't rely on flash storage for data backups. While slower, mechanical hard disk drives are more reliable.
Troubleshooting USB Issues on Linux: Fixed!
With built-in drivers and wide support for many types of USB device, it should be easy to diagnose issues with your computer's USB hardware.
While broken hardware may need repairing or swapping, software fixes are also available.
If you've recently swapped from Windows, running into USB issues on Linux can be a problem. Fortunately, these problems are usually easily solved.
source https://www.makeuseof.com/tag/fix-usb-device-port-linux/
Post a Comment for "Linux USB Not Detected or Not Working? 5 Common Issues and Fixes"
Comment when there are difficulties