External USB hard drives no longer auto mounting since kernel 5.4.0-77

Forum rules
Before you post please read this
Post Reply
Chiizujin
Level 1
Level 1
Posts: 4
Joined: Wed Jul 21, 2021 6:58 am

External USB hard drives no longer auto mounting since kernel 5.4.0-77

Post by Chiizujin »

I have only just noticed this today as I use external drives infrequently, but since kernel 5.4.0-77 my external USB drives do not auto-mount. 5.4.0-58 is the latest kernel version that works OK.

When a drive is plugged in it is not listed in any of the following:

blkid
lsblk
lsusb
sudo parted --list
fdisk -l

Nothing appears in "dmesg" when plugging in the drive. The drive will be mounted if plugged in at boot time.

(Edit 3: "lspci -s 38:00.0" (the USB controller) will trigger the drive to mount - see my post below.)

When preparing to post this I found that "inxi -F" actually causes the drive to be seen and mounted ("inxi -D" does not). The drive then works as normal until it is unplugged again. (Edit: it seems it can sometimes be unplugged and reconnected a few times before stopping auto-mounting again.) (Edit 2: The -G and -N options of inxi will trigger the mount.)

Another issue that I have discovered while troubleshooting this is that, even with kernel 5.4.0-58, if the drive is connected at boot time it will mount but will then subsequently stop auto-mounting after being unplugged. It will work as normal again after "inxi -F". I'm not too bothered about this behaviour but thought I would mention it.

I'm not sure if this is significant, but I am connecting the drives via a USB-A to USB-C hub. I don't currently have a USB-C cable so can't test this plugging in directly. Everything else (USB sticks, mouse) still works fine.

Any help with the first problem would be appreciated. Here's the "inxi -Fxxxrz" output, which includes the drive (ID-2) as mentioned above:

Code: Select all

System:    Kernel: 5.4.0-80-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.5 wm: muffin 5.0.1
           dm: LightDM 1.30.0 Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal
Machine:   Type: Laptop System: Dell product: XPS 15 9500 v: N/A serial: <filter> Chassis: type: 10 serial: <filter>
           Mobo: Dell model: 0RHXRG v: A03 serial: <filter> UEFI: Dell v: 1.6.1 date: 12/24/2020
Battery:   ID-1: BAT0 charge: 84.3 Wh condition: 84.3/84.3 Wh (100%) volts: 13.1/11.4 model: SMP DELL 70N2F95
           type: Li-poly serial: <filter> status: Full
CPU:       Topology: 6-Core model: Intel Core i7-10750H bits: 64 type: MT MCP arch: N/A L2 cache: 12.0 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62399
           Speed: 800 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
           8: 801 9: 800 10: 800 11: 800 12: 802
Graphics:  Device-1: Intel UHD Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:9bc4
           Device-2: NVIDIA vendor: Dell driver: nvidia v: 470.57.02 bus ID: 01:00.0 chip ID: 10de:1f95
           Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa
           resolution: 1920x1200~60Hz
           OpenGL: renderer: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 470.57.02 direct render: Yes
Audio:     Device-1: Intel Comet Lake PCH cAVS vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3
           chip ID: 8086:06c8
           Sound Server: ALSA v: k5.4.0-80-generic
Network:   Device-1: Intel Wi-Fi 6 AX201 vendor: Bigfoot Networks driver: iwlwifi v: kernel port: 4000
           bus ID: 00:14.3 chip ID: 8086:06f0
           IF: wlp0s20f3 state: up mac: <filter>
Drives:    Local Storage: total: 3.66 TiB used: 1.88 TiB (51.4%)
           ID-1: /dev/nvme0n1 vendor: Micron model: 2300 NVMe 1024GB size: 953.87 GiB speed: 31.6 Gb/s lanes: 4
           serial: <filter> rev: 23000020 scheme: GPT
           ID-2: /dev/sda type: USB model: IT-CEO Storage size: 2.73 TiB serial: <filter> rev: 0117 scheme: GPT
Partition: ID-1: / size: 937.40 GiB used: 183.20 GiB (19.5%) fs: ext4 dev: /dev/nvme0n1p2
Sensors:   System Temperatures: cpu: 50.0 C mobo: N/A gpu: nvidia temp: 47 C
           Fan Speeds (RPM): cpu: 0 fan-2: 0
