Bug 314

Summary: cannot import photos with digikam / gwenview / kio
Product: Mageia Reporter: Jerome Quelin <jquelin>
Component: RPM PackagesAssignee: D Morgan <dmorganec>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: anaselli, balcaen.john, dmorganec, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: udev CVE:
Status comment:
Attachments: env LC_ALL=C gphoto2 --debug --debug-logfile=my-logfile.txt --auto-detect -L
udev logs

Description Jerome Quelin 2011-03-09 13:31:07 CET
when connecting usb camera, it is recognized by kde which proposes to open it.

however, digikam fails at opening it: cannot connect to the camera, make sure it is connected and powered on. do you want to retry? (translated back from french).

running gwenview_importer:
$ gwenview_importer 
kdeinit4: Shutting down running client.
klauncher(10537) kdemain: No DBUS session-bus found. Check if you have started the DBUS server. 
kdeinit4: Communication error with launcher. Exiting!
startkdeinitlock(10526)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "Not connected to D-Bus server" 

startkdeinitlock(10526): Wrong arg count. FIXME 
$

and opening it with dolphin, i get a camera: location, with a subfolder (location: camera:/USB PTP Class Camera@usb:002,005). but when i try to go in the subfolder, i get the following error (once again translated back from french):
  unknown error 150
  I/O problem
  send a bug report to http://bug.kde.org

note: it used to work fine on this pc, but it's been a while since i didn't connect the camera to this pc, so i cannot tell when the bug appeared. it's working fine on a mdv 2010.1 laptop.
Comment 1 John Balcaen 2011-03-09 18:51:39 CET
Did you try (just in case) directly with gphoto ?

gphoto2  --auto-detect -L

CC: (none) => balcaen.john

Comment 2 Jerome Quelin 2011-03-10 09:36:23 CET
$ LC_ALL=C gphoto2  --auto-detect -L
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.       
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
Model                          Port            
----------------------------------------------------------
USB PTP Class Camera           usb:002,006     
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.

*** Error ***              
An error occurred in the io-library ('I/O problem'): Could not open USB device (Permission denied).
*** Error (-7: 'I/O problem') ***       

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --auto-detect -L

Please make sure there is sufficient quoting around the arguments.
Comment 3 D Morgan 2011-03-10 09:39:29 CET
can you try:


env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --auto-detect -L


and please then add the my-logfile.txt file on the bugreport.

CC: (none) => dmorganec

Comment 4 Jerome Quelin 2011-03-10 09:45:04 CET
Created attachment 101 [details]
env LC_ALL=C gphoto2 --debug --debug-logfile=my-logfile.txt --auto-detect -L

$ env LC_ALL=C gphoto2 --debug --debug-logfile=my-logfile.txt --auto-detect -L
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.       
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.
Model                          Port            
----------------------------------------------------------
USB PTP Class Camera           usb:002,006     
libusb couldn't open USB device /dev/bus/usb/002/006: Permission denied.
libusb requires write access to USB device nodes.

*** Error ***              
An error occurred in the io-library ('I/O problem'): Could not open USB device (Permission denied).
*** Error (-7: 'I/O problem') ***
Comment 5 D Morgan 2011-03-10 14:16:41 CET
can you give the result of 

ls -l  /dev/bus/usb/ 


please ?
Comment 6 Jerome Quelin 2011-03-10 15:52:57 CET
$ ls -l  /dev/bus/usb/ 
total 0
drwxr-xr-x 2 root root 80 mars   3 14:57 001/
drwxr-xr-x 2 root root 80 mars  10 15:50 002/
drwxr-xr-x 2 root root 60 mars   3 14:57 003/
drwxr-xr-x 2 root root 60 mars   3 14:57 004/
drwxr-xr-x 2 root root 60 mars   3 14:57 005/
drwxr-xr-x 2 root root 80 mars   7 09:48 006/
drwxr-xr-x 2 root root 60 mars   3 14:57 007/
drwxr-xr-x 2 root root 60 mars   3 14:57 008/

