#728065 thunar: USB and eSATA devices not seen by Thunar

Package:
thunar
Source:
thunar
Description:
File Manager for Xfce
Submitter:
David Christensen
Date:
2013-11-01 17:03:08 UTC
Severity:
normal
#728065#5
Date:
2013-10-28 00:54:29 UTC
From:
To:
Dear Maintainer,

dmesg reports devices when plugged in.  Shotwell sees USB devices.
Thunar does not see USB or eSATA devices.

#728065#10
Date:
2013-10-28 07:31:42 UTC
From:
To:
Hi,

is udisks2 installed?

Regards,

#728065#15
Date:
2013-10-28 15:43:57 UTC
From:
To:
Apparently not.


David



2013-10-28 08:42:11 root@p43200 ~
# apt-get install udisks2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package udisks2

2013-10-28 08:42:23 root@p43200 ~
# apt-cache search udisks2

2013-10-28 08:42:36 root@p43200 ~
# udisks2
-su: udisks2: command not found

2013-10-28 08:43:16 root@p43200 ~
# apropos udisks2
udisks2: nothing appropriate.

#728065#20
Date:
2013-10-28 21:23:42 UTC
From:
To:
Ah, sorry, missed you're on stable :) Please check for udisks package
then.

Regards,

#728065#25
Date:
2013-10-28 23:57:52 UTC
From:
To:
2013-10-28 16:19:25 root@p43200 ~
# apt-get install udisks
Reading package lists... Done
Building dependency tree
Reading state information... Done
udisks is already the newest version.
udisks set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I did some more testing with a Canon PowerShot A570IS camera (USB
interface) just now:

1.  (Xfce XMouse?) -> Settings -> Removable Drives and Media -> Storage
-> Removable Storage -> all boxes unchecked.

2.  Open Thunar and Shotwell.

2.  Plug in Canon PowerShot A570IS camera via USB.  Camera does not
change to USB connected state.  No desktop icon.  Nothing in Thunar.
However, an entry appears for the camera in the left pane of Shotwell.

3.  Select camera in Shotwell.  Camera goes to USB connected state.
Shotwell accesses camera and displays thumbnails in right pane.  Nothing
on desktop.  Nothing in Thunar.


Therefore, something is broken for the Xfce desktop and Thunar -- I
expected a camera icon on the desktop and a camera entry in the left
pane of Thunar at steps #2 and #3.  Shotwell seems okay.


I also did some testing with two different USB flash drives and obtained
the same results:

1.  (Xfce Mouse?) -> Settings -> Removable Drives and Media -> Storage
-> Removable Storage -> all boxes unchecked.

2.  Open Thunar.

3.  Plug in USB flash drive.  Drive icon appears on desktop.  Drive
entry appears in left pane of Thunar.

4.  Desktop icon context menu has option to mount drive; don't invoke it.

5.  Select drive in left pane of Thunar.  Drive contents displayed in
right pane.

6.  Desktop icon context menu on desktop now has option to eject drive.


Therefore, everything seems to be working correctly with Xfce and Thunar
for USB flash drives.


I also did some testing on another Wheezy/Xfce machine with a Seagate
FreeAgent Xtreme external hard disk drive via USB and eSATA -- nothing
on desktop or in Thunar.


Therefore, it seems that whatever Xfce/ Debian/ Linux subsystem
underlies Thunar works for USB flash drives, but not for the camera or
for the external hard disk drive.


Another clue -- hot-plug for the external hard drive stoppled working
around Sept. 3, when I did a BIOS update.  I seem to recall a kernel
update around the same time.


David

#728065#30
Date:
2013-10-29 07:23:26 UTC
From:
To:
Actually, that's not a good test. Thunar only supports/shows USB Mass
Storage devices, which Canon cameras are not (they use some proprietary
canon protocol on USB mode, or PTP on PTP mode). You need to interface
with it using gphoto2, which is what Shotwell is actually doing.

Indeed.

This one is weird.

Can you check:

- if the USB drive is correctly seen by the kernel (shows in dmesg, can
be mounted manually)
- if the USB drive is correctly seen by udisks (I think it's someting
like udisks --dump, and udisks --monitor can help too).

Regards,

#728065#35
Date:
2013-10-30 04:26:51 UTC
From:
To:
I assume the explanation also applies to the Xfce desktop (?).


It would be nice if Xfce and Thunar supported Canon cameras.  We have
several, and I'm migrating our SOHO desktops to debian-7.2-i386-xfce.
Debian 7 installations:

1.  Intel D945GNT motherboard with fairly recent and lightly used
install of Debian 7 amd64 (system used for initial bug report) --
hotplug works correctly via both USB and Firewire.  (Machine does not
have eSATA port.)  This doesn't match my earlier findings.  I don't know
why.

