Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Notebook: unplugging power supply stops all hard drives
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Polynomial-C
Developer
Developer


Joined: 01 Jun 2003
Posts: 1422
Location: germany

PostPosted: Mon Jan 08, 2018 9:01 am    Post subject: Notebook: unplugging power supply stops all hard drives Reply with quote

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:

Code:
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]
_________________
The manual said "Requires Windows10 or better" so I installed GNU/Linux...

my portage overlay

Need a stage1 tarball? (Unofficial builds)


Last edited by Polynomial-C on Fri Jun 29, 2018 11:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Mon Jan 08, 2018 1:35 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3686
Location: Hamburg

PostPosted: Mon Jan 08, 2018 2:28 pm    Post subject: Reply with quote

And maybe disabling MTP by an udev rule to ensure that the mtp module doesn't badly interfere with the sd driver ?
Back to top
View user's profile Send private message
Polynomial-C
Developer
Developer


Joined: 01 Jun 2003
Posts: 1422
Location: germany

PostPosted: Fri Jun 29, 2018 11:44 am    Post subject: Reply with quote

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.
_________________
The manual said "Requires Windows10 or better" so I installed GNU/Linux...

my portage overlay

Need a stage1 tarball? (Unofficial builds)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Fri Jun 29, 2018 12:03 pm    Post subject: Re: Notebook: unplugging power supply stops all hard drives Reply with quote

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
Back to top
View user's profile Send private message
sao98021
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2012
Posts: 144
Location: Michigan

PostPosted: Sun Jul 01, 2018 5:40 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
elko
n00b
n00b


Joined: 02 Feb 2010
Posts: 52

PostPosted: Mon Jul 02, 2018 7:28 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 420

PostPosted: Mon Jul 02, 2018 9:18 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Mon Jul 02, 2018 2:41 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
sao98021
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2012
Posts: 144
Location: Michigan

PostPosted: Tue Jul 03, 2018 9:25 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 420

PostPosted: Wed Jul 04, 2018 3:31 pm    Post subject: Reply with quote

For me this happens with several generations and models of Dell laptops
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum