I am running Fedora 33 (fresh install) on Thinkpad x395 (AMD) and after some tim the system doesn’t detect anything I connect through USB. If I plug-in USB stick, not even Disk Utility program can see the USB disk. I tried with the webcam, my Android phone, still nothing. All of them work ok with my home computer Thinkpad E480 (Intel) with Fedora 33.
Did the system somehow change the permissions for USB for me? I am the only user on this computer.
Thanks
Attach the USB and check this:
dmesg; lsblk
You can also try another USB and/or another port.
I have tried with different USB sticks, webcam, Adroid phone. And the other USB port (this computer has only 2 USB ports). Adroid phone does charge while connected to USB port. While testing this, I had in USB stick with 4GB and Fedora 33 live on it.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
zram0 252:0 0 2,9G 0 disk [SWAP]
nvme0n1 259:0 0 238,5G 0 disk
├─nvme0n1p1 259:1 0 600M 0 part /boot/efi
├─nvme0n1p2 259:2 0 1G 0 part /boot
└─nvme0n1p3 259:3 0 236,9G 0 part /home
Edit: I cannot post dmesg, because it’s too long
Upgrade your BIOS/EFI firmware if possible.
I have the latest BIOS/UEFI: 1.22
Check the kernel version:
uname -a
You can paste it on http://paste.opensuse.org/ and then just post a link here
Start dmesg -w
in a terminal window before inserting USB, it will follow kernel messages live like tail -f
does. Then insert USB stick and share messages printed after that.
I managed to play a bit with computer and figured out that it actually works, when computer is on the electricity (charging). If I unplug the power supply, the USB ports stop working.
Linux thinkpad-pisarna 5.9.8-200.fc33.x86_64 #1 SMP Tue Nov 10 21:58:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Does the issue persist if you boot the 5.8 kernel?
Also check if there are any settings related to power-saving or USB in the BIOS.
It doesn’t work on the previous one. I’ll try the one before that. It worked before. I didn’t use USB(anything) for a while now…
This is the previous one:
Linux thinkpad-pisarna 5.8.18-300.fc33.x86_64 #1 SMP Mon Nov 2 19:09:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Nope, the same story with the one before (forgot to copy/paste uname -a), but it was: 5.8.17-300 - something like that.
You can install the earliest kernel from repos like this:
sudo dnf downgrade kernel
Or download manually from koji:
https://koji.fedoraproject.org/koji/packageinfo?packageID=8
Ok, but you think that this will help? Some regression in kernel?
Thanks
edit: Can I report bug on kernel about it somewhere?
You have a electrical problem in your system and not a kernel problem. You gave the answer for yourself: with the connected power-supply all is working. You should use whenever it’s possible an active USB-device (Hub etc.) for a quick solution and your system should get a professional check. If happens often on cheaper systems.
I’ve tried with live Fedora 33 from USB stick and it works normal
- I plug the computer into the electricity
- plug USB stick with Fedora 33
- boot from USB stick
- when in the system, I unplug the electricity cable from the computer
- I pklug some other USB stick and it works (it also worked with Adroid phone)
So I presume, that it is not electricity, as we have 8 identical computers in the office, but only I am using GNU/Linux and only I have problem with the current system. Live system works as expected.
If USB works in a live session, then most likely it fails due to a newer version of some package.
You can try to downgrade all installed packages to their release versions to localize the issue:
sudo dnf downgrade $(sudo dnf repoquery --qf %{NAME} --installed)
Thanks. I hope I’ll have some time during the weekend to investigate the issue.
Cheers
ArchLinux wiki to the rescue!
https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X395#Battery_and_power_management
Power management (partially disabled in live booted system) is currently too aggressive for your laptop -
install and use tlp
to disable it:
sudo dnf install tlp
echo 'RUNTIME_PM_BLACKLIST="05:00.3"' | sudo tee /etc/tlp.d/01-usb.conf
If it doesn’t work, you might need to use lspci
to confirm PCI address of your USB controller (e.g. 05:00.3
).
Kernel 5.10 and 5.11 are supposed to further improve power management of AMD powered laptops, after installing them, check whether you can disable that blacklist.
Thanks for the link and instructions. I have also added 05:00.4 because:
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
05:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
After logout/login it still doesn’t work. And how can I check if I can disable that blacklist? I presume that with the echo command I enabled it.