2.  Intel D945GNT motherboard with fresh install (yesterday and today)
of Debian 7 i386 -- hotplug works correctly via both USB and Firewire.

3.  Intel DQ67SWB3 motherboard with older (December 2012, possibly
pre-Stable?) and heavily used install of Debian 7 amd64 -- hotplug works
correctly for USB, but fails for eSATA.

a.  Here are the diffs after the USB hotplug:

2013-10-29 21:04:32 dpchrist@p43200 ~/Data/dpchrist/bugs/debian/728065
$ diff 10-after-cold-boot-drive-disconnected/dmesg.out
11-after-hotplug-usb/dmesg.out
854a855,872
 > [  142.177800] usb 1-1.2: new high-speed USB device number 4 using
ehci_hcd
 > [  142.283381] usb 1-1.2: New USB device found, idVendor=0bc2,
idProduct=3101
 > [  142.283386] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
 > [  142.283389] usb 1-1.2: Product: FreeAgent Xtreme
 > [  142.283391] usb 1-1.2: Manufacturer: Seagate
 > [  142.283393] usb 1-1.2: SerialNumber: 2GER4Z7N
 > [  142.307367] Initializing USB Mass Storage driver...
 > [  142.307520] scsi10 : usb-storage 1-1.2:1.0
 > [  142.307621] usbcore: registered new interface driver usb-storage
 > [  142.307623] USB Mass Storage support registered.
 > [  143.306652] scsi 10:0:0:0: Direct-Access     Seagate  FreeAgent
XTreme 4115 PQ: 0 ANSI: 4
 > [  143.307594] sd 10:0:0:0: Attached scsi generic sg4 type 0
 > [  143.309489] sd 10:0:0:0: [sdd] 2930277168 512-byte logical blocks:
(1.50 TB/1.36 TiB)
 > [  143.310549] sd 10:0:0:0: [sdd] Write Protect is off
 > [  143.310553] sd 10:0:0:0: [sdd] Mode Sense: 1c 00 00 00
 > [  143.311799] sd 10:0:0:0: [sdd] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
 > [  143.321346]  sdd: sdd1
 > [  143.332451] sd 10:0:0:0: [sdd] Attached SCSI disk

2013-10-29 21:04:34 dpchrist@p43200 ~/Data/dpchrist/bugs/debian/728065
$ diff 10-after-cold-boot-drive-disconnected/udisks--dump.out
11-after-hotplug-usb/udisks--dump.out
582a583,688
 > Showing information for /org/freedesktop/UDisks/devices/sdd
 >   native-path:
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host10/target10:0:0/10:0:0:0/block/sdd
 >   device:                      8:48
 >   device-file:                 /dev/sdd
 >     presentation:              /dev/sdd
 >     by-id:                     /dev/disk/by-id/ata-ST31500341AS_6VS07GYW
 >     by-id:
/dev/disk/by-id/scsi-SSeagate_FreeAgent_XTrem_2GER4Z7N
 >     by-id:                     /dev/disk/by-id/wwn-0x5000c50011f4dc31
 >     by-path:
/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0
 >   detected at:                 Tue Oct 29 20:06:23 2013
 >   system internal:             0
 >   removable:                   0
 >   has media:                   1 (detected at Tue Oct 29 20:06:23 2013)
 >     detects change:            0
 >     detection by polling:      0
 >     detection inhibitable:     0
 >     detection inhibited:       0
 >   is read only:                0
 >   is mounted:                  0
 >   mount paths:
 >   mounted by uid:              0
 >   presentation hide:           0
 >   presentation nopolicy:       0
 >   presentation name:
 >   presentation icon:
 >   automount hint:
 >   size:                        1500301910016
 >   block size:                  512
 >   job underway:                no
 >   usage:
 >   type:
 >   version:
 >   uuid:
 >   label:
 >   partition table:
 >     scheme:                    mbr
 >     count:                     1
 >   drive:
 >     vendor:                    Seagate
 >     model:                     ST31500341AS
 >     revision:                  CC3H
 >     serial:                    6VS07GYW
 >     WWN:                       5000c50011f4dc31
 >     detachable:                1
 >     can spindown:              1
 >     rotational media:          Yes, at 7200 RPM
 >     write-cache:               enabled
 >     ejectable:                 0
 >     adapter:                   Unknown
 >     ports:
 >     similar devices:
 >     media:
 >       compat:
 >     interface:                 usb
 >     if speed:                  480000000 bits/s
 >     ATA SMART:                 Data not collected
 >
 > ========================================================================
 > Showing information for /org/freedesktop/UDisks/devices/sdd1
 >   native-path:
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host10/target10:0:0/10:0:0:0/block/sdd/sdd1
 >   device:                      8:49
 >   device-file:                 /dev/sdd1
 >     presentation:              /dev/sdd1
 >     by-id:
