FS#38933 - [gvfs] udisks2 automount not working

Attached to Project: Arch Linux
Opened by Robert Orzanna (orschiro) - Sunday, 16 February 2014, 08:16 GMT
Last edited by Jan de Groot (JGC) - Friday, 12 September 2014, 14:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Whenever I plug in an external media, such as external USB drives or SD cards, they are not mounted automatically.

/usr/lib/gvfs/gvfs-udisks2-volume-monitor reports:

### debug: in handle_list
### debug: emit_signal: 0x1835510
### debug: emit_signal: 0x185db30
### debug: emit_signal: 0x1835510
### debug: emit_signal: 0x1835470
### debug: emit_signal: 0x185dc30
### debug: emit_signal: 0x1835470
### debug: in handle_supported
### debug: in handle_list
### debug: emit_signal: 0x185dd30
### debug: emit_signal: 0x185dd30
### debug: emit_signal: 0x18355b0
### debug: in handle_supported
### debug: in handle_list
### debug: Name owner ':1.130' vanished
### debug: in handle_supported
### debug: in handle_list
### debug: Name owner ':1.132' vanished

I am launching Openbox via startx.

dbus is running:

root 383 0.0 0.0 124796 3820 ? Ssl 06:25 0:00 /usr/bin/thermald --no-daemon --dbus-enable
dbus 389 0.0 0.0 27128 2004 ? Ss 06:25 0:07 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
orschiro 963 0.0 0.0 15896 616 tty1 S 06:26 0:00 dbus-launch --sh-syntax --exit-with-session
orschiro 964 0.0 0.0 27052 1708 ? Ss 06:26 0:01 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
orschiro 1271 0.0 0.0 17992 540 ? S 06:27 0:00 dbus-launch --autolaunch e8b37a474b614e438a0ab6a142101c2c --binary-syntax --close-stderr
orschiro 1272 0.0 0.0 26664 1204 ? Ss 06:27 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
orschiro 2136 0.0 0.0 26664 1584 ? S 06:29 0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3

Additional info:

gvfs 1.18.3-3
udisks2 2.1.1-3
dbus 1.8.0-1

Steps to reproduce:

1. Plugin external media
2. check in /run/media/USER that media is not mounted
This task depends upon

Closed by  Jan de Groot (JGC)
Friday, 12 September 2014, 14:47 GMT
Reason for closing:  Fixed
Comment by Jan de Groot (JGC) - Sunday, 16 February 2014, 10:17 GMT
You have several dbus session bus processes running, so something is wrong anyways. Besides that, this is probably an issue with polkit and/or pam_systemd. If you're not authorized to use removable devices, they will not automount either.
Comment by Robert Orzanna (orschiro) - Sunday, 16 February 2014, 12:33 GMT
@Jan

The only way I am starting dbus is in my .xinitrc:

if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi

Interestingly I just tried a small (8GB) removable USB pen drive. It gets mounted automatically. Yet the SD card and 1TB external USB disk is not automounted. Error message from inserting the SD card:

Feb 16 13:28:38 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.66' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.68' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.71' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.73' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.76' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.78' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: emit_signal: 0x134e840
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.80' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_supported
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.82' vanished
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in handle_list
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: emit_signal: 0x134e840
Feb 16 13:28:39 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: emit_signal: 0x12f9470
Feb 16 13:29:13 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.15' vanished
Comment by Robert Orzanna (orschiro) - Sunday, 16 February 2014, 12:43 GMT
Once the SD card is mounted, I get this:

Feb 16 13:38:34 thinkpad udisksd[1533]: Mounted /dev/sdc1 at /run/media/orschiro/304B-96DE on behalf of uid 1000
Feb 16 13:38:34 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: emit_signal: 0x133f3a0
Feb 16 13:38:34 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /run/media/orschiro/304B-96DE/BDMV/index.bdmv
Feb 16 13:38:34 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /run/media/orschiro/304B-96DE/BDMV/BACKUP/index.b
Feb 16 13:38:34 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: in volume_mount_cb
Feb 16 13:38:34 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: success
Feb 16 13:38:44 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.127' vanished
Feb 16 13:42:00 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.105' vanished
Feb 16 13:42:13 thinkpad org.gtk.Private.UDisks2VolumeMonitor[851]: ### debug: Name owner ':1.129' vanished

A conflict with libbluray?
Comment by AndrzejL (AndrzejL) - Tuesday, 18 February 2014, 22:00 GMT
Hi there!

I will allow myself to join this bug report since I was "attacked" by this bug as well.

https://bbs.archlinux.org/viewtopic.php?id=176294

Kind regards.

Andrzej
Comment by Jan de Groot (JGC) - Wednesday, 19 February 2014, 11:13 GMT
Can you attach output of dmesg when attaching a USB device or inserting an SD card?

I don't think libbluray is related at all: it scans the mounted device to see if there's a bluray index file, but it's quite chatty when doing so.

Also note that I updated udisks2 to a git snapshot a few days ago, so please post which udisks2 version you're using.
Comment by AndrzejL (AndrzejL) - Wednesday, 19 February 2014, 12:45 GMT
Hi Jan.

I think You may be right - yes. I had the exact same error messages as You can see in my forum thread and yet KDE4 + device notifier successfully mounted the devices. Its weird. However there is something dodgy happening when devices are being plugged in - I have compiled my own (thanks to korn36) gvfs and the error messages are gone. I don't know what to tell You exactly but I am betting information provided in my forum posts could be of interest.

Cheers.

