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-installable (and called 'udisks' and 'udisks2') so it should be as simple as 'apt-get install udisks' and then run "udisks --detach /dev/sdX".
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/freedesktop/UDisks/devices/sdc2: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist
may be it cause problems. I do not know.
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- installable (and called 'udisks' and 'udisks2') so it should be as simple as 'apt-get install udisks' and then run "udisks --detach /dev/sdX".
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" p/UDisks/ devices/ sdc2: Method "GetAll" with signature "s" on interface "org.freedeskto p.DBus. Properties" doesn't exist
(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.