Summary: | eSATA drives not recognized as removable | ||
---|---|---|---|
Product: | [Frameworks and Libraries] solid | Reporter: | Ansgar <ansgar> |
Component: | libsolid-udisks | Assignee: | Lukáš Tinkl <lukas> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | lamarque |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Ansgar
2011-07-09 00:58:19 UTC
*** This bug has been marked as a duplicate of bug 231312 *** This does not seem to be a duplicate. Bug 231312 was using HAL, this bug report is about the udisks backend. Ok, but the solution is the same: it is not a KDE problem, it is udisks' problem. Having to set UDISKS_SYSTEM_INTERNAL is a bug (or missing feature) in udisks, but the solid backend has a bug as well: "DriveIsDetachable" (from udisks) does not indicate a drive intended to be removed by the users (such as USB sticks or eSATA drives). It only indicates that the bus can be powered down by the host (at least this is the only thing udisks does with this field, it can do this for USB ports so it is true for these media). It is however a bug in KDE that it does not use DriveIsSystemInternal to display drives as user-removable (or hotpluggable is solid). (In reply to comment #4) > Having to set UDISKS_SYSTEM_INTERNAL is a bug (or missing feature) in udisks, > but the solid backend has a bug as well: Having to manually mark UDISKS_SYSTEM_INTERNAL to 0 for e-sata drives is the way udisks works because most e-sata controllers does not advertise the disks attached to them as removable. This is a upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=22879 > "DriveIsDetachable" (from udisks) does not indicate a drive intended to be > removed by the users (such as USB sticks or eSATA drives). It only indicates > that the bus can be powered down by the host (at least this is the only thing > udisks does with this field, it can do this for USB ports so it is true for > these media). Solid already uses "DriveCanDetach" in UDisksStorageDrive::isHotpluggable() and "DeviceIsSystemInternal" in UDisksStorageDrive::isRemovable(). I do not see what is wrong with that, hotpluggable does not necessary means removable. > It is however a bug in KDE that it does not use DriveIsSystemInternal to > display drives as user-removable (or hotpluggable is solid). Solid does use "DeviceIsSystemInternal". The problem is that udisks does not know when to set "DeviceIsSystemInternal" to 0 to indicate the drive is removable, so for safety it always set it to 1 for all e-sata drives. There is nothing Solid can do about this problem. I did a test here. With udisks-1.0.3 and with this udev rule: DEVPATH=="/devices/pci0000:00/0000:00:1f.2/host4/*",\ ENV{UDISKS_SYSTEM_INTERNAL}="0" my e-sata HD is recognised as removable by Solid: [lamarque@evolucao ~]$ solid-hardware details /org/freedesktop/UDisks/devices/sdb udi = '/org/freedesktop/UDisks/devices/sdb' parent = '/org/freedesktop/UDisks' (string) vendor = 'ATA' (string) product = 'ST31500341AS' (string) description = 'ATA ST31500341AS' (string) Block.major = 8 (0x8) (int) Block.minor = 16 (0x10) (int) Block.device = '/dev/sdb' (string) StorageDrive.bus = 'Ide' (0x0) (enum) StorageDrive.driveType = 'HardDisk' (0x0) (enum) StorageDrive.removable = true (bool) StorageDrive.hotpluggable = false (bool) StorageDrive.inUse = true (bool) StorageDrive.size = 1500301910016 (0x15d50f66000) (qulonglong) The only thing wrong here is that it should have also been marked as hotpluggable... BY UDISKS. There is no sense in Solid marking it as hotpluggable because that would only work for KDE programs. That must be done in udisks, so please fill a bug in bugs.freedesktop.org. I will close this bug as upstream. |