Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 291416

Summary: gnome-base/gvfs-1.4: needs changes in media-libs/libgphoto2 udev rules
Product: Gentoo Linux Reporter: Giacomo Perale <ghepeu>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: dosentnd, graphics+disabled, no.friday, pacho, tetromino
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 288249    
Attachments: ebuild with fixes for new udev rules

Description Giacomo Perale 2009-11-01 11:04:50 UTC
Two days ago I upgraded to GNOME 2.28 and this morning I found out that my digital camera, while still working in f-spot/gphoto2 (CLI), wasn't mounted anymore by gvfs gphoto2-backend, nor it apparead in the computer:// window.

Looking for a couple of hours through bugzillas and mailing lists I found this feature request with a patch already integrated in libghoto2 2.4.7: http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874

Basically, it seems that gvfs 1.4 requires a new udev rules file format; manually replacing in libgphoto2 2.4.7 ebuild the line

"${D}"${CAM_LIST} udev-rules version 0.98 group plugdev >> "${D}"/${UDEV_RULES} \

with 

"${D}"${CAM_LIST} udev-rules version 136 group plugdev >> "${D}"/${UDEV_RULES} \

did the trick here: now the camera is recognized and mounted in nautilus _and_ it still works in f-spot 0.6.1.1. 

I don't know however if this change could impact different setup (KDE, old GNOME versions, etc.) Also I'm using policykit so I'm not sure the "plugdev" group membership is still checked out, this should be considered too.
Comment 1 Giacomo Perale 2009-11-28 13:57:36 UTC
ping?
Comment 2 Giacomo Perale 2009-12-09 20:26:35 UTC
ping?
Comment 3 Alexander Soloviëv 2009-12-10 07:21:50 UTC
Created attachment 212596 [details]
ebuild with fixes for new udev rules
Comment 4 Alexander Soloviëv 2009-12-10 07:27:18 UTC
I've attached updated ebuild for 2.4.7 which fixes this issue. Changes: 1)depends on >= udev-136, 2) camera list generated in mode 136, 3) udev rules file name now is 40-libgphoto2.rules 
Comment 5 Kunalagon Umuhanik 2009-12-26 23:06:11 UTC
I have same problem. And I did not solve it using this udev workaround. I installed this .ebuild, and I still have no digital camera icon displayed in nautilus Computer.

gphoto2 tells me libgphoto2 library works:

kunalagon@dhcppc0 ~ $ gphoto2 --auto-detect
Model                          Port                                            
----------------------------------------------------------
Canon PowerShot A740           usb:            
Canon PowerShot A740           usb:002,008     


But when I execute command:

gvfs-mount mount gphoto2://[usb:002,008]/  , 