$ ls -l  /dev/bus/usb/*
/dev/bus/usb/001:
total 0
crw-rw-r-- 1 root root 189, 0 mars   3 14:57 001
crw-rw-r-- 1 root root 189, 1 mars   3 14:57 002

/dev/bus/usb/002:
total 0
crw-rw-r-- 1 root root 189, 128 mars   3 14:57 001
crw-rw-r-- 1 root root 189, 134 mars  10 15:50 007

/dev/bus/usb/003:
total 0
crw-rw-r-- 1 root root 189, 256 mars   3 14:57 001

/dev/bus/usb/004:
total 0
crw-rw-r-- 1 root root 189, 384 mars   3 14:57 001

/dev/bus/usb/005:
total 0
crw-rw-r-- 1 root root 189, 512 mars   3 14:57 001

/dev/bus/usb/006:
total 0
crw-rw-r-- 1 root root 189, 640 mars   3 14:57 001
crw-rw-r-- 1 root root 189, 642 mars  10 15:52 003

/dev/bus/usb/007:
total 0
crw-rw-r-- 1 root root 189, 768 mars   3 14:57 001

/dev/bus/usb/008:
total 0
crw-rw-r-- 1 root root 189, 896 mars   3 14:57 001
Thierry Vignaud 2011-03-10 16:05:28 CET

CC: (none) => thierry.vignaud
Source RPM: (none) => udev

Angelo Naselli 2011-03-10 16:39:21 CET

CC: (none) => anaselli

Comment 7 Thierry Vignaud 2011-03-15 09:54:57 CET
What about getfacl on those too?

Assignee: bugsquad => dmorganec

Comment 8 Jerome Quelin 2011-03-15 09:58:49 CET
# getfacl /dev/bus/usb/*
getfacl : suppression du premier « / » des noms de chemins absolus
# file: dev/bus/usb/001
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/002
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/003
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/004
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/005
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/006
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/007
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

# file: dev/bus/usb/008
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
Comment 9 D Morgan 2011-03-15 23:20:28 CET
can you test with new udev ? ( 166 )
Comment 10 Jerome Quelin 2011-03-16 10:26:11 CET
upgraded udev to 166, rebooted ==> no change

$ LC_ALL=C gphoto2  --auto-detect -L
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.       
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.
Model                          Port            
----------------------------------------------------------
USB PTP Class Camera           usb:002,003     
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.

*** Error ***              
An error occurred in the io-library ('I/O problem'): Could not open USB device (Permission denied).
*** Error (-7: 'I/O problem') ***       

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --auto-detect -L

Please make sure there is sufficient quoting around the arguments.

$ ll /dev/bus/usb/002/003
crw-rw-r-- 1 root root 189, 130 mars  16 10:23 /dev/bus/usb/002/003
$ getfacl /dev/bus/usb/002/003
getfacl : suppression du premier « / » des noms de chemins absolus
# file: dev/bus/usb/002/003
# owner: root
# group: root
user::rw-
group::rw-
other::r--
Comment 11 Jerome Quelin 2011-03-16 10:42:45 CET
note that doing a chmod 666 /dev/bus/usb/002/003 makes it work...
so it's definitely a permission problem.

workaround allows to access the picturesx, a real fix would be nice.
Comment 12 D Morgan 2011-03-16 23:30:01 CET
i can test now and i reproduce.
Comment 13 D Morgan 2011-03-17 00:24:06 CET
as root can you do : 

udevadm control --log-priority=debug


and then attach the logs from /var/log/syslog   from udev.


thanks.
Comment 14 Jerome Quelin 2011-03-17 09:15:39 CET
Created attachment 132 [details]
udev logs
Comment 15 D Morgan 2011-03-17 18:26:29 CET
Just fixed by blino, this was a bug in virtualbox udev rule.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 16 Jerome Quelin 2011-03-21 14:50:25 CET
i confirm that it now works fine - thank you!