Bug 1278944 - udisksctl power-off not working with all disks
udisksctl power-off not working with all disks
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-06 14:43 EST by Jean-Christophe Baptiste
Modified: 2017-05-24 22:48 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-24 11:02:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jean-Christophe Baptiste 2015-11-06 14:43:10 EST
Description of problem:

When ejecting a drive, from the GUI (Gnome, XFCE, ...) or using udiskctl, I believe udev is responsible of spinning it down.

Some disks spins down but spins up again immediately, forcing the user to do a hot unplug.

How reproducible:

Steps to Reproduce:
1. Plug in an external USB disk
2. Then eject it or do type udisksctl power-off -b /dev/sdx

Actual results:

Some disk models would spin back up, while others will properly shutdown. 

Expected results:

All disks should spin down.

Additional info:

All my disks are USB 3.
I have 2 Toshiba external hard drive (500 Mo and 1 To) that do spin down correctly.
I have 1 Seagate Slim hard drive of 500 Mo that also shuts down correctly.

But, another Seagate Slim drive of 1To does spin back up.

Also, strangely, all of these disks do spin back up when they are plugged and ejected from behind an USB 3 hub.
Comment 1 Jean-Christophe Baptiste 2016-01-17 02:22:02 EST
A lot of reports on the Ubuntu side for a similar issue: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/792085

The culprit has not been identified yet, apparently.
Comment 2 Zbigniew Jędrzejewski-Szmek 2016-01-21 09:16:03 EST
Based on the comments it appears to be drive/chipset specific and maybe some driver issue. Reassigning to the kernel.
Comment 3 James 2016-02-16 15:16:21 EST
I find this on my enclosures with Asmedia and Norelsys bridges. The JMicron one seems to power down properly.
Comment 4 Jean-Christophe Baptiste 2016-03-28 04:15:43 EDT
James, how did you get this info? lsusb,lshw et hdparm do not seem to provide it.
Comment 5 Jean-Christophe Baptiste 2016-07-23 16:14:48 EDT
Version: 23 → 24
Comment 6 James 2016-07-24 06:03:17 EDT
(In reply to Jean-Christophe Baptiste from comment #4)
> James, how did you get this info? lsusb,lshw et hdparm do not seem to
> provide it.

Sorry for the very late reply. Sometimes the info identifying the bridge chip is in dmesg. Otherwise I look up the USB numeric IDs on Google. This is for generic enclosures only. In my experience, the bridge on the 'complete' big-brand drives have their firmwares and device IDs modified for hide the chip's origin.
Comment 7 Wolfgang Breyha 2016-08-09 05:24:31 EDT
I see this behaviour as well on fully patched Fedora 24 with
kernel-4.6.4-301.fc24.x86_64

I have a LaCie 9223 1TB with USB ID 059f:1070. According to a google search this device uses a ASMedia 1053. 
According to smartctl the HDD is a 
Device Model:     ST1000LM035-1RK172

If connected to USB 3 port on a 
Gigabyte B85M-HD3 with 
00:14.0 8086:8c31 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
or a 
ASUS Z170-P D3 onboard USB port

the drive powers down using "safely remove drive"...
Aug  9 10:56:16 pcwb ntfs-3g[11727]: Unmounting /dev/sdb1 (LaCie-1TB)
Aug  9 10:56:16 pcwb udisksd[1491]: Unmounted /dev/sdb1 on behalf of uid 1000
Aug  9 10:56:16 pcwb udisksd[1491]: Successfully sent SCSI command SYNCHRONIZE CACHE to /dev/sdb
Aug  9 10:56:17 pcwb udisksd[1491]: Successfully sent SCSI command START STOP UNIT to /dev/sdb
Aug  9 10:56:17 pcwb systemd-udevd: inotify_add_watch(9, /dev/sdb1, 10) failed: No such file or directory
Aug  9 10:56:17 pcwb kernel: sd 6:0:0:0: [sdb] Synchronizing SCSI cache
Aug  9 10:56:17 pcwb kernel: sd 6:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Aug  9 10:56:17 pcwb udisksd[1491]: Powered off /dev/sdb - successfully wrote to sysfs path /sys/devices/pci0000:00/0000:00:14.0/usb4/4
-1/remove
Aug  9 10:56:17 pcwb kernel: usb 4-1: USB disconnect, device number 21

and immediately reappears...
Aug  9 10:56:17 pcwb kernel: usb 4-1: new SuperSpeed USB device number 22 using xhci_hcd
Aug  9 10:56:17 pcwb kernel: usb 4-1: New USB device found, idVendor=059f, idProduct=1070
Aug  9 10:56:17 pcwb kernel: usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Aug  9 10:56:17 pcwb kernel: usb 4-1: Product: Porsche Mobile for Mac
Aug  9 10:56:17 pcwb kernel: usb 4-1: Manufacturer: LaCie
Comment 8 Laura Abbott 2016-09-23 15:13:37 EDT
*********** MASS BUG UPDATE **************
 
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 24 kernel bugs.
 
Fedora 24 has now been rebased to 4.7.4-200.fc24.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 25, and are still experiencing this issue, please change the version to Fedora 25.
 
If you experience different issues, please open a new bug report for those.
Comment 9 Jean-Christophe Baptiste 2016-10-03 18:45:56 EDT
The bug is still here with latest kernel version.
Comment 10 James 2016-10-04 03:10:33 EDT
(In reply to Jean-Christophe Baptiste from comment #9)
> The bug is still here with latest kernel version.

Confirmed.
Comment 11 Jean-Christophe Baptiste 2016-11-27 12:50:52 EST
Still in Fedora 25.
Comment 12 Laura Abbott 2017-01-16 20:21:08 EST
*********** MASS BUG UPDATE **************
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs.
 
Fedora 25 has now been rebased to 4.9.3-200.fc25.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26.
 
If you experience different issues, please open a new bug report for those.
Comment 13 Wolfgang Breyha 2017-01-23 15:17:00 EST
Just tested it again with my
LaCie 9223 1TB with USB ID 059f:1070 on USB3 xhci ports of an ASUS Z-170 board and a HP EliteBook 820 G1.

It works now as expected on:
F24: 4.8.16-200.fc24.x86_64
F25: 4.9.3-200.fc25.x86_64

Drive shuts down and disconnects from USB port after selecting "safely remove drive" on MATE desktop and it does not spin up again.

I also tested an older LaCie USB 2.0 drive and it still works as well.
Comment 14 Laura Abbott 2017-01-24 11:02:35 EST
Thank you for letting us know. I'm going to close this bug. If the problem shows up again, please reopen.
Comment 15 Eric M 2017-05-14 14:43:18 EDT
Same issue on fedora 25 on XPS 15 9560. Running kernel 4.8.6-300.fc25.x86_64

Disk: seagate 1TEAPF-500 (4TB drive)

Other usb drives spin down as expected.
Comment 16 Eric M 2017-05-24 22:48:23 EDT
(In reply to Eric M from comment #15)
> Same issue on fedora 25 on XPS 15 9560. Running kernel 4.8.6-300.fc25.x86_64
> 
> Disk: seagate 1TEAPF-500 (4TB drive)
> 
> Other usb drives spin down as expected.

kernel 4.10.x resolves the issue for me.

Note You need to log in before you can comment on or make changes to this bug.