/dev/disk/by-id/ata-ST31500341AS_6VS07GYW-part1
 >     by-id:
/dev/disk/by-id/scsi-SSeagate_FreeAgent_XTrem_2GER4Z7N-part1
 >     by-id:
/dev/disk/by-id/wwn-0x5000c50011f4dc31-part1
 >     by-id:
/dev/disk/by-uuid/0e27bd82-0515-41d3-81cd-d14eeee30072
 >     by-path:
/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0-part1
 >   detected at:                 Tue Oct 29 20:06:23 2013
 >   system internal:             0
 >   removable:                   0
 >   has media:                   1 (detected at Tue Oct 29 20:06:23 2013)
 >     detects change:            0
 >     detection by polling:      0
 >     detection inhibitable:     0
 >     detection inhibited:       0
 >   is read only:                0
 >   is mounted:                  0
 >   mount paths:
 >   mounted by uid:              0
 >   presentation hide:           0
 >   presentation nopolicy:       0
 >   presentation name:
 >   presentation icon:
 >   automount hint:
 >   size:                        1500301909504
 >   block size:                  512
 >   job underway:                no
 >   usage:                       crypto
 >   type:                        crypto_LUKS
 >   version:                     1
 >   uuid:                        0e27bd82-0515-41d3-81cd-d14eeee30072
 >   label:
 >   partition:
 >     part of:                   /org/freedesktop/UDisks/devices/sdd
 >     scheme:                    mbr
 >     number:                    1
 >     type:                      0x83
 >     flags:
 >     offset:                    512
 >     alignment offset:          0
 >     size:                      1500301909504
 >     label:
 >     uuid:
 >
 > ========================================================================

b.  Here are the diffs after disconnecting USB:

2013-10-29 21:06:16 dpchrist@p43200 ~/Data/dpchrist/bugs/debian/728065
$ diff 11-after-hotplug-usb/dmesg.out 12-after-disconnecting-usb/dmesg.out
872a873,875
 > [  197.193601] usb 1-1.2: USB disconnect, device number 4
 > [  197.194698] sd 10:0:0:0: [sdd] Synchronizing SCSI cache
 > [  197.194738] sd 10:0:0:0: [sdd]  Result: hostbyte=DID_NO_CONNECT
driverbyte=DRIVER_OK

2013-10-29 21:06:16 dpchrist@p43200 ~/Data/dpchrist/bugs/debian/728065
$ diff 11-after-hotplug-usb/udisks--dump.out
12-after-disconnecting-usb/udisks--dump.out
583,688d582
< Showing information for /org/freedesktop/UDisks/devices/sdd
<   native-path:
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host10/target10:0:0/10:0:0:0/block/sdd
<   device:                      8:48
<   device-file:                 /dev/sdd
<     presentation:              /dev/sdd
<     by-id:                     /dev/disk/by-id/ata-ST31500341AS_6VS07GYW
<     by-id:
/dev/disk/by-id/scsi-SSeagate_FreeAgent_XTrem_2GER4Z7N
<     by-id:                     /dev/disk/by-id/wwn-0x5000c50011f4dc31
<     by-path:
/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0
<   detected at:                 Tue Oct 29 20:06:23 2013
<   system internal:             0
<   removable:                   0
<   has media:                   1 (detected at Tue Oct 29 20:06:23 2013)
<     detects change:            0
<     detection by polling:      0
<     detection inhibitable:     0
<     detection inhibited:       0
<   is read only:                0
<   is mounted:                  0
<   mount paths:
<   mounted by uid:              0
<   presentation hide:           0
<   presentation nopolicy:       0
<   presentation name:
<   presentation icon:
<   automount hint:
<   size:                        1500301910016
<   block size:                  512
<   job underway:                no
<   usage:
<   type:
<   version:
<   uuid:
<   label:
<   partition table:
<     scheme:                    mbr
<     count:                     1
<   drive:
<     vendor:                    Seagate
<     model:                     ST31500341AS
<     revision:                  CC3H
<     serial:                    6VS07GYW
<     WWN:                       5000c50011f4dc31
<     detachable:                1
<     can spindown:              1
<     rotational media:          Yes, at 7200 RPM
<     write-cache:               enabled
<     ejectable:                 0
<     adapter:                   Unknown
<     ports:
<     similar devices:
<     media:
<       compat:
<     interface:                 usb
<     if speed:                  480000000 bits/s
<     ATA SMART:                 Data not collected
<
< ========================================================================
< Showing information for /org/freedesktop/UDisks/devices/sdd1
<   native-path:
/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host10/target10:0:0/10:0:0:0/block/sdd/sdd1
<   device:                      8:49
<   device-file:                 /dev/sdd1
<     presentation:              /dev/sdd1
<     by-id:
/dev/disk/by-id/ata-ST31500341AS_6VS07GYW-part1
<     by-id:
/dev/disk/by-id/scsi-SSeagate_FreeAgent_XTrem_2GER4Z7N-part1
<     by-id:
/dev/disk/by-id/wwn-0x5000c50011f4dc31-part1
<     by-id:
/dev/disk/by-uuid/0e27bd82-0515-41d3-81cd-d14eeee30072
<     by-path:
/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0-part1
<   detected at:                 Tue Oct 29 20:06:23 2013
<   system internal:             0
<   removable:                   0
<   has media:                   1 (detected at Tue Oct 29 20:06:23 2013)
<     detects change:            0
<     detection by polling:      0
<     detection inhibitable:     0
<     detection inhibited:       0
<   is read only:                0
<   is mounted:                  0
<   mount paths:
<   mounted by uid:              0
<   presentation hide:           0
<   presentation nopolicy:       0
<   presentation name:
<   presentation icon:
<   automount hint:
<   size:                        1500301909504
<   block size:                  512
<   job underway:                no
<   usage:                       crypto
<   type:                        crypto_LUKS
<   version:                     1
<   uuid:                        0e27bd82-0515-41d3-81cd-d14eeee30072
<   label:
<   partition:
<     part of:                   /org/freedesktop/UDisks/devices/sdd
<     scheme:                    mbr
<     number:                    1
<     type:                      0x83
<     flags:
<     offset:                    512
<     alignment offset:          0
<     size:                      1500301909504
<     label:
<     uuid:
<
< ========================================================================

