If ever have connected a USB drive or keyboard or mouse to your computer with any Linux distribution and nothing has happened, that is, the memory assembly does not appear or you cannot perform any action with your keyboard or mouse, this article may be of interest to you.
Although Here we intend to give some of the most common solutions to the errors that may be happening, it is clear that what is shown here does not repair any USB port in bad condition.
The first problem we may face is when connecting a USB storage drive and the mount point does not appear on our system.
There are five steps to follow to troubleshoot USB problems in Linux:
- Confirm that the USB port is detected
- Make the necessary repairs in the port.
- Fix or repair USB devices
- Restart the operating system
- Confirm the presence of device drivers.
Let's look at each of these and learn how to deal with these issues.
Confirm that the USB port is detected
The first thing to check when inserting your USB device into your computer is if it is being detected.
In the case of Windows, to be able to review this process, just go to the device manager, where you can graphically verify if your USB device is detected.
In the case of Linux, we can do something similar, but with the help of the terminal, for this we can use the lsusb command.
lsusb
Where it will give us a list of all the devices and USB ports that the system detects.
Here you can do the following, execute the command the first time without having the USB device connected and here you will see a list, now connect your device and run the command again, you will notice the change in the list.
With this you will confirm that your device is detected, in the case of storage devices here it may be a problem of:
- There is no partition on the device and / or it does not have a partition table on it.
- The partition format is not supported by the system.
If not, we must go to the next step.
Check your USB port
If the USB device is not displayed, it could be a problem with the USB port.
The best way to quickly verify this 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 will need to test the USB device on another PC or laptop.
If in this step the device is not detected, you can assume the idea of ​​two things.
The device drivers are not installed on your system and you have to search for them or your device has probably already passed away.
Usually a solution involves checking the USB port as well as the device that is currently not working.
Fixes almost always center around the USB cable and your computer port. However, USB cables can usually be replaced, while ports can be repaired.
Restarting Linux
Although this solution may seem absurd, it is functional. First of all, check if the automatic suspension is causing the problem. They can do this by restarting their computer.
If the USB device works, then that USB port is receiving power.
The next step is to make sure this doesn't happen again.
The following command line tricks are for Ubuntu 18.10, so check the correct procedure on your preferred Linux distribution.
Open a terminal window and enter:
cat /sys/module/usbcore/parameters/autosuspend
This should return a value of 2, which means that automatic sleep is enabled. You can fix this by editing the grub. Get in:
sudo nano /etc/default/grub
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, they update the grub:
sudo update-grub
When complete, reboot the system.