# Notebook: unplugging power supply stops all hard drives

## Polynomial-C

Hi,

I have encountered a very strange issue on my Dell Precision M6700 Notebook with kernel-4.14.x:

When the Notebook is on battery (not on AC) and I insert my Yubikey, all hard drives get stopped. I can see the following messages in syslog:

```
Jan  6 21:45:10 breakmygentoo kernel: input: Yubico Yubikey 4 OTP+U2F+CCID as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:1050:0407.0006/input/input19

Jan  6 21:45:10 breakmygentoo kernel: hid-generic 0003:1050:0407.0006: input: USB HID v1.10 Keyboard [Yubico Yubikey 4 OTP+U2F+CCID] on usb-0000:00:14.0-3/input0

Jan  6 21:45:49 breakmygentoo kernel: usb 3-3: USB disconnect, device number 3

Jan  6 21:46:24 breakmygentoo kernel: usb 3-3: new full-speed USB device number 4 using xhci_hcd

Jan  6 21:46:24 breakmygentoo kernel: usb 3-3: New USB device found, idVendor=1050, idProduct=0407                     

Jan  6 21:46:24 breakmygentoo kernel: usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

Jan  6 21:46:24 breakmygentoo kernel: usb 3-3: Product: Yubikey 4 OTP+U2F+CCID

Jan  6 21:46:24 breakmygentoo kernel: usb 3-3: Manufacturer: Yubico

Jan  6 21:46:24 breakmygentoo kernel: input: Yubico Yubikey 4 OTP+U2F+CCID as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:1050:0407.0007/input/input20

Jan  6 21:46:24 breakmygentoo kernel: hid-generic 0003:1050:0407.0007: input: USB HID v1.10 Keyboard [Yubico Yubikey 4 OTP+U2F+CCID] on usb-0000:00:14.0-3/input0

Jan  6 21:46:24 breakmygentoo mtp-probe: checking bus 3, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"                                                     

Jan  6 21:46:24 breakmygentoo mtp-probe: bus: 3, device: 4 was not an MTP device

Jan  6 21:46:25 breakmygentoo kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache

Jan  6 21:46:25 breakmygentoo kernel: sd 1:0:0:0: [sdb] Synchronizing SCSI cache       

Jan  6 21:46:25 breakmygentoo kernel: sd 1:0:0:0: [sdb] Stopping disk

Jan  6 21:46:25 breakmygentoo kernel: sd 0:0:0:0: [sda] Stopping disk
```

After that the system hangs and won't recover so I have to power off the notebook by pressing the power button for four seconds. Needless to say that the hard drives won't come back even when putting the notebook on AC. Oh, and that is not an occasional issue. As soon as the system is on battery and I insert my Yubikey, the above happens 100% while being on kernel-4.14. Going back to kernel-4.9.x is enough to make the issue go away. I didn't test any kernels between 4.9 and 4.14 so I cannot say if this is a specific issue with 4.14 kernels or not.

Is there anybody else having seen such issue?

Any idea how I can debug this or even fix it?

[edit]Adjusted topic[/edit]

----------

## Ant P.

Don't have one of those devices, but here's some ideas:

Do you have an external powered USB hub you could try connecting it to?

If you run acpi_listen in a terminal, does it print anything when you plug it in?

----------

## toralf

And maybe disabling MTP by an udev rule to ensure that the mtp module doesn't badly interfere with the sd driver ?

----------

## Polynomial-C

Bump.

I was wrong with my first post that it's happening becasue of my Yubikey. With later kernel releases it now happens each time immediately after I unplug my power supply.

This is quite annoying because that way I cannot use the notebook without connected power supply and that is something a notebook was built for.

I have no power management packages (like laptop-mode-tools) installed. My DE (KF5) also isn't involved becasue the same happens when no X is running.

This is an ~amd64 installation with openrc.

Any hints how to fix this are appreciated.

----------

## khayyam

 *Polynomial-C wrote:*   

> Any idea how I can debug this or even fix it?

 

Polynomial-C ... as it happens right after /lib*/udev/mtp-probe is run I would move/disable those rules and see if the behavior persists.

best ... khay

----------

## sao98021

this use to happen on a setup i had with laptop-mode-tools, but since you dont have that... hm

what i would do, is boot up a live cd/usb instead of your install, unplug it and observe (if you have not already) then try to figure it out from there. which, doesn't help your situation much.. sorry for that.

----------

## elko

I had a similar problem on my notebook that I do not use frequently. I might have finally solved the problem, yesterday.

My symptoms: When I switched the computer on, it worked for a while and then I could not start a new process and the running processes worked until they tried to access disk. I also realized that while I was working with the disk (e.g. compilation), the system seemed to work longer. Moreover, I heard repetitive clicking noise from the headers of my hard drive. When I looked to the the log, I found that the disk is stopped and started again as frequently as every 4 seconds.

So I tried to tune parameters with hdparm (-B, -J https://wiki.archlinux.org/index.php/Hdparm#Power_management_for_Western_Digital_Green_drives , -S) but setting them did not seem to have any effect. The disk keept to go off and on every 4 seconds (when the computer was idle) and after a couple of minutes, the disk was not available. So I unmerged laptop-mode-tools and then hdparm started to work. Now the disk doesn't go off and on anymore.

Yesterday, I let the computer to be more or less idle for about an hour and it didn't got stuck. So in my case, laptop-mode-tools seem to influence the hard drive somehow so that manual adjustments by hdparm were useless (e.g. -B didn't prevent the headers from stopping). Now, I have the hdparm service active at boot with configuration in /etc/conf.d/hdparm.

If anyone is interested, I have opened https://forums.gentoo.org/viewtopic-p-8236130.html to solve the problem with syslog Stopping disk message waking up the device again. If anyone is interested to comment, please do so in the other topic. Let's keep it clean here.

----------

## Maitreya

I have the same thing on several Dell laptops.

As I wanted to walk into the garden with my laptop without investigating too much, I just "mv /lib/udev/lmt-udev /lib/udev/lmt-udev.b"

After that the drives did not go into full lock again.

----------

## Ant P.

Possible other places to look at: We've ruled out l-m-t, but do you have anything else that'd listen to acpi events? upower? I think udev rules can fire on power supply device removal, but nothing in the base set would cause that. Check file owners in /{lib,etc}/udev/rules.d/ to see if anything else may have.

Also make sure you don't have any orphan files floating around those config dirs that might cause things to happen.

----------

## sao98021

what makes me curious is why this isn't effecting all laptops universally, seeing as you have no software specific or settings specific reason to be causing this. My guess is, whatevers causing this to occur on your guy's notebooks and but not others, would also point or lead to the solution to the problem - or atleast shed light on why, seems like you all have dells?

----------

## Maitreya

For me this happens with several generations and models of Dell laptops

----------

