Sugar does not see/mount USB Flash drive

Bug #297338 reported by mungewell
2
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Undecided
Unassigned
sugar (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: sugar

When inserted a USB Flash key is not seen by Sugar/Sugar-Emulator (it should show up the bottom bar of Journal, see http://en.flossmanuals.net/Sugar/BackingUp), instead the USB Flash drive is mounted by the underlying OS.

At a (wild) guess there will need to be some HAL tinkering to ensure that Sugar gets notified and the underlying OS does not.
Mungewell.

Revision history for this message
Luke Faraone (lfaraone) wrote : Re: [Bug 297338] [NEW] Sugar does not see/mount USB Flash drive

> At a (wild) guess there will need to be some HAL tinkering to ensure that
> Sugar gets notified and the underlying OS does not.

The OS should still automount, as this is what happens on the XO. In
addition to this, sugar should detect the mounting and add the device
to the journal.

Revision history for this message
mungewell (simon-mungewell) wrote :

After lfaraone said it worked for him, I tried a few couple of different USB sticks, both worked OK but the original one still failed.

Lexar 1GByte - worked, mounted first partition of 2 (sdb1 = VFAT) and displayed the contents of /media/LEXAR/syslinux (yes this is a Fedora bootable USB of Sugar ;-)
Unbranded 2GByte - worked, mounted first partition of 2 (sdb1 = VFAT) and displayed the contents of /media/live/casper (bootable Ubuntu Sugar)
Sandisk Cruzer 4GByte - failed. 1 partition (sdb1 = VFAT), USB-ID 0x0781:5406

Maybe this is just a problem with larger size USB drives, or with Sandisk specifically.
Simon.

Revision history for this message
mungewell (simon-mungewell) wrote :

Couple of points

1). I am an idiot. The Sandisk is only 512MByte version, so it unlikely to be an issue with large disks.

2). If I insert a 'working' USB key with sugar-emulator running it is sometimes mounted UID=1000 (my user ID) and sometimes mounted UID=500. There seems to be a race condition here somewhere. Regardless of UID it appears in the Journal.

3) The Sandisk shows the same 500/1000 issue with sugar-emulator, but still doesn't appear in the Journal.

4) Without Sugar-emulator running they both always (so far) mount as UID=1000.

Simon.

Revision history for this message
mungewell (simon-mungewell) wrote :
Download full text (5.0 KiB)

UID 500/1000 issue spun off as seperate bug
https://bugs.launchpad.net/ubuntu/+source/sugar-journal-activity/+bug/297479

Sandisk HAL listing does not include the correct HAL properties, and thus fails the test in /usr/share/activities/Journal.activity/volumesmanager.py
--
        # Ignore volumes without a filesystem.
        if device.GetProperty('volume.fsusage') != 'filesystem':
            return False
--

hal-device listing for Sandisk (USB-ID 0x0781:5406)
--
6: udi = '/org/freedesktop/Hal/devices/usb_device_781_5406_0000060423032262'
  usb_device.vendor = 'SanDisk Corp.' (string)
  usb_device.bus_number = 1 (0x1) (int)
  usb_device.product = 'Cruzer Micro 1/4GB Flash Drive' (string)
  linux.device_file = '/dev/bus/usb/001/002' (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1' (string)
  info.subsystem = 'usb_device' (string)
  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1'
 (string)
  usb_device.device_revision_bcd = 16 (0x10) (int)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_1d_0' (
string)
  usb_device.configuration_value = 1 (0x1) (int)
  info.vendor = 'SanDisk Corp.' (string)
  info.product = 'Cruzer Micro 1/4GB Flash Drive' (string)
  usb_device.max_power = 100 (0x64) (int)
  usb_device.num_configurations = 1 (0x1) (int)
  usb_device.num_ports = 0 (0x0) (int)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_781_5406_0000060423032262'
  (string)
  info.linux.driver = 'usb' (string)
  usb_device.num_interfaces = 1 (0x1) (int)
  usb_device.linux.device_number = 2 (0x2) (int)
  usb_device.device_class = 0 (0x0) (int)
  usb_device.serial = '0000060423032262' (string)
  linux.hotplug_type = 2 (0x2) (int)
  usb_device.device_subclass = 0 (0x0) (int)
  usb_device.speed = 12 (double)
  linux.subsystem = 'usb' (string)
  usb_device.device_protocol = 0 (0x0) (int)
  usb_device.version = 2 (double)
  usb_device.vendor_id = 1921 (0x781) (int)
  usb_device.is_self_powered = false (bool)
  usb_device.product_id = 21510 (0x5406) (int)
  usb_device.can_wake_up = false (bool)
--

By contrast the LEXAR device has it
--
7: udi = '/org/freedesktop/Hal/devices/volume_label_LEXAR'
  linux.hotplug_type = 3 (0x3) (int)
  info.product = 'LEXAR' (string)
  info.capabilities = { 'volume', 'block', 'access_control' } (string list)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_LEXAR_JD_FIREFLY_106A6612145843130507_0_0' (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_label_LEXAR' (string)
  volume.fstype = 'vfat' (string)
  access_control.file = '/dev/sdb1' (string)
  volume.fsusage = 'filesystem' (string)
  access_control.type = 'removable-block' (string)
  volume.fsversion = 'FAT16' (string)
  info.callouts.add = { 'hal-acl-tool --add-device' } (string list)
  volume.uuid = '' (string)
  info.callouts.remove = { 'hal-acl-tool --remove-device' } (string list)
  volume.label = 'LEXAR' (string)
  volume.mount_point = '/media/LEXAR' (string)
  volume.is_mounted = true (bool)
  volume.is_mounted_read_only = false (bool)
  volume.linux.is_device_mapper = false (bool)
  volume.is_d...

Read more...

Revision history for this message
Luke Faraone (lfaraone) wrote :

This is most likely a HAL problem.

Changed in sugar:
status: New → Invalid
Revision history for this message
dino99 (9d9) wrote :
Changed in hal (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.