c.  Here are the diffs after eSATA hotplug:

2013-10-29 21:07:45 dpchrist@p43200 ~/Data/dpchrist/bugs/debian/728065
$ diff 12-after-disconnecting-usb/dmesg.out
13-after-hotplug-esata/dmesg.out

2013-10-29 21:07:51 dpchrist@p43200 ~/Data/dpchrist/bugs/debian/728065
$ diff 12-after-disconnecting-usb/udisks--dump.out
13-after-hotplug-esata/udisks--dump.out


So, it appears that the kernel is not seeing eSATA hotplug events (?).


I am in the process of preparing to wipe and rebuild the machine having
the eSATA problems.  I'll report when I have more information.


David

#728065#40
Date:
2013-10-30 07:58:12 UTC
From:
To:
Yes.

Afaik that's not possible on Wheezy.

On Jessie+, iirc, gphoto devices should appear in Thunar once they are
gio/gvfs-mounted, that has to be done manually or in thunar-volman (and
it's broken right now because of

The diffs are not really readable, but if the kernel doesn't see the
hotplug events, there's not much chance anything userland can do
anything, so it looks more like a kernel issue. It might help to try
with a more recent kernel (I assume you're using a stock Debian
kernel?).
Ok.

#728065#45
Date:
2013-10-30 19:45:08 UTC
From:
To:
Whenever I start using backports, using CPAN, hand compiling software,
etc., my systems start breaking.  So, I try to stick with stock Debian
Stable as much as possible.


David

#728065#50
Date:
2013-10-30 19:47:12 UTC
From:
To:
Indeed, it was just a matter of testing a more recent kernel, than
reverting.

Regards,

#728065#55
Date:
2013-11-01 17:00:54 UTC
From:
To:
USB hotplug is working.


eSATA hotplug is not working.  See console session, below.


External drive works if connected when system is booted.


David



# system:
#   Intel DQ67SW motherboard
#   Intel Core i7-2600S processor
#   debian-7.2.0-amd64-xfce-CD-1 installed with updates 10/31/2013
# external hard drive:
#   Seagate Free Agent XTreme 1.5 TB

# shutdown system
# disconnect and power down external drive
# wait 2+ minutes
# power up system
# power up external drive, but do not connect
# log in
# start Thunar
# wait 2+ minutes

root@i72600s:~# dmesg > dmesg-cold-boot.out
root@i72600s:~# udisks --dump > udisks--dump-cold-boot.out

# hot plug external drive via eSATA
# wait 2+ minutes
# desktop -- no icon for external drive
# Thunar -- nothing in side pane (shortcuts or tree), nothing in /mnt
#    or /media

root@i72600s:~# dmesg > dmesg-after-esata-hotplug.out
root@i72600s:~# udisks --dump > udisks--dump-after-esata-hotplug.out
root@i72600s:~# diff dmesg-cold-boot.out dmesg-after-esata-hotplug.out
root@i72600s:~# diff udisks--dump-cold-boot.out
udisks--dump-after-esata-hotplug.out

# shutdown system
# disconnect and power down external system
# wait 2+ minutes
# power up external drive
# wait 2+ minutes
# connect external drive via eSATA
# wait 2+ minutes
# power up system
# log in
# icon on desktop for external drive
# start Thunar -- entry in left pane for external drive (both shortcuts
#    and tree)
# browse drive using Thunar -- works