Modules "uas" or "usb_storage" still in use after USB drive has been unplugged
TLDR;
(see below, "The whole story", as for the reason this bothers me) After a fresh start, module uas is used by nothing (0) : Code:
$ lsmod | grep -e ^Module -e ^uas Code:
$ lsmod | grep -e ^Module -e ^uas Code:
$ lsmod | grep -e ^Module -e ^uas THE WHOLE STORY I have a Seagate USB drive. Those USB drives are known for not being able to retrieve SMART data on Linux, due to some compatibility problems with Linux's implementation of the UAS protocol (for more infos, see https://www.smartmontools.org/ticket/971). The drive works fine though with UAS, it's just the SMART infos that can not be retrieved. An easy workaround is to disable UAS for that specific drive, and so to fall back to the older USB mass storage protocol. Obviously I don't want to do that on a permanent basis, because UAS is much faster than the previous protocol (see https://en.wikipedia.org/wiki/USB_Attached_SCSI). Given that I only need to check my SMART data once in a while, the solution would be to disable UAS only when I need to retrieve SMART data, which is only once in a while, and to keep using UAS the rest of the time. Doing that should be straightforward :
Code:
$ grep CONFIG_MODULE_FORCE_UNLOAD /boot/config-`uname -r` Code:
$ sudo modprobe --remove uas
Code:
$ sudo modprobe --remove --force usb_storage Any idea why those modules (both uas and usb_storage) seem still in use after all USB drives have been unplugged ? [EDIT] I am using kernel 5.10, on Debian 11 : Code:
$ cat /etc/debian_version |
/boot/config- is a promise; /proc/config.gz is a report.
Does rmmod -f work? I've had similar problems that I get around by unloading all the modules that use USB. I wrote a script, usbunload, and another, usbload, to reload them. This can be a drag if the only keyboard is USB. I wrote a similar pair of scripts for all my audio modules. |
Quote:
Great, thanks. I forgot about rmmod ! Seems to be more powerfull than modprobe -r : Code:
$ lsmod | grep -e ^Module -e ^uas |
All times are GMT -5. The time now is 09:55 AM. |