Safely remove does not work (LED is on) on USB 3.0 flash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
udisks |
Confirmed
|
Medium
|
|||
udisks (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I have VAIO F13Z1R with two USB 3.0 ports and Transcend TS64GJF760 USB flash.
If I insert this flash to USB 3.0 port, unmount it and do safely remove - LED is still on.
By safely remove I mean:
udisks --detach /dev/sdb
or
Nautilus/Desktop -> Safely remove drive.
It seems that device is removed from system - it does not listed in:
lsusb
fdisk -l
blkid.
For me it is more comfortable to disconnect flash which LED is off.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: udisks 1.0.4-5ubuntu2.1
ProcVersionSign
Uname: Linux 3.2.0-48-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu17.3
Architecture: amd64
CheckboxSubmission: a3c9de473bf7a48
CheckboxSystem: b633b4f40868d49
CustomUdevRuleF
Date: Tue Jun 25 22:52:11 2013
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
MachineType: Sony Corporation VPCF13Z1R
MarkForUpload: True
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: udisks
UpgradeStatus: Upgraded to precise on 2012-09-28 (270 days ago)
dmi.bios.date: 10/20/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: R0190Y9
dmi.board.
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: VPCF13Z1R
dmi.product.
dmi.sys.vendor: Sony Corporation
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Norbert (nrbrtx) wrote : | #1 |
- AtaSmartBlob_sda.gz Edit (593 bytes, application/x-gzip)
- BootDmesg.txt Edit (190.2 KiB, text/plain; charset="utf-8")
- CurrentDmesg.txt Edit (245.5 KiB, text/plain; charset="utf-8")
- Dependencies.txt Edit (2.3 KiB, text/plain; charset="utf-8")
- Lspci.txt Edit (23.1 KiB, text/plain; charset="utf-8")
- Lsusb.txt Edit (697 bytes, text/plain; charset="utf-8")
- Mounts.txt Edit (1.7 KiB, text/plain; charset="utf-8")
- ProcCpuinfo.txt Edit (6.6 KiB, text/plain; charset="utf-8")
- ProcEnviron.txt Edit (297 bytes, text/plain; charset="utf-8")
- ProcInterrupts.txt Edit (4.5 KiB, text/plain; charset="utf-8")
- ProcModules.txt Edit (5.5 KiB, text/plain; charset="utf-8")
- UDisksDump.txt Edit (25.3 KiB, text/plain; charset="utf-8")
- UdevDb.txt Edit (167.5 KiB, text/plain; charset="utf-8")
- UdevLog.txt Edit (354.9 KiB, text/plain; charset="utf-8")
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#6 |
Bug exists in Fedora 20 with gnome-disk-utility 3.10.0
UDisks 2.1.1 (built against 2.1.1).
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#7 |
There is no Safely remove option in Nautilus 3.10.1 too.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#8 |
Tested again on Arch with
* gnome-disk-utility 3.10.0 UDisks 2.1.1 (built against 2.1.1)
* Nautilus 3.10.1
- the bug exists with both applications. Please fix it.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#9 |
The reason that
$ udisks --detach /dev/sdX
spins down the disk properly but clicking the "Power off" menu item in the GNOME Disks application doesn't has to do with the fact that the udisks program is from udisks version 1 and was rewritten in udisks version 2.
udisks v1: http://
udisks v2: http://
As you can see, both v1 and v2 does this by writing a '1' to the 'remove' sysfs attribute on the parent USB device, as per
and this makes most USB-attached disk drives actually power down - at least all the different devices that I've tested with.
However, what's missing in v2 (and present in v1) is the following steps
1. sending the SCSI SYNCHRONIZE CACHE command
2. sending START/STOP UNIT command
3. unbinding the USB Mass Storage kernel driver
Notably, there's actually a TODO item in v2 for doing this:
/* TODO: Send the eject? Send SCSI START STOP UNIT? */
Now, I don't think that 3. is necessary as it happens as part of writing to the 'remove' sysfs file. That leaves 1. and 2.
Here's what I'd like to you try. Does
sg_start --stop /dev/sdX
do what you want? If so, we should add 1. and 2. to v2.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#10 |
Dear David!
First of all I would like to thank you for answer and recommendation!
I tested my USB-harddrives with sg_start utility. Thank you for hint, I did not know about SCSI utilities before.
I made such tests under Ubuntu 12.04.4, Fedora 20 and OpenSuSe 13.1 with all installed updates.
* Ubuntu 12.04.4 does not have udisks2, it has udisks 1.0.4-5ubuntu2.1, sg3-utils 1.33-1.
* Fedora 20 has udisks-
* OpenSuSe 13.1 has udisks-
For more adequate results I disabled auto-mount feature in GNOME with dconf-editor (as recommended here - https:/
My test results are the following:
1. For my USB-HDD (Seagate ST9750420A in USB 2.0 Tsunami e-data 2500 enclosure,
lsusb - 04fc:0c25 Sunplus Technology Co., Ltd SATALink SPIF225A)
1.1. command “sg_start --stop /dev/sdX” really spin-downs my drive (sometimes on 2nd or 3rd attempt - I don’t know why), device remains in system and spin-up again only on my demand.
1.2. command “udisks --detach /dev/sdX” spin-downs my drive (always on 1st attempt), device is completely removed from system after detach.
2. For my USB 3.0 WD My Passport Ultra (WD WD20NMVW,
lsusb - 1058:0743 Western Digital Technologies, Inc.)
2.1. command “sg_start --stop /dev/sdX” is ignored by this HDD (it make one click, but does not spin-down). Maybe it is because of proprietary/
2.2. command “udisks --detach /dev/sdX” spin-downs my drive (on 1st attempt always), device is completely removed from system after detach.
So the results are identical for all three distros.
For me it seems, that “udisks --detach” works better and in 100% (on all distros and with proprietary WD HDD-controller).
So if you have time, please, do deeper comparison between udisks v.1, udisks v.2 and sg_start.
I'm ready to do more testing if you send me concrete instruction, but I am not expert and I do not know how to debug/trace/log ATA and udisks.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#11 |
Debian, udisks2 v 2.1.2-1. When I do safely remove of Seagate Portable from Thunar, udisks2 doesn't switch off a disk power when detaching. But udisks1 switch off a disk power.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#12 |
Thanks for testing. I'll look into making udisks2 sending SYNCHRONIZE CACHE and START/STOP UNIT commands. Stay tuned.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#13 |
OK, I just made that change
http://
and tested it with a couple of different units. Notes
- One of my devices (bus-powered) does not accept the START STOP UNIT
command so we just continue if it fails. That is, this patch should
not break existing behavior.
- Another device (not bus-powered) used to spin down a couple of seconds
after removing power to the USB port. With this patch it spins down
immediately. (Which is actually nicer.)
- Still works on USB sticks etc.
- I didn't add SCSI SYNCHRONIZE CACHE as that command failed on all my
devices. I also don't think it's necessary as the device drivers will
issue something like this in part of the fsync(2) call that we do
before this.
Please test if the patch works and report back - thanks!
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#14 |
> command “sg_start --stop /dev/sdX” really spin-downs my drive (sometimes
> on 2nd or 3rd attempt - I don’t know why), device remains in system and
> spin-up again only on my demand.
Btw, this is because the sg_start command opens the device node with O_RDWR which causes an uevent 'change' event to fire when the command completes. This in turn causes udev rules to fire which accesses the disk which causes it to spin up again. In the patch I committed to udisks to do this, we use O_RDONLY to avoid this.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#15 |
Thank you for your commits, David!
I installed all build-dependencies on my Ubuntu 14.04 system with 'apt-get install build-dep', did a 'git clone git://anongit.
Please note: automount is disabled.
What I get after reboot?
1. for USB-HDDs (both drives have EXT4 and NTFS partitions)
1.1. Seagate - 'Safely remove drive' option in Nautilus spinned-down it, gnome-disks spinned-down it after click on 'Power off the drive'. The 'udisksctl power-off -b /dev/sdX' works too.
If I enable automount, the 'Safely remove drive'/'Power off the drive' spins-down my drive. It's very good!
1.2. WD - 'Safely remove drive' option in Nautilus spinned-down it, gnome-disks 'Power off the drive' and 'udisksctl power-off -b /dev/sdX' works too.
But there is a little difference - if I enable automount the 'Safely remove drive'/'Power off the drive' does not spin-down the disk (disk plates rotating, but device is removed from system), I reopen the bug because of this.
2. for USB-flashes
There is no 'Safely remove drive' option in Nautilus for my USB-flashes. After 'Eject' the parent device remains in system and may be powered-off by gnome-disks. For me it's a good compromise between udisks1 and udisks2 behavior.
I'm ready to test and collect logs of my WD USB-HDD. I can't understand why Seagate drive unmounts all partitions before power-off, but WD does not.
What logs can help you to understand the problem?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#16 |
Hey, thanks for testing the patches.
(In reply to comment #10)
> 1.2. WD - 'Safely remove drive' option in Nautilus spinned-down it,
> gnome-disks 'Power off the drive' and 'udisksctl power-off -b /dev/sdX'
> works too.
> But there is a little difference - if I enable automount
I have an idea of what's wrong here but before I speculate on that, what exactly does "enable automount" mean? Are you referring to having the 'auto' option in the /etc/fstab file?
> the 'Safely remove
> drive'/'Power off the drive' does not spin-down the disk (disk plates
> rotating, but device is removed from system), I reopen the bug because of
> this.
>
> 2. for USB-flashes
> There is no 'Safely remove drive' option in Nautilus for my USB-flashes.
> After 'Eject' the parent device remains in system and may be powered-off by
> gnome-disks. For me it's a good compromise between udisks1 and udisks2
> behavior.
>
>
> I'm ready to test and collect logs of my WD USB-HDD. I can't understand why
> Seagate drive unmounts all partitions before power-off, but WD does not.
> What logs can help you to understand the problem?
When the system is running with the WD USB-HDD, please include the output of 'gvfs-mount -li' from a non-root shell in a terminal in the desktop session.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#17 |
Thank you for reply, David!
>I have an idea of what's wrong here but before I speculate on that, what exactly does "enable automount" mean? Are you referring to having the 'auto' option in the /etc/fstab file?
By "enable automount" I mean these dconf-editor parameters: org.gnome.
>When the system is running with the WD USB-HDD, please include the output of 'gvfs-mount -li' from a non-root shell in a terminal in the desktop session.
The output of 'gvfs-mount -li' for my WD USB-HDD is as follows:
Drive(3): WD My Passport 0743
Type: GProxyDrive (GProxyVolumeMo
ids:
unix-device: '/dev/sdc'
themed icons: [drive-
symbolic themed icons: [drive-
is_media_
has_media=1
is_media_
can_
can_eject=0
can_start=0
can_stop=1
start_
sort_
Volume(0): WD_2TB_NTFS
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'device'
unix-device: '/dev/sdc2'
uuid: '32BA1ADB5E526052'
label: 'WD_2TB_NTFS'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Volume(1): WD_2TB_EXT4
Type: GProxyVolume (GProxyVolumeMo
ids:
class: 'device'
unix-device: '/dev/sdc1'
uuid: '6d296a81-
label: 'WD_2TB_EXT4'
themed icons: [drive-
symbolic themed icons: [drive-
can_mount=1
can_eject=0
should_
sort_
Mount(0): WD_2TB_EXT4 -> file://
Type: GProxyMount (GProxyVolumeMo
themed icons: [drive-
symbolic themed icons: [drive-
can_eject=0
For my Seagate HDD I have:
Drive(3): ST950042 0AS
Type: GProxyDrive (GProxyVolumeMo
ids:
unix-device: '/dev/sdc'
themed icons: [drive-
symbolic themed icons: [drive-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#18 |
(Hmm, the drives have
can_stop=1
start_
so everything should be good. My guess is that it's the NTFS partition that is the culprit. Specifically, unmounting it via udisks somehow fails.)
If you manually unmount the partitions, does powering down the drive work? Specifically, try this
1. Unmount all partitions using Disks
- if that fails, try 'umount /dev/sdXN' from a terminal. Does that work?
2. Press the "Power off" button in Disks when everything has been unmounted.
Does that work?
Also, please include all messages from udisks from syslog (e.g. /var/log/messages or similar) when pressing the "Power off" button in Disks. It should contain some useful info.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#19 |
Today I tested 5 other drives with different paritioning schemes (1 primary + 1 extended partition with some logical partitions in it):
3 of them were successfully Safely removed (in Nautilus) and Powered off (in Disks),
2 of them were successfully Safely removed (in Nautilus) and Powered off (in Disks) only after manual unmount.
>If you manually unmount the partitions, does powering down the drive work?
>Specifically, try this
>
> 1. Unmount all partitions using Disks
> - if that fails, try 'umount /dev/sdXN' from a terminal. Does that work?
did it in Disks with my WD drive
> 2. Press the "Power off" button in Disks when everything has been unmounted.
did it in Disks - my WD drive is spinned down.
>Does that work?
So it works.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#20 |
Created attachment 93407
Syslog/Message for my WD USB-HDD (from plugging-in to Safely remove) - Ubuntu 14.04 with UDisks 2.1.3
>Also, please include all messages from udisks from syslog (e.g. /var/log/messages or similar) when pressing the "Power off" button in Disks. It should contain some useful info.
I attached full log-file for my WD USB-HDD. It contains device plugging-in, detection by automount feature, un-mounting both partiotion in Disks, Powering off in Disks, device plugging-out as you recommended.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#21 |
Created attachment 93414
Syslog/Message for my WD USB-HDD (from plugging-in to Safely remove) - Ubuntu 12.04 with UDisks 1.0.4-5ubuntu2.1
If that can help I prepared syslog/messages for my WD-HDD in Ubuntu 12.04 too. Sequence is identical to comment 15.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#22 |
Let me see if I understand this correctly:
1. Manually unmount, then power-off via the Disks GUI works as expected.
2. The "safely remove drive" button in Nautilus does not work as expected.
Is that about right?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#23 |
It seems that my english is not perfect. I'm sorry.
Let's consider only WD-HDD.
>Let me see if I understand this correctly:
> 1. Manually unmount, then power-off via the Disks GUI works as expected.
Yes.
> 2. The "safely remove drive" button in Nautilus does not work as expected.
No. It works as expected on other drives, but not WD.
>Is that about right?
Yes and no.
Safely remove (in Nautilus) and Power off (in Disks) works as expected only if I manually unmount all WD partitions before Safe removal / Power off.
If I unmount all WD partitions manually and then do Safe removal / Power off HDD spins down.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#24 |
OK, I'm interested in output of /var/log/messages when it doesn't work with the WD. Or is that what you posted in comment 15?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#25 |
>OK, I'm interested in output of /var/log/messages when it doesn't work with the WD. Or is that what you posted in comment 15?
I tested it again - the log in comment 15 represent both situations - when drive spinned-down and when it does not. Only timestamps differ, messages order is the same.
With udisks1 this WD-HDD spins-down (by Safely remove in Nautilus or Power off in Disks) even if all partitions mounted, with udisks2 it does not.
There is a little difference between udisks1 and udisks2 "powering off drive" algorithms. What other log-file can I attach to help you to understand the problem?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#26 |
(In reply to comment #20)
> >OK, I'm interested in output of /var/log/messages when it doesn't work with the WD. Or is that what you posted in comment 15?
> I tested it again - the log in comment 15 represent both situations - when
> drive spinned-down and when it does not. Only timestamps differ, messages
> order is the same.
>
>
> With udisks1 this WD-HDD spins-down (by Safely remove in Nautilus or Power
> off in Disks) even if all partitions mounted, with udisks2 it does not.
> There is a little difference between udisks1 and udisks2 "powering off
> drive" algorithms. What other log-file can I attach to help you to
> understand the problem?
Your testing with udisks1 is on an older version of Ubuntu (12.04 vs. 14.04) isn't it? If so, any chance you can install the udisks1 package on the same OS as you tested with udisks2? The packages are parallel-
I'm asking for this because I think this is due to a kernel and/or ntfs-3g problem.
Another thing to try would be to see if it happens if the filesystem type is *not* ntfs, e.g. try with ext4. (I realize this may not be possible as you may not want to reformat the disk.)
To recap, the only difference now from udisks1 is that udisks2 does not send SYNCHRONIZE CACHE before START STOP UNIT (it didn't work on any of my devices when I make the recent udisks2 changes). If it turns out that udisks1 works as expected on 14.04, I will try to add this change to see if it makes the difference...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#27 |
Created attachment 93492
log-files for my WD-HDD (Ubuntu 14.04 with udisks1 and udisks2)
Thank you for reply, David.
>Your testing with udisks1 is on an older version of Ubuntu (12.04 vs. 14.04) isn't it? If so, any chance you can install the udisks1 package on the same OS as you tested with udisks2? The packages are parallel-
I have already installed udisks1 (1.0.4-8ubuntu1) on Ubuntu 14.04 and it works as expected on all my drives if I unmount all partitions manually (from console, Nautilus or Disks - it does not matter).
>I'm asking for this because I think this is due to a kernel and/or ntfs-3g problem.
For me it seems that we have timing/race issue in udisks2.
>Another thing to try would be to see if it happens if the filesystem type is *not* ntfs, e.g. try with ext4. (I realize this may not be possible as you may not want to reformat the disk.)
I have 500Gb of data on my NTFS partition, so I do not want to reformat my HDD. I'm sorry for this.
>To recap, the only difference now from udisks1 is that udisks2 does not send SYNCHRONIZE CACHE before START STOP UNIT (it didn't work on any of my devices when I make the recent udisks2 changes). If it turns out that udisks1 works as expected on 14.04, I will try to add this change to see if it makes the difference...
If there are no other differences - please add SYNCHRONIZE CACHE, I'm ready to do a test and report back.
I prepared an archive of log-files for my WD-HDD on Ubuntu 14.04 with udisks1 and udisks2 installed.
The log-files are: "tailf /var/log/syslog", "gvfs-mount -o", "udisksctl monitor", "udisks --monitor-detail".
The test-cases are:
1. udisks2 Safely remove from Disks (mounted) = FAIL - not spinned down
connect, auto-mount by Nautilus, clicked Power off in Disks, disconnect
2. udisks2 Safely remove from Disks (unmounted) = SUCCESS - spinned down
connect auto-mount by Nautilus, unmount in Nautilus, clicked Safely remove drive in Nautilus, disconnect
3. udisks2 Safely remove from Nautilus (mounted) FAIL - not spinned down
connect, auto-mount by Nautilus, clicked Safely remove drive in Nautilus, disconnect
4. udisks2 Safely remove from Nautilus (unmounted) = SUCCESS - spinned down
connect, auto-mount by Nautilus, unmount in Nautilus, clicked Safely remove drive in Nautilus, disconnect
5. udisks --detach Safely remove (unmounted) = SUCCESS - spinned down
connect, auto-mount by Nautilus, unmount in Nautilus, sent "udisks --detach /dev/sdX" in console, disconnect
On FAIL-cases there are interesting lines in "udisks --monitor-detail"
(udisks:2365): udisks-WARNING **: Couldn't call GetAll() to get properties for /org/freedeskto
may be it cause problems. I do not know.
I'm ready to test your new commits.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#28 |
(In reply to comment #22)
> I have 500Gb of data on my NTFS partition, so I do not want to reformat my
> HDD. I'm sorry for this.
Fair enough. I'll try to see if I can repro on my hardware.
> If there are no other differences - please add SYNCHRONIZE CACHE, I'm ready
> to do a test and report back.
Will do - thanks for testing!
> I prepared an archive of log-files for my WD-HDD on Ubuntu 14.04 with
> udisks1 and udisks2 installed.
Thanks for doing that - it's very helpful!
> On FAIL-cases there are interesting lines in "udisks --monitor-detail"
> (udisks:2365): udisks-WARNING **: Couldn't call GetAll() to get
> properties for /org/freedeskto
> signature "s" on interface "org.freedeskto
> may be it cause problems. I do not know.
This is likely not a problem.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#29 |
When I try execute (udisks2 installed):
$ udisksctl power-off -b /dev/sde
It says: "Unknown command `power-off'"
What do I do not so?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#30 |
Hello, Programmist11180!
From comment #8 to #23 we talk about unrelease udisks2 version from git-repository.
If you are on Ubuntu (or Mint, or other Debian/Ubuntu based distro) you can follow my instruction (in comment #10) to compile udisks2 from latest sources and test "udisksctl power-off -b /dev/sde" again.
I have compiled deb-package for 14.04 i686 - I can post it here if you have any problems with compilation.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#31 |
Hello nrbrtx.
I have compiled and installed udisks 2.1.3. And I have a problem. udisksctl not work.
$ udisksctl power-off -b /dev/sde
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
(process:3807): GLib-GObject-
Error connecting to the udisks daemon: Ошибка вызова StartServiceByName для org.freedesktop
/var/log/syslog
Feb 8 18:54:37 debian-terminal dbus[2839]: [system] Activating service name='org.
Feb 8 18:54:37 debian-terminal udisksd[3540]: udisks daemon version 2.1.3 starting
Feb 8 18:55:02 debian-terminal dbus[2839]: [system] Failed to activate service 'org.freedeskto
Feb 8 18:55:07 debian-terminal dbus[2839]: [system] Activating service name='org.
Feb 8 18:55:07 debian-terminal udisksd[3810]: udisks daemon version 2.1.3 starting
Feb 8 18:55:32 debian-terminal dbus[2839]: [system] Failed to activate service 'org.freedeskto
$ ps aux | grep udisks
nikts 3531 0.0 0.0 205256 3312 ? Sl 18:54 0:00 /usr/lib/
root 3540 0.0 0.1 366324 4912 ? Sl 18:54 0:01 /usr/local/
root 3810 0.0 0.1 366324 4916 ? Sl 18:55 0:01 /usr/local/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#32 |
Hello, Programmist11180!
Did you completely followed my instruction in comment #10? Have you rebooted PC after udisks 2.1.3 installation?
Do you have Ubuntu 14.04 as me?
Does power-off work from gnome-disks or Nautilus?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#33 |
nrbrtx, I have Debian Wheezy (with some Sid), and Thunar filemanager.
The paths in built udisks and udisks from repository differs.
This solve the problem
sudo cp /usr/local/
But there is an another problem:
$ udisksctl power-off -b /dev/sde
Error looking up object for device /dev/sde
The 'eject' option not available in Thunar with built udisks. Therefore I can't check power-off.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#34 |
Programmist11180, you can always detect which devices are connected with
"fdisk -l" (called by root) or watch syslog on device connection. It seems that /dev/sde device does not exist. Also you can check which storage devices are connected in gnome-disks (previously palimsest).
Usually /dev/sda is your hard disk, the removable devices start from /dev/sdb.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#35 |
sudo cp /usr/local/
And after reboot 'eject' became available in Thunar.
This is my small test:
1. Seagate Portable. Filesystem - one big NTFS volume. Eject from Thunar - no power-off. Disable volume and then eject from Thunar - disk power-offs. Umount volume and udisksctl power-off -b /dev/sde also spin-down disk.
2. U3 flash. Filesystem - one big FAT32. Eject from Thunar - flash power-offs.
3. WD Passport. Filesystem - one big NTFS. No power-off in all cases. Also no power-off in old udisks. I think that this disk may not support this feature.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#36 |
Created attachment 95371
strace nautilus with udisks2, WD-HDD safely remove (ok - unmounted, fail - mounted)
Dear, David!
I look udisks2 git-repo, it seems that there are no changes since last comments.
I prepared two strace logs for nautilus with my WD-HDD connected:
* nautilus_ok.txt represent case no 4 of my comment #22
* nautilus_fail.txt represent case no 3 of my comment #22
I hope that this log-files will help determine the root of the safely-remove problems. Also I still hope that we can get udisks1 functionality in new udisks2.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#37 |
Hi, sorry for the lack of updates. Nothing special, just been busy with work, I'm still planning on adding the SYNCHRONIZE CACHE command. Hopefully I'll get to look at it soon. Thanks.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#38 |
Hi, finally got around to making udisks also send the SYNCHRONIZE CACHE command. Please check if it works. The patch is on master and here:
http://
Thanks!
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#39 |
I don't see a difference after applying this patch.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#40 |
Thank you for your commit, David!
But as Programmist11180 I don't see any differences after applying this patch. My WD HDD acts as before.
How I can get full debug log about low-level actions which are performed during Safely remove from Nautilus or Disks?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mike (sheenm) wrote : | #2 |
I also have problem like this in Ubuntu 14.04
I have a transcend J25A3K usb disk. When I put in in usb 2.0 port, safe remove works fine. but in usb 3.0 port something goes wrong. when i try to safe remove it in nautilus, it removes and after a few seconds connects again.
Also, my usb flash KINGSTON DataTraveler ultimate G3 even doesn't have a safe remove. I can only unmount it from Nautilus on both usb 2.0 and usb3.0 ports.
If I can help with any log files or something, feel free to contact me. thanks
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in udisks (Ubuntu): | |
status: | New → Confirmed |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Norbert (nrbrtx) wrote : | #4 |
Hello, Mike!
The problem comes from new version of UDisks - v.2 is not fully back-compatible with v.1.
Udisks v.1 present in Ubuntu 12.04, Udisks v.2 present in Ubuntu 12.10+.
I contacted Udisks developer - David Zeuthen at https:/
With latest commits Safely remove for USB-HDD is returned to Nautilus, but USB-flashes have only Eject.
You can try to do Safely remove from Gnome Disks (gnome-disks command). It allows me to power-off USB-flash and USB-HDD.
Changed in udisks (Ubuntu): | |
importance: | Undecided → Medium |
Changed in udisks: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
|
#41 |
FYI, when you unbind the scsi disk driver by writing the 1 to the delete knob in sysfs, it takes care of issuing the synchronize cache and start/stop unit commands. You can see this in dmesg. You mentioned the usb mass storage driver, which I would not have thought of. I'd bet that is the issue. My guess is that most drives appear to work because they shut off their LED when given the STOP UNIT command when the scsi disk driver unbinds, but if the usb mass storage driver is still bound, some drives decide to keep the LED on.
I have Ubuntu 12.04.3 with GNOME 3.4 and udisks 1.0.4-5ubuntu2.1. With this software I can do a Safely remove of a USB-flash or external USB-HDD from nautilus (3.4.2-0ubuntu8) and from gnome-disk-utility (3.0.2-2ubuntu7).
In modern linux distros (such as Ubuntu 13.04, 13.10, Mageia 4, Fedora 19, OpenSuse 12.3) there is no Safely remove option in Nautilus (see https:/ /bugs.launchpad .net/ubuntu/ +source/ udisks2/ +bug/1067876 and https:/ /bugs.freedeskt op.org/ show_bug. cgi?id= 60293).
In gnome-disks Safely remove / Poweroff is appeared again (from 3.8, see https:/ /bugzilla. gnome.org/ show_bug. cgi?id= 675542), but it does not spin-down external USB-HDD.
In some linux distros I can spin-down my disk with "udisks --detach /dev/sdX", but it is not user-friendly.
So please, enable spin-down on the udisks side.
I understand that external SATA (and IDE) HDDs are hot-pluggable and hot-swappable, but it is not comfortable for me to detach rotating drive.