5 Ways To Fix USB Ports Not Working On Linux
5 Ways To Fix USB Ports Not Working On Linux
If you have connected a USB flash drive, or keyboard or mouse to your Linux PC. But nothing happened. Maybe now you are confused what is going on? Why is your Linux computer not detecting the device? Is this a Linux problem, or has your USB device just stopped working? Here are the steps to fix USB port not working on Linux
USB Not Working On Linux?
Disk drives, card readers, phones, media players, and media peripherals. They're all useful, but if there's a problem with your USB port or system drivers, it won't work. This can be very frustrating for you if you are using a Bluetooth keyboard or mouse (with a USB dongle) because it means digging for wired USB alternatives.
However, it may not be the port that isn't working. Maybe the USB device you are using has developed an error and cannot be detected. Dealing with USB problems can be tricky, but it's not impossible to diagnose the fault and make the necessary repairs. There are five steps to follow to fix USB problems on Linux:
1. Confirm the USB port is detected
2. Make necessary repairs to the port
3. Repair or repair the USB device
4. Restart your Linux operating system
5. Confirm the presence of the device driver
Let's look at each of these in turn and learn how to handle dodgy USB devices on Linux.
1. Is Your Device Detected By Linux?
The first thing to check after inserting your USB device into your Linux computer is to check if it is detected. USB device detection is usually not as verbal or audible as it is in Windows or macOS, which means that you will have to check frequently that the device has been picked up by the operating system. Luckily, it's simple.
Check Devices On Linux
First, remove the USB device you asked about. Then, open a terminal window and enter the “list USB” command:
lsusb
Record the results, then connect the USB device, and run lsusb again. This time, you will see the additional device listed, with Bus ID, Device ID, USB ID, and description. If you can't figure out what the additional device is (you may have an internal USB device, maybe Ethernet), try a different command.
dmesg | grep -i USB
The dmesg command will list the connected USB devices on your system. It will also cover non-USB hardware, but unfortunately offers a lot of information. To solve this, you can try
dmesg | less
Finally, you can count on one that is more user-friendly
usb-devices
It's like a cross between the dmesg and lsusb commands, listing connected USB hardware devices with enough information to identify them. So, is the USB you connected listed here? If not, then maybe the port is damaged or there is a problem with the device. Likewise, the device may not be compatible with Linux.
2. How to Check the USB Port
If the USB device doesn't show up, it could be caused by a problem with the USB port. The best way to check this quickly is to 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 other USB ports are not available, you should try a USB device on another PC or laptop. However this may not be ideal, as you may only have a Windows or macOS computer as an alternative. Since some USB devices won't work on Linux, it can be hard to tell if it's the USB device, or the USB port, that's causing your problem. For best results, whenever possible stick to Linux-compatible hardware when troubleshooting USB devices.
3. Repair Damaged USB Hardware
If your USB device is damaged, you have two options: repair or restore. Repair usually involves checking the USB port, as well as any devices that aren't currently working. Repairs will almost always be centered around the USB cable, and ports on your computer. However, the USB cable can usually be replaced, while the port can be repaired. A physical check of the USB device is a good idea. The cable must be sturdy, without splits; the plug must be solid, with metal parts firmly attached.
The USB port, meanwhile, should be checked with your PC turned off, and disconnected from the main supply. Check if the port is installed properly; a wobbly USB port is an indication of shabby hardware.
If the USB port is loose, you may be able to solder it back into place. Of course, you should already know how to solder, never attempt a DIY job without prior experience. Also, check for dust and debris in your USB ports, especially those on the back of your PC where dust collects regularly. Dust is a PC's enemy, so it's a good idea to keep your system in a dust-free environment to boost performance. Since dust can enter your PC through the USB slot, take the time to keep this port clean. Use compressed air to clean dust and dirt.
Can you return your USB device? If the device is new, then maybe. The problem is, unless it's explicitly labeled as running on Linux, then, resellers are unlikely to accept returns. You may need to be a little selective with the facts you share with them.
4. Restart Linux To Fix USB Port
In some cases like if you are using a laptop the power issue might affect 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 if autosuspend is causing the problem. You can do this by rebooting your computer, if the USB device is working then the USB port is receiving power. The next step is to make sure this doesn't happen again. The following command line tricks are for both Ubuntu and Debian, so check the procedure for the correct one on your Linux distribution of choice. Open a terminal window and enter:
cat /sys/module/usbcore/parameters/autosuspend
It 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
Disable Autosuspend Linux Here, search
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's done, restart Ubuntu. After rebooting, log in to 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 shouldn't fail due to power issues.
5. Checking USB Device Drivers On Linux
Once upon a time, USB devices didn't work very often on Linux. Only devices manufactured by OEMs interested in Linux (maybe they use it for development) offer Linux drivers. Today, things are very different, with most manufacturers offering Linux drivers. In most cases, it is already available on your Linux operating system, via the kernel. You don't need to install any USB drivers. If drivers are not available, you may be able to find them by contacting the USB device manufacturer.
Conclusion
By following the steps above, it can actually solve the USB port not working problem on your Linux PC. But with built-in drivers and broad support for a wide variety of USB devices, it should be easy to diagnose problems with your computer's USB hardware. While faulty hardware may need to be repaired or exchanged, software repairs are also available.
Post a Comment