USB thumb drives not recognized until reboot

I’ve noticed this before and thought it was just some weird intermittent thing, but thought I’d ask here since it happened again today. When plugging in a thumb drive into an USB-A port, it briefly lights up but it doesn’t show up in the OS. I tried using a different USB-A port, and unplugging/replugging the USB-A port, and I tried running this and don’t see it in the list:
sudo fdisk -l

I’m not sure if I have some weird power saving setting that is happening or what. Anyone have any suggestions?

OS info:
Pop!_OS 22.04 LTS jammy
Linux pop-os 6.0.6-76060006-generic #202210290932~1667401208~22.04~d2df702 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux

I had very similar issues several months ago on Fedora, but they eventually went away with some OS updates. Do you know which kernel you are using? If my memory serves correctly, the issues went away somewhere in the 5.17~5.19 time frame.

Hmm, I’m on this kernel:
Linux 6.0.6-76060006-generic x86_64

I don’t see any newer (stable) updates.

1 Like

Hey.
I’m having the same problem as you. Whenever I try to insert a USB 3.0 thumb stick, it isnt detected. However USB 2.0 devices work without any problem. I can force detection of USB 3.0 devices by plugging them in first and then plugging in a USB 2.0 device.

I have tried Ubuntu Server 22.04, which has no such issues.

You can check with “udevadm monitor”, which shows USB detection on a kernel level.

The command sudo kernelstub -a "usbcore.autosuspend=-1" disables usb power management, which could help.

EDIT: We have tried something completely different: Plugging in the USB device slowly. On USB 3.0 the first pins that will make a connection are the USB 2.0 pins. Apparently that was our solution.

George

1 Like

This is just a USB 2.0 drive. I don’t see any differences in the fdisk info when it’s plugged in, but the events do show up when I run: udevadm monitor

KERNEL[351124.174475] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
KERNEL[351124.176319] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
KERNEL[351124.176435] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
UDEV  [351124.755141] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
UDEV  [351124.880709] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
UDEV  [351124.886655] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)

When I unplug the drive I see this:

KERNEL[351349.092656] remove   /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
KERNEL[351349.093111] unbind   /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
KERNEL[351349.093181] remove   /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
UDEV  [351349.095492] remove   /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
UDEV  [351349.097400] unbind   /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
UDEV  [351349.098522] remove   /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)

The sudo kernelstub -a "usbcore.autosuspend=-1" didn’t seem to do anything for me.

After rebooting the output of udevadm monitor looks like this when I plug the drive in:

KERNEL[246.394771] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
KERNEL[246.397060] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
KERNEL[246.397361] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
UDEV  [246.968901] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
KERNEL[246.991350] add      /devices/virtual/workqueue/scsi_tmf_0 (workqueue)
KERNEL[246.991580] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0 (scsi)
KERNEL[246.991617] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/scsi_host/host0 (scsi_host)
KERNEL[246.991698] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
KERNEL[246.991717] add      /bus/usb/drivers/usb-storage (drivers)
KERNEL[246.991730] add      /module/usb_storage (module)
UDEV  [246.994140] add      /devices/virtual/workqueue/scsi_tmf_0 (workqueue)
KERNEL[246.994753] add      /bus/usb/drivers/uas (drivers)
KERNEL[246.994787] add      /module/uas (module)
UDEV  [246.995080] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
UDEV  [246.995317] add      /bus/usb/drivers/usb-storage (drivers)
UDEV  [246.996369] add      /module/usb_storage (module)
UDEV  [246.996752] add      /bus/usb/drivers/uas (drivers)
UDEV  [246.998180] add      /module/uas (module)
UDEV  [247.000930] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4 (usb)
UDEV  [247.003202] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0 (scsi)
UDEV  [247.005606] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/scsi_host/host0 (scsi_host)
UDEV  [247.007985] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 (usb)
KERNEL[248.010794] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0 (scsi)
KERNEL[248.010856] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[248.010886] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
KERNEL[248.011023] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
KERNEL[248.011071] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[248.011180] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
UDEV  [248.012803] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0 (scsi)
KERNEL[248.014209] add      /devices/virtual/bdi/8:0 (bdi)
UDEV  [248.015285] add      /devices/virtual/bdi/8:0 (bdi)
UDEV  [248.015320] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0 (scsi)
UDEV  [248.016890] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0 (bsg)
UDEV  [248.018233] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0 (scsi_device)
UDEV  [248.018378] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0 (scsi_disk)
UDEV  [248.018802] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg0 (scsi_generic)
KERNEL[248.019006] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[248.019069] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[248.019103] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
KERNEL[248.019188] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 (block)
KERNEL[248.019216] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[248.037798] add      /module/bfq (module)
UDEV  [248.039259] add      /module/bfq (module)
UDEV  [248.340774] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV  [248.573669] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
UDEV  [248.714732] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV  [248.735095] add      /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 (block)
UDEV  [248.736945] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0 (scsi)
KERNEL[248.859208] add      /module/isofs (module)
UDEV  [248.860145] add      /module/isofs (module)
KERNEL[248.959352] change   /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[249.957070] change   /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 (block)
UDEV  [250.060475] change   /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV  [250.150946] change   /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 (block)