kde4 and device-notifier

Hi all

When I plug in an usb stick i see it in dmesg and can verify that hald recognizes it (by running it with verbose output), however the device-notifier in kde4 does not respond.

Hope anyone can help me.

Thanks in advance
Troels Kofoed Jacobsen

I have in /usr/local/etc/PolicyKit/PolicyKit:
Code:
<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="wheel"/>
    <match action="org.freedesktop.hal.storage.mount-removable">
        <match user="myuser">
            <return result="yes"/>
        </match>
    </match>
    <match action="org.freedesktop.hal.storage.mount-fixed">
        <match user="myuser">
            <return result="yes"/>
        </match>
    </match>
</config>

Relevant dmesg output
Code:
umass0: <vendor 0x0930 USB Flash Memory, class 0/0, rev 2.00/1.00, addr 2> on uhub4
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
(probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
(probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: < USB Flash Memory 5.00> Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 983MB (2013184 512 byte sectors: 64H 32S/T 983C)
 
Relevant hald output:
Code:
15:04:46.655 [I] hf-devd.c:316: received devd event: ? at port=3 vendor=0x0930 product=0x653d devclass=0x00 devsubclass=0x00 release=0x0100 sernum="09F1D46041413948" on uhub4                                                
15:04:46.663 [I] hf-devd.c:316: received devd event: +umass0 vendor=0x0930 product=0x653d devclass=0x00 devsubclass=0x00 release=0x0100 sernum="09F1D46041413948" intclass=0x08 intsubclass=0x06 at port=3 interface=0 vendor=0x0930 product=0x653d devclass=0x00 devsubclass=0x00 release=0x0100 sernum="09F1D46041413948" intclass=0x08 intsubclass=0x06 on uhub4                                                                                         
15:04:46.682 [I] hald.c:108: Added device to GDL; udi=/org/freedesktop/Hal/devices/usb_device_930_653d_09F1D46041413948                                                                                                       
15:04:46.683 [I] hald.c:108: Added device to GDL; udi=/org/freedesktop/Hal/devices/usb_device_930_653d_09F1D46041413948_if0                                                                                                   
15:04:46.685 [I] hald.c:108: Added device to GDL; udi=/org/freedesktop/Hal/devices/usb_device_930_653d_09F1D46041413948_if0_scsi_host                                                                                         
15:04:46.692 [I] hf-usb.c:665: received USB_EVENT_DEVICE_ATTACH event, device 4.2                              
15:04:47.589 [I] hf-devd.c:316: received devd event: !system=DEVFS subsystem=CDEV type=CREATE cdev=pass0       
15:04:47.873 [I] hald.c:108: Added device to GDL; udi=/org/freedesktop/Hal/devices/usb_device_930_653d_09F1D46041413948_if0_scsi_host_scsi_device_lun0                                                                        
15:04:47.883 [I] hald.c:108: Added device to GDL; udi=/org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory                                                                                                             
Run started hald-probe-smbios (10000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-smbios', program_dir is '/usr/local/libexec'                    
pid 1915: rc=0 signaled=0: /usr/local/libexec/hald-probe-smbios                                                
Run started hal-storage-cleanup-all-mountpoints (10000) (0)                                                    
!  full path is '/usr/local/libexec/hal-storage-cleanup-all-mountpoints', program_dir is '/usr/local/libexec'  
pid 1917: rc=0 signaled=0: /usr/local/libexec/hal-storage-cleanup-all-mountpoints                              
Run started hald-probe-mouse (10000) (0)                                                                       
!  full path is '/usr/local/libexec/hald-probe-mouse', program_dir is '/usr/local/libexec'                     
pid 1918: rc=0 signaled=0: /usr/local/libexec/hald-probe-mouse                                                 
Run started hald-addon-mouse-sysmouse (0) (0)                                                                  
!  full path is '/usr/local/libexec/hald-addon-mouse-sysmouse', program_dir is '/usr/local/libexec'            
Run started hald-probe-storage (10000) (0)                                                                     
!  full path is '/usr/local/libexec/hald-probe-storage', program_dir is '/usr/local/libexec'                   
pid 1928: rc=0 signaled=0: /usr/local/libexec/hald-probe-storage                                               
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1930: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1931: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1932: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1933: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1934: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1935: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1936: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1937: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1938: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1939: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'                    
pid 1940: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume                                                
Run started hald-probe-volume (60000) (0)                                                                      
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'
pid 1941: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume
Run started hald-probe-volume (60000) (0)
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'
pid 1942: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume
Run started hald-probe-volume (60000) (0)
!  full path is '/usr/local/libexec/hald-probe-volume', program_dir is '/usr/local/libexec'
pid 1943: rc=0 signaled=0: /usr/local/libexec/hald-probe-volume
Run started hald-probe-scsi (10000) (0)
!  full path is '/usr/local/libexec/hald-probe-scsi', program_dir is '/usr/local/libexec'
pid 1956: rc=0 signaled=0: /usr/local/libexec/hald-probe-scsi
Run started hald-addon-storage (0) (0)
!  full path is '/usr/local/libexec/hald-addon-storage', program_dir is '/usr/lo15:04:47.887 [I] hald_runner.c:659: running_processes 0x8019ae620, num = 2
15:04:47.887 [I] hald.c:120: Started addon hald-addon-storage for udi /org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory
hald-addon-storage info: Checking whether device /dev/da0 is locked by HAL
hald-addon-storage info: ... device /dev/da0 is not locked by HAL
15:04:47.892 [D] hald_dbus.c:3294: udi=/org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory
15:04:47.892 [I] hald_dbus.c:3320: AddonIsReady on udi '/org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory'
15:04:47.895 [D] hald_dbus.c:3223: udi=/org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory
15:04:47.895 [I] hald_dbus.c:3248: Local connection 0x19ae800 to handle interface 'org.freedesktop.Hal.Device.Storage.Removable' on udi '/org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory'
15:04:47.906 [I] hald.c:108: Added device to GDL; udi=/org/freedesktop/Hal/devices/storage_model_USB_Flash_Memory_block
15:04:47.911 [I] hf-devd.c:316: received devd event: !system=DEVFS subsystem=CDEV type=CREATE cdev=da0
15:04:47.912 [I] hf-devd.c:316: received devd event: !system=DEVFS subsystem=CDEV type=CREATE cdev=msdosfs/
hald-addon-storage info: Checking whether device /dev/da0 is locked by HAL
hald-addon-storage info: ... device /dev/da0 is not locked by HAL
 
Instead of this:

Code:
<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="wheel"/>
    <match action="org.freedesktop.hal.storage.mount-removable">
        <match user="myuser">
            <return result="yes"/>
        </match>
    </match>
    <match action="org.freedesktop.hal.storage.mount-fixed">
        <match user="myuser">
            <return result="yes"/>
        </match>
    </match>
</config>


Try this...

Code:
<config version="0.1">
<define_admin_auth group="wheel"/>
<match action="org.freedesktop.hal.storage.mount-removable">
<return result="yes"/>
</match>
<match action="org.freedesktop.hal.storage.mount-fixed">
<return result="yes"/>
</match>
</config>

Give that a go and let me know how you go... I had a similar issue recently trying to mount MMC SD media.
 
/usr/local/etc/PolicyKit/PolicyKit.conf
Code:
<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="wheel"/>
    <match action="org.freedesktop.hal.storage.mount-removable">
        <return result="yes"/>
    </match>
    <match action="org.freedesktop.hal.storage.eject">
        <return result="yes"/>
    </match>
    <match action="org.freedesktop.hal.storage.mount-fixed">
        <return result="yes"/>
    </match>
</config>

/usr/local/etc/hal/fdi/policy/20-flash.fdi
Code:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
 <device>
 <match key="volume.fstype" string="vfat">
  <merge key="volume.policy.mount_option.-L=ru_RU.CP1251" type="bool">true</merge>
  <merge key="volume.policy.mount_option.-D=CP1251" type="bool">true</merge>
 </match>
 </device>
</deviceinfo>
 
Back
Top