gvfs-mount, mounts my camera and it shows icon in nautilus sidebar or Computer, and Icon is Icon-mounted. Now I can click on icon, and can list pictures, transfer or what ever... 
I dont know why it does not show unounted camera in nautilus.
Comment 6 Alexander Soloviëv 2009-12-26 23:31:49 UTC
(In reply to comment #5)
> I have same problem. And I did not solve it using this udev workaround. I
> installed this .ebuild, and I still have no digital camera icon displayed in
> nautilus Computer.
> 
> gphoto2 tells me libgphoto2 library works:
> 
> kunalagon@dhcppc0 ~ $ gphoto2 --auto-detect
> Model                          Port                                            
> ----------------------------------------------------------
> Canon PowerShot A740           usb:            
> Canon PowerShot A740           usb:002,008     
> 
> 
> But when I execute command:
> 
> gvfs-mount mount gphoto2://[usb:002,008]/  , 
> 
> gvfs-mount, mounts my camera and it shows icon in nautilus sidebar or Computer,
> and Icon is Icon-mounted. Now I can click on icon, and can list pictures,
> transfer or what ever... 
> I dont know why it does not show unounted camera in nautilus.
> 

I have the same issue with hardened kernels (mainly grsec patches), gvfs-gphoto2-volume-monitor can't get events from udev. But with gentoo-sources kernel monitor works fine. 

Comment 7 Kunalagon Umuhanik 2009-12-26 23:38:48 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I have same problem. And I did not solve it using this udev workaround. I
> > installed this .ebuild, and I still have no digital camera icon displayed in
> > nautilus Computer.
> > 
> > gphoto2 tells me libgphoto2 library works:
> > 
> > kunalagon@dhcppc0 ~ $ gphoto2 --auto-detect
> > Model                          Port                                            
> > ----------------------------------------------------------
> > Canon PowerShot A740           usb:            
> > Canon PowerShot A740           usb:002,008     
> > 
> > 
> > But when I execute command:
> > 
> > gvfs-mount mount gphoto2://[usb:002,008]/  , 
> > 
> > gvfs-mount, mounts my camera and it shows icon in nautilus sidebar or Computer,
> > and Icon is Icon-mounted. Now I can click on icon, and can list pictures,
> > transfer or what ever... 
> > I dont know why it does not show unounted camera in nautilus.
> > 
> 
> I have the same issue with hardened kernels (mainly grsec patches),
> gvfs-gphoto2-volume-monitor can't get events from udev. But with gentoo-sources
> kernel monitor works fine. 
> 

I am also using gentoo sources 2.6.29-r5. And I can see, using dbus-monitor, that when I turn on camera,nothing shows up. Dbus does not shows anythig, any changes any information. Maybe, i should put something in kernel, to enable some config, I am not sure, I dont know.
Comment 8 Kunalagon Umuhanik 2009-12-26 23:47:30 UTC
Hm...right now, I rebooted to kernel gentoo-sources 2.6.31-r6, and now, I have camera shows in Nautilus. Looks like it was some kernel isue, because, I was using almost the same .config in both kernels.

And now, I am not sure, if this was a realy kernel isue or maybe this udev rules problem which was mentioned by Alexander.
Comment 9 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-12-27 04:27:31 UTC
(In reply to comment #8)
> And now, I am not sure, if this was a realy kernel isue or maybe this udev
> rules problem which was mentioned by Alexander.
> 

You might've forgotten to restart udev and/or nautilus. The reboot did that for you.

Fixed with -r1, thanks for reporting
Comment 10 Kunalagon Umuhanik 2009-12-27 09:01:10 UTC
> You might've forgotten to restart udev and/or nautilus. The reboot did that for
> you.
> 
> Fixed with -r1, thanks for reporting
> 

After I installed libgphoto2-2.4.7-r1.ebuild, I restarted machine, and camera still was not exist in Nautilus nor gvfs. After kernel upgrade, it shows up.

But, most important is, now it works!

Thank you.
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-12-27 10:28:45 UTC
re-opening so we don't forget to kill this unproven fix in libgphoto.
Comment 12 Giacomo Perale 2009-12-27 10:42:53 UTC
(In reply to comment #11)
> re-opening so we don't forget to kill this unproven fix in libgphoto.
> 

What do you mean with 'kill this unproven fix'? It's not a fix, it's simply how things work with a recent stack (kernel, udev, gvfs, nautilus) with hal being deprecated and replaced by gudev.
Comment 13 Alexander Soloviëv 2009-12-27 11:43:33 UTC
(In reply to comment #11)
> re-opening so we don't forget to kill this unproven fix in libgphoto.
> 

This is the way how libgphoto works now without hal. Read please the link given in the top of this ticket. This fix is dated 2009-06 and it has been applied in all major distribs.
Comment 14 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-12-27 15:17:24 UTC
(In reply to comment #11)
> re-opening so we don't forget to kill this unproven fix in libgphoto.
> 

This isn't an "unproven fix", the udev rules file format changed sometime around v136, and we just didn't bother to change it till something that depended on the extra information given by the newer format showed up and barfed all over itself.

All we need to make sure is that when 2.28 goes stable, libgphoto-2.4.7-r1 goes stable with it.
Comment 15 Pacho Ramos gentoo-dev 2010-01-03 13:53:03 UTC
what would be the proper fix for this then? Thanks for the info :-)
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-01-06 22:50:20 UTC
Ok after reading the report, it makes sense. Closing fixed. Thanks for reporting.