Bug 262462

Summary: DeviceNotifier doesn't detect mobile (Palm Pre) in storage mode (regression)
Product: [Unmaintained] solid Reporter: Lukáš Karas <lukas.karas>
Component: libsolid-udisksAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED DUPLICATE    
Severity: normal CC: lukas, robby.engelmann, wilderkde
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: udisk info, phone is connected in storage mode
patch for udisks backend of KDE solid library

Description Lukáš Karas 2011-01-07 22:52:54 UTC
Created attachment 55713 [details]
udisk info, phone is connected in storage mode

Version:           unspecified (using KDE 4.5.95) 
OS:                Linux

When I plug my phone (Palm Pre) into usb, I can switch it to storage mode. In previous versions of KDE (4.5.*) DeviceNotifier shows my phone normaly as plugged disk. Now, do nothing. Others devices works fine.

Reproducible: Always

Steps to Reproduce:
Plug phone via usb cable to pc, and select "USB Drive" mode.

Actual Results:  
Nothing chage in device notifier. 

Expected Results:  
Show new plugged device with standard actions.

<pre>karry@myKubuntu:~/data/tmp$ udisks --monitor-detail
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
added:     /org/freedesktop/UDisks/devices/sdb
Showing information for /org/freedesktop/UDisks/devices/sdb
  native-path:                 /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:5.2/host10/target10:0:0/10:0:0:0/block/sdb
  device:                      8:16
  device-file:                 /dev/sdb
    presentation:              /dev/sdb
    by-id:                     /dev/disk/by-id/usb-Palm_Pre_8f38e0d72fba6c02c52b74c75c55d9f8b2a5da5c-0:0
    by-path:                   /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.1:5.2-scsi-0:0:0:0
  detected at:                 Pá 7. leden 2011, 22:29:00 CET
  system internal:             0
  removable:                   1
  has media:                   0
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    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:           
  size:                        0
  block size:                  0
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  drive:
    vendor:                    Palm
    model:                     Pre
    revision:                  0000
    serial:                    8f38e0d72fba6c02c52b74c75c55d9f8b2a5da5c
    WWN:                       
    detachable:                1
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 0
    adapter:                   Unknown
    ports:
    similar devices:
    media:                     
      compat:                 
    interface:                 usb
    if speed:                  480000000 bits/s
    ATA SMART:                 not available



changed:     /org/freedesktop/UDisks/devices/sdb
Showing information for /org/freedesktop/UDisks/devices/sdb
  native-path:                 /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:5.2/host10/target10:0:0/10:0:0:0/block/sdb
  device:                      8:16
  device-file:                 /dev/sdb
    presentation:              /dev/sdb
    by-id:                     /dev/disk/by-id/usb-Palm_Pre_8f38e0d72fba6c02c52b74c75c55d9f8b2a5da5c-0:0
    by-id:                     /dev/disk/by-uuid/B504-CAE6
    by-path:                   /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.1:5.2-scsi-0:0:0:0
  detected at:                 Pá 7. leden 2011, 22:29:00 CET
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Pá 7. leden 2011, 22:29:29 CET)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    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:           
  size:                        7180648448
  block size:                  512
  job underway:                no
  usage:                       filesystem
  type:                        vfat
  version:                     FAT32
  uuid:                        B504-CAE6
  label:                       PALM PRE
  drive:
    vendor:                    Palm
    model:                     Pre
    revision:                  0000
    serial:                    8f38e0d72fba6c02c52b74c75c55d9f8b2a5da5c
    WWN:                       
    detachable:                1
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 0
    adapter:                   Unknown
    ports:
    similar devices:
    media:                     
      compat:                 
    interface:                 usb
    if speed:                  480000000 bits/s
    ATA SMART:                 not available


</pre>
Comment 1 Jacopo De Simoi 2011-01-08 08:49:11 UTC
Does it show up in the dolphin sidebar pane?
Comment 2 Lukáš Karas 2011-01-08 12:17:46 UTC
(In reply to comment #1)
> Does it show up in the dolphin sidebar pane?

No, Dolphin ignore this device too. Is any way how to get more debug info?
Comment 3 Robby Engelmann 2011-01-08 12:21:14 UTC
I can confirm this behaviour for the N900 storage mode. Here device notifier
and Places in Dolphin do not show up the plugged in device after putting in
storage mode. A lsusb shows the device.

Plugging before starting the notebook works and it appears in the Notifier and
Dolphin.
Comment 4 Lukáš Karas 2011-01-08 13:04:57 UTC
Yes, it is in Notifier after logout and login again... When I manually call eject (udisks --eject /dev/sdb), my phone switch off storage mode, but it is still in Notifier. 

Can someone try reproduce this bug with usb cdrom?
Comment 5 Lukáš Karas 2011-01-16 20:19:33 UTC
Created attachment 56101 [details]
patch for udisks backend of KDE solid library

Udisks backend of KDE solid library don't envisage that removable devices can be inserted without property "DeviceIsOpticalDisc", like mobile phones. This patch solve this problem.

But this patch isn't perfect. It needs review from someone who understand this code perfectly.
Comment 6 Lukáš Karas 2011-01-16 20:33:03 UTC
Next unsolved problem is that I can call "eject" (udisks --eject /dev/sdb) on my phone - it switch off storage mode and it can recieve calls/sms(...) again.

But DeviceNotifier call eject command only on OpticalDrives. What is good way? Emulate phones like OpticalDrive (in solid) or modify DeviceNotifier?
Comment 7 Lukáš Tinkl 2011-01-17 13:41:07 UTC
Sorry, the patch doesn't make sense :) It marks every removable media as being optical
Comment 8 Lukáš Tinkl 2011-01-17 13:53:52 UTC

*** This bug has been marked as a duplicate of bug 262808 ***