Andrzej
Comment by Jan de Groot (JGC) - Wednesday, 19 February 2014, 13:35 GMT
The bluray "errors" are unrelated to this bug, they're harmless anyways, as it's just libbluray trying to scan for index files after mounting. Using google on that error shows the message on each and every media player which utilizes libbluray.
Comment by AndrzejL (AndrzejL) - Wednesday, 19 February 2014, 14:22 GMT
I understand that kind sir. However the rest of the errors (unrelated to libbluray) only appears if the index.bdvm bluray message shows up in the journal / dmesg and when its gone the issue is gone too. I understand that libbluray is doing what its suppose to be doing and something else (gvfs) is pushing it towards "misbehaving". I suppose its the way gvfs utilizes libbluray as its helper may cause issues on certain machines... but I am far from being expert in any way so...

Thanks again for looking into it.

Kind regards.

Andrzej
Comment by AndrzejL (AndrzejL) - Wednesday, 19 February 2014, 21:51 GMT
I think You were right and I was wrong...

http://pastebin.com/GcXNAcnY < journal and dmesg

libbluray messages are gone but there is something not entirely right with the mounting / unmounting... The drive is automounting alright but its not clean. I will try to reboot and see if this is something that happens right away after reboot.

Kind regards and thanks again for Your help.

Andrzej
Comment by AndrzejL (AndrzejL) - Wednesday, 19 February 2014, 22:00 GMT
So the segfault happens randomly but...

http://pastebin.com/CRCV6yDe

Cheers...

Andrzej
Comment by Robert Orzanna (orschiro) - Thursday, 20 February 2014, 07:32 GMT
Inserting the SD card:

[ 7303.132753] ehci-pci 0000:00:1d.7: setting latency timer to 64
[ 7303.342741] usb 8-6: new high-speed USB device number 3 using ehci-pci
[ 7303.481937] usb-storage 8-6:1.0: USB Mass Storage device detected
[ 7303.482657] scsi6 : usb-storage 8-6:1.0
[ 7304.486801] scsi 6:0:0:0: Direct-Access RICOH R5U880FlashMedia 0000 PQ: 0 ANSI: 2
[ 7304.627321] sd 6:0:0:0: [sdb] 1002496 512-byte logical blocks: (513 MB/489 MiB)
[ 7304.628145] sd 6:0:0:0: [sdb] Write Protect is off
[ 7304.628149] sd 6:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[ 7304.628903] sd 6:0:0:0: [sdb] No Caching mode page found
[ 7304.628907] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 7304.632794] sd 6:0:0:0: [sdb] No Caching mode page found
[ 7304.632799] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 7304.634302] sdb: sdb1
[ 7304.638029] sd 6:0:0:0: [sdb] No Caching mode page found
[ 7304.638033] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 7304.638037] sd 6:0:0:0: [sdb] Attached SCSI removable disk


Inserting the 1TB USB drive:

[ 7413.182742] ehci-pci 0000:00:1d.7: setting latency timer to 64
[ 7413.392719] usb 8-1: new high-speed USB device number 4 using ehci-pci
[ 7413.517997] usb-storage 8-1:1.0: USB Mass Storage device detected
[ 7413.518512] scsi7 : usb-storage 8-1:1.0
[ 7414.520154] scsi 7:0:0:0: Direct-Access WD 10EAVS External 1.05 PQ: 0 ANSI: 4
[ 7414.521763] sd 7:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[ 7414.523673] sd 7:0:0:0: [sdb] Write Protect is off
[ 7414.523679] sd 7:0:0:0: [sdb] Mode Sense: 21 00 00 00
[ 7414.525163] sd 7:0:0:0: [sdb] No Caching mode page found
[ 7414.525168] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 7414.529034] sd 7:0:0:0: [sdb] No Caching mode page found
[ 7414.529039] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 7414.550675] sdb: sdb1
[ 7414.554197] sd 7:0:0:0: [sdb] No Caching mode page found
[ 7414.554203] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 7414.554207] sd 7:0:0:0: [sdb] Attached SCSI disk

pacman -Q | grep udisks2:

udisks2 2.1.2-1

What else can I provide you?
Comment by Robert Orzanna (orschiro) - Friday, 28 February 2014, 07:41 GMT
Just to add on this. If I additionally install udiskie and run it with `udiskie -2` (-2 for udisks2 support), then my external 1TB drive gets automounted correctly:

Feb 28 08:38:37 thinkpad udisksd[13120]: Mounted /dev/sdc1 at /run/media/orschiro/2aac80d3-3f44-41dc-9f99-18f251d518dd on behalf of uid 1000
Comment by Jan de Groot (JGC) - Friday, 28 February 2014, 11:25 GMT
Well, that makes sense... gvfs is not responsible for automounting. It's a daemon/subsystem that allows applications to mount things, but it has no automount policy itself. On GNOME desktops, gvfs receives the information about devices and passes it to nautilus or gnome-shell, which in turn automounts the device when asked to do so.

You can use udiskie, nautilus, pcmanfm, or even setup udev rules to do the automounting for you.

Comment by Robert Orzanna (orschiro) - Friday, 28 February 2014, 14:04 GMT
Thanks Jan. In that case it is definitely a problem with Thunar because I used to use thunar-volman for automounting which apparently refuses to automount large USB drives > 1TB and SD cards.
Comment by Jan de Groot (JGC) - Monday, 03 March 2014, 07:38 GMT
thunar-volman comes with configuration where you can specify what to mount, so probably automounting of external drives and sd-cards is not enabled there.
Comment by Robert Orzanna (orschiro) - Thursday, 06 March 2014, 07:37 GMT
Nope. I enabled all checkboxes but did not the trick.

These people face similar issues and used an additional polkit rule. However, I am not sure whether it also allows automounting for them.

At least for me, adding the polkit rule does not bring automounting functionality.

https://bbs.archlinux.org/viewtopic.php?id=177955

https://bbs.archlinux.org/viewtopic.php?id=177229

Loading...