GNOME Bugzilla – Bug 536601
Shows multiple devices for single device
Last modified: 2009-03-10 14:31:48 UTC
When plugged in, the Sony Ericsson k850i shows 2 devices: Volume(1): Sony Ericsson Mobile Communications AB Sony Ericsson Phone Volume(2): Sony Ericsson Mobile Communications AB Sony Ericsson Phone But clicking on the first one will actually mount the second one (an error pops up: "Unable to mount location - Internal error: No mount object for mounted volume"). Probably because the device has both the camera and the audio player info.capabilities: camera, portable_audio_player, portable_audio_player, camera, access_control, access_control
Note that the icons are all fubared as well: - item one is a media player - item two is a media player when unmounted Once mounted: - item one is a media player - item two is a camera - cluebar in the mount offers me to open the player in Rhythmbox (These files are on a digital audio player)
please attach lshal output
The relevant lshal output, only one device showing up: udi = '/org/freedesktop/Hal/devices/usb_device_fce_75_3518290204901700' info.bus = 'usb_device' (string) info.linux.driver = 'usb' (string) info.parent = '/org/freedesktop/Hal/devices/usb_device_424_2504_noserial' (string) info.product = 'Sony Ericsson Phone' (string) info.subsystem = 'usb_device' (string) info.udi = '/org/freedesktop/Hal/devices/usb_device_fce_75_3518290204901700' (string) info.vendor = 'Sony Ericsson Mobile Communications AB' (string) linux.device_file = '/dev/bus/usb/001/020' (string) linux.hotplug_type = 2 (0x2) (int) linux.subsystem = 'usb' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.3' (string) usb_device.bus_number = 1 (0x1) (int) usb_device.can_wake_up = false (bool) usb_device.configuration = 'MTP Device' (string) usb_device.configuration_value = 4 (0x4) (int) usb_device.device_class = 0 (0x0) (int) usb_device.device_protocol = 0 (0x0) (int) usb_device.device_revision_bcd = 0 (0x0) (int) usb_device.device_subclass = 0 (0x0) (int) usb_device.is_self_powered = false (bool) usb_device.linux.device_number = 20 (0x14) (int) usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.3' (string) usb_device.max_power = 500 (0x1f4) (int) usb_device.num_configurations = 1 (0x1) (int) usb_device.num_interfaces = 1 (0x1) (int) usb_device.num_ports = 0 (0x0) (int) usb_device.product = 'Sony Ericsson Phone' (string) usb_device.product_id = 117 (0x75) (int) usb_device.serial = '3518290204901700' (string) usb_device.speed = 480.0 (480) (double) usb_device.vendor = 'Sony Ericsson Mobile Communications AB' (string) usb_device.vendor_id = 4046 (0xfce) (int) usb_device.version = 2.0 (2) (double) udi = '/org/freedesktop/Hal/devices/usb_device_fce_75_3518290204901700_if0' access_control.file = '/dev/bus/usb/001/020' (string) access_control.type = 'audio-player' (string) camera.access_method = 'ptp' (string) camera.libgphoto2.name = 'USB PTP Class Camera' (string) camera.libgphoto2.support = true (bool) info.bus = 'usb' (string) info.callouts.add = {'hal-acl-tool --add-device'} (string list) info.callouts.remove = {'hal-acl-tool --remove-device'} (string list) info.capabilities = {'camera', 'portable_audio_player', 'portable_audio_player', 'camera', 'access_control', 'access_control'} (string list) info.category = 'camera' (string) info.parent = '/org/freedesktop/Hal/devices/usb_device_fce_75_3518290204901700' (string) info.product = 'K850i' (string) info.subsystem = 'usb' (string) info.udi = '/org/freedesktop/Hal/devices/usb_device_fce_75_3518290204901700_if0' (string) info.vendor = 'SonyEricsson' (string) linux.hotplug_type = 2 (0x2) (int) linux.subsystem = 'usb' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.3/1-1.3:4.0' (string) portable_audio_player.access_method = 'user' (string) portable_audio_player.access_method.drivers = {'libmtp'} (string list) portable_audio_player.access_method.protocols = {'mtp'} (string list) portable_audio_player.libmtp.protocol = 'mtp' (string) portable_audio_player.output_formats = {'audio/mpeg', 'audio/x-ms-wma', 'audio/mpeg'} (string list) usb.bus_number = 1 (0x1) (int) usb.can_wake_up = false (bool) usb.configuration = 'MTP Device' (string) usb.configuration_value = 4 (0x4) (int) usb.device_class = 0 (0x0) (int) usb.device_protocol = 0 (0x0) (int) usb.device_revision_bcd = 0 (0x0) (int) usb.device_subclass = 0 (0x0) (int) usb.interface.class = 6 (0x6) (int) usb.interface.description = 'Sony Ericsson Sony Ericsson Phone' (string) usb.interface.number = 0 (0x0) (int) usb.interface.protocol = 1 (0x1) (int) usb.interface.subclass = 1 (0x1) (int) usb.is_self_powered = false (bool) usb.linux.device_number = 20 (0x14) (int) usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.3/1-1.3:4.0' (string) usb.max_power = 500 (0x1f4) (int) usb.num_configurations = 1 (0x1) (int) usb.num_interfaces = 1 (0x1) (int) usb.num_ports = 0 (0x0) (int) usb.product = 'USB Imaging Interface' (string) usb.product_id = 117 (0x75) (int) usb.serial = '3518290204901700' (string) usb.speed = 480.0 (480) (double) usb.vendor = 'Sony Ericsson Mobile Communications AB' (string) usb.vendor_id = 4046 (0xfce) (int) usb.version = 2.0 (2) (double)
The problem is in update_cameras() in ghalvolumemonitor.c Because the device is both a camera and an audio player, we end up with multiple mounts for the same device. We should: - remove duplicates from one of the lists - make sure dual-functionality devices show up as the primary function (ie. camera with media player functionality still shows up as camera, phones show up as phones) but how? - nautilus_window_show_x_content_bar() in src/nautilus-window-manage-views.c already seems to be able to handle devices being multi-functional
Created attachment 112144 [details] [review] Don't add duplicate devices Tested with the device causing problems, works fine here (needed to restart a few daemons/programs that open the hal monitor module).
Comment on attachment 112144 [details] [review] Don't add duplicate devices Looks good to commit.
Committed to trunk. 2008-06-04 Bastien Nocera <hadess@hadess.net> * hal/ghalvolumemonitor.c (update_cameras): Don't add devices that are both audio players and cameras twice, as it causes 1) error messages when plugging in (it tries to mount the device another time) 2) weird behaviour in nautilus' computer:/ (See #536601) What about the icon problem?
so... for multi storage heads, I want two GVolume objects (from the volume monitor).. and two GMount objects... so we need to a) teach the volume monitor about the fact that a single USB interface using the gphoto2 user space driver can result in two GVolume objects - so we need the volume monitor need to link with gphoto2 - to avoid library pollution, we need to move the volume monitor out of process - which we want to do anyway, see bug 520132 b) make sure a single mount daemon instance can drive two GMounts - this is a technical necessity due to how gphoto2 works - don't think this works yet; see the comments in the gphoto2 backend source
Am I right to assume that this bug is the reason why Banshee detects my Sony NWZ-S616F twice giving me a message complaining that it can handle only one device at the same time? This device also shows twice in "lshal" because it can be used both as a MTP device and a USB mass storage device.
(In reply to comment #9) > Am I right to assume that this bug is the reason why Banshee detects my Sony > NWZ-S616F twice giving me a message complaining that it can handle only one > device at the same time? > > This device also shows twice in "lshal" because it can be used both as a MTP > device and a USB mass storage device. No, that wouldn't be the same problem. The problem in question was the same device with 2 capabilities being handled twice. Yours should show up as 2 different devices.
I arrived here via https://bugs.launchpad.net/nautilus/+bug/76283 and have a possibly-irrelevant question, like Rafael's. Asking anyway! I have an Acer Aspire One with a SDHC slot, and an SDHC card with one ext2 partition on it. Nautilus displays the SDHC card twice; one entry can be mounted and unmounted and accessed without difficulty; the other gives an error when trying to mount: Unable to mount volume Details: mount: wrong fs type, bad option, bad superblock on /dev/mmcblk1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail ...which gives me: [ 3074.217027] mmc0: new SDHC card at address b368 [ 3079.560177] mmcblk0: mmc0:b368 SD16G 15694336KiB [ 3079.563461] mmcblk0: p1 [ 3080.049199] EXT2-fs error (device mmcblk0): ext2_check_descriptors: Block bitmap for group 1 not in group (block 0)! [ 3080.049225] EXT2-fs: group descriptors corrupted! I also attach some of the output of lshal, the parts that seem relevant. Some seem to relate to another multi-purpose slot that I am not using.
Created attachment 125461 [details] lshal output for doubly-displayed SDHC
Paul, again, it has nothing to do with the original problem. I believe this problem should be fixed now, I'll reopen if not.