Repos:     No active apt repos in: /etc/apt/sources.list
           Active apt repos in: /etc/apt/sources.list.d/enpass.list
           1: deb https://apt.enpass.io/ stable main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
           1: deb http://mirror.internode.on.net/pub/linuxmint-packages uma main upstream import backport
           2: deb http://mirror.internode.on.net/pub/ubuntu/ubuntu focal main restricted universe multiverse
           3: deb http://mirror.internode.on.net/pub/ubuntu/ubuntu focal-updates main restricted universe multiverse
           4: deb http://mirror.internode.on.net/pub/ubuntu/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
           1: deb [arch=amd64] https://repo.skype.com/deb stable main
           Active apt repos in: /etc/apt/sources.list.d/steam.list
           1: deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam
           2: deb-src [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam
Info:      Processes: 310 Uptime: 1h 26m Memory: 15.39 GiB used: 2.54 GiB (16.5%) Init: systemd v: 245 runlevel: 5
           Compilers: gcc: 9.3.0 alt: 9 Shell: bash v: 5.0.17 running in: gnome-terminal inxi: 3.0.38
Last edited by Chiizujin on Wed Jul 21, 2021 11:01 pm, edited 2 times in total.
User avatar
AZgl1500
Level 16
Level 16
Posts: 6429
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: External USB hard drives no longer auto mounting since kernel 5.4.0.77

Post by AZgl1500 »

Quick and Dirty way.

startup Disks and then highlight the offending drive

then click on the Gear Wheel and then Edit Mount Options

Disks Edit Mount Options.png
Linux Mint 19.3 Cinnamon / ASUS FX705GM
Chiizujin
Level 1
Level 1
Posts: 4
Joined: Wed Jul 21, 2021 6:58 am

Re: External USB hard drives no longer auto mounting since kernel 5.4.0.77

Post by Chiizujin »

AZgl1500 wrote:
Wed Jul 21, 2021 8:27 pm
startup Disks and then highlight the offending drive
then click on the Gear Wheel and then Edit Mount Options
I tried that but the problem still persists.


However, I have narrowed down the problem to the USB controller:

Code: Select all

38:00.0 USB controller: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] (rev 06)
Doing "lspci -s 38:00.0" causes the drive to mount when plugged in. This needs to be done each time.
User avatar
Kadaitcha Man
Level 15
Level 15
Posts: 5679
Joined: Mon Aug 27, 2012 10:17 pm

Re: External USB hard drives no longer auto mounting since kernel 5.4.0.77

Post by Kadaitcha Man »

Chiizujin wrote:
Wed Jul 21, 2021 10:49 pm
However, I have narrowed down the problem to the ...
... wrong place.

Code: Select all

System:    Kernel: 5.4.0-80-generic
CPU:       Topology: 6-Core model: Intel Core i7-10750H
That is likely to be the cause. Start update manager and on the View menu, select Linux Kernels. Install the latest 5.8 first then reboot. If that doesn't fix it, install the latest 5.11 and try again.
[*] All kadaitcha men are liars
Chiizujin
Level 1
Level 1
Posts: 4
Joined: Wed Jul 21, 2021 6:58 am

Re: External USB hard drives no longer auto mounting since kernel 5.4.0.77

Post by Chiizujin »

Kadaitcha Man wrote:
Wed Jul 21, 2021 11:15 pm
Install the latest 5.8 first then reboot. If that doesn't fix it, install the latest 5.11 and try again.
Neither of those resolved the problem. Still nothing in dmesg when plugging in the drive and "lspci -s 38:00.0" still triggers the mount.

Edit: I noticed that there are several releases in the 4.8 series between my last working version (5.4.0-58) and first non-working version (5.4.0-77) that I have not installed, so I can't be certain that 5.4.0-77 is the first non-working version. Let me know if you want me to try any of those.
User avatar
Kadaitcha Man
Level 15
Level 15
Posts: 5679
Joined: Mon Aug 27, 2012 10:17 pm

Re: External USB hard drives no longer auto mounting since kernel 5.4.0.77

Post by Kadaitcha Man »

Chiizujin wrote:
Wed Jul 21, 2021 11:43 pm
Let me know if you want me to try any of those.
No, 5.8 or 5.11 are the optimum for your CPU. If 5.11 is working, apart from this drive issue, I recommend staying with it. A few other things you could try:

1) Try the device directly connected to a SATA port on a desktop if you have access to one.
2) Try different USB ports.
3) Try a different USB cable.
4) Try a different drive caddy.
5) Boot into a live media on the laptop and see if the drive behaves the same.
6) Do this then reboot:

Code: Select all

sudo tee /etc/modprobe.d/usb-fix.conf <<< 'options usbcore autosuspend=-1'
[*] All kadaitcha men are liars
Chiizujin
Level 1
Level 1
Posts: 4
Joined: Wed Jul 21, 2021 6:58 am

Re: External USB hard drives no longer auto mounting since kernel 5.4.0.77

Post by Chiizujin »

Kadaitcha Man wrote:
Thu Jul 22, 2021 12:20 am
2) Try different USB ports.
I'm starting with this one because I've had some success there. As mentioned before, I'm currently using a small USB-A to C hub (a small dongle-like thing that came with the laptop) as I don't have a USB-C cable, so I can't remove the hub from the tests at the moment. The laptop has 3 ports:

- 2x Thunderbolt 3 with power delivery & DisplayPort
- 1x USB-C 3.1 with power delivery & DisplayPort

The drive behaves correctly in the USB-C 3.1 port but does not in either of the Thunderbolt ports.


For the sake of completeness:
1) Try the device directly connected to a SATA port on a desktop if you have access to one.
No access to one.
3) Try a different USB cable.
I tried three different cables, none worked.
4) Try a different drive caddy.
I tried three different drives in different caddies, but none worked.
5) Boot into a live media on the laptop and see if the drive behaves the same.
I can't do this at the moment as I can't have the live media and a drive plugged in at the same time. (I'm still setting things up here and don't yet have proper USB hubs etc. and the one I have only has a single USB port.)
6) Do this then reboot:

Code: Select all

sudo tee /etc/modprobe.d/usb-fix.conf <<< 'options usbcore autosuspend=-1'
This didn't work.
Post Reply