After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687525 - gvfs causes filemanagers to show partitions twice
gvfs causes filemanagers to show partitions twice
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
1.14.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-03 17:03 UTC by Christian
Modified: 2012-11-23 19:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian 2012-11-03 17:03:52 UTC
After updating gvfs from 1.12.3 to 1.14.0 filemanagers thunar and pcmanfm showing internal and external partitions twice. For thunar there is already a workaround available, developers of pcmanfm blaming gvfs causing this issue.

Thunar forum thread
http://forum.xfce.org/viewtopic.php?pid=27873

Pcmanfm bug report
https://sourceforge.net/tracker/?func=detail&aid=3582823&group_id=156956&atid=801864

Archlinux bug report
https://bugs.archlinux.org/task/32325
Comment 1 Tomas Bzatek 2012-11-05 11:01:52 UTC
(In reply to comment #0)
> After updating gvfs from 1.12.3 to 1.14.0 filemanagers thunar and pcmanfm
> showing internal and external partitions twice. 

Please post output of gvfs-mount -li here.

> For thunar there is already a workaround available

Could you please post the workaround solution here? Linking to external sources doesn't work as we want to keep all information within this bugzilla.
Comment 2 Christian 2012-11-05 20:24:15 UTC
I don't know how the workaround looks like. The problem is according thunar "it (gvfs) emits a signal volumes-added + list_volumes, doubles the volumes"

Here is the output of gvfs-mount -li:

Drive(0): 250 GB Hard Disk
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
  ids:
   unix-device: '/dev/sda'
  themed icons:  [drive-harddisk]  [drive]
  symbolic themed icons:  [drive-removable-media-symbolic]  [drive-removable-media]  [drive-removable]  [drive]
  is_media_removable=0
  has_media=1
  is_media_check_automatic=1
  can_poll_for_media=0
  can_eject=0
  can_start=0
  can_stop=0
  start_stop_type=unknown
  sort_key=00coldplug/00fixed/sd____a
  Volume(0): 25 GB Volume
    Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
    ids:
     class: 'device'
     unix-device: '/dev/sda5'
     uuid: 'bd94fc1d-de29-4944-8a94-863e02bcc54a'
    themed icons:  [drive-harddisk]  [drive]
    symbolic themed icons:  [folder-remote-symbolic]  [folder-remote]  [folder]
    can_mount=1
    can_eject=0
    should_automount=0
    sort_key=gvfs.time_detected_usec.1352146600750219
  Volume(1): 115 GB Volume
    Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
    ids:
     class: 'device'
     unix-device: '/dev/sda1'
     uuid: 'F064B69664B65ED2'
    themed icons:  [drive-harddisk]  [drive]
    symbolic themed icons:  [folder-remote-symbolic]  [folder-remote]  [folder]
    can_mount=1
    can_eject=0
    should_automount=0
    sort_key=gvfs.time_detected_usec.1352146600750527
Drive(1): CD/DVD Drive
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
  ids:
   unix-device: '/dev/sr0'
  themed icons:  [drive-optical]  [drive]
  symbolic themed icons:  [drive-removable-media-symbolic]  [drive-removable-media]  [drive-removable]  [drive]
  is_media_removable=1
  has_media=0
  is_media_check_automatic=1
  can_poll_for_media=0
  can_eject=1
  can_start=0
  can_stop=0
  start_stop_type=unknown
  sort_key=00coldplug/11removable/sr0
Comment 3 A.G. 2012-11-05 21:55:09 UTC
I am current developer of libfm. Unfortunately I cannot give you any additional info since I don't have 0.14 installed and I don't know any way to emulate removable media mounts under qemu. I hope you can fix it so no workaround will be required (workarounds aren't good way, you know, as they make application more slow). Thank you very much.
Comment 4 Evangelos Foutras 2012-11-06 00:42:41 UTC
I believe the following illustrates problem:

$ gvfs-mount -o
Monitoring events. Press Ctrl+C to quit.
Drive connected:    '250 GB Hard Disk'
Drive connected:    'CD/DVD Drive'

(The two "Drive connected" events are emitted right away.)

In other words, when we connect to the volume monitor, we get volume-added events for preexisting volumes. If I remember correctly, this did not occur with GVFS 1.12.

The workaround in Thunar is to short circuit the "volume-added" event handler if the volume is already known to us:

http://git.xfce.org/xfce/thunar/commit/?id=70a4301

What was happening without the above patch is that existing volumes would be added to Thunar after it called g_volume_monitor_get_volumes() on startup, and then it'd also get "volume-added" events for the same volumes, thus duplicating the displayed volumes.
Comment 5 Tomas Bzatek 2012-11-06 10:24:58 UTC
Seems like http://git.gnome.org/browse/gvfs/commit/?id=ca7743a63721c3dd1c166006539e356412466dcc to me. Perhaps we should include it in a stable release. Please test if it fixes your issue.
Comment 6 Evangelos Foutras 2012-11-06 11:05:23 UTC
That commit seems to fix this issue; 'gvfs-mount -o' output remains blank right after it's started and an non-patched Thunar doesn't duplicate a USB drive I have plugged in.

Including the fix in a stable release would be great. If a new patch release can' be made very soon, please let us know so we can patch our GVFS package in Arch for the time being.

Thanks.
Comment 7 Tomas Bzatek 2012-11-12 16:19:42 UTC
Cherry-picked to gnome-3-6, will be released soon as 1.14.2