You are not logged in.

#1 Yesterday 13:39:47

Enrico1989
Member
Registered: 2018-07-05
Posts: 293

How can I investigate USB not being detected?

Often it happens that I insert a USB storage device, and then expect it to find it in the output of

sudo fdisk -l

but I don't.

At that point I just reboot the machine, and the command above will show the device too. No need for me to even remove and re-plug the USB device.

So something must be happening while my system is up.

Is there something I can do now (I've just rebooted, so the USB has been detected) or next time the issue occurs to gather more info for you to help me?

At https://wiki.archlinux.org/title/USB_storage_devices, the https://wiki.archlinux.org/title/USB_st … e_detected section doesn't seem to apply to me, because in my case a reboot is enough to get the USBs detected.

Offline

#2 Yesterday 13:43:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,570

Re: How can I investigate USB not being detected?

Next time it happens, check uname -r and pacman -Q linux (substitute with your kernel package). This usually happens because you've updated the kernel and don't have the necessary modules loaded. Since the modules for the old kernel are no longer on disk, it can't load anything new.

Offline

#3 Yesterday 13:54:46

Enrico1989
Member
Registered: 2018-07-05
Posts: 293

Re: How can I investigate USB not being detected?

Well, I suppose given I often keep the system up for days and days, and that I'm running pacman -Syu everytime I see even a single update, I suppose it's most likely that's exactly what's happening.

Scimmia wrote:

(substitute with your kernel package)

pacman -Q linux tab-completes to just

linux                  linux-api-headers      linux-firmware-whence  linux-headers

according to that and to https://wiki.archlinux.org/title/Kernel, I assume I've got the "linux" kernel package, right?

Scimmia wrote:

Next time it happens, check uname -r and pacman -Q linux

I suppose the expectation is that the former would give me an older version than the latter?

So is there nothing I can check now to verify that between the last boot and the previous one there was indeed a kernel update?

Offline

#4 Yesterday 20:00:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,054

Re: How can I investigate USB not being detected?

Check the /var/log/pacman.log if the previous update included the linux package that will be the relevant difference.

Offline

#5 Yesterday 21:36:54

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 478

Re: How can I investigate USB not being detected?

Although it is recommended to boot new kernel as soon as it is updated, sometimes you can't reboot immediately. To avoid lack of modules in such situation you can force some modules to be always loaded after boot.
E.g. in /etc/modules-load.d/usb.conf:

usb_storage
uas

/etc/modules-load.d/filesystem.conf:

vfat
nls_utf8
nls_cp437
nls_iso8859-1

Drawback is some tiny extra RAM usage. There is also another option to load important modules in kernel hook before update, but it's more tricky.

Offline

#6 Yesterday 23:39:45

mmy8x
Member
Registered: 2025-03-02
Posts: 86

Re: How can I investigate USB not being detected?

If you can get kernel logs from the last few boots (journalctl or something) then the first few lines of each log should tell which kernel version was booted.

Next time you see something like that it would make sense to run dmesg and see the final lines - was the device detected, are any drivers loading, are there any errors.

Last edited by mmy8x (Yesterday 23:41:40)

Offline

Board footer

Powered by FluxBB