Bug 1584876 - Shotwell does not import photos from mobile because libgphoto2 and many more udev rules are broken
Summary: Shotwell does not import photos from mobile because libgphoto2 and many more ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-31 20:38 UTC by Dimitrios Apostolou
Modified: 2019-05-28 18:57 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-05-28 18:57:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dimitrios Apostolou 2018-05-31 20:38:55 UTC
Description of problem: 

Open Shotwell, plug-in phone, phone never appears for photo import.


Version-Release number of selected component (if applicable):

shotwell-0.28.3-1.fc28.x86_64
libgphoto2-2.5.16-3.fc28.x86_64
systemd-udev-238-8.git0e0aa59.fc28.x86_64


Steps to Reproduce:
1. Open Shotwell
2. plug-in Android phone, tried both MTP or PTP modes
3. photo import never starts


Additional info: 

This used to work in Fedora 27, but stopped as soon as I upgraded to Fedora 28.

I traced it down to udev not tagging the device properly with ID_GPHOTO2 according to the udev rule:

/usr/lib/udev/rules.d/40-libgphoto2.rules:ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="proprietary", ENV{ID_MEDIA_PLAYER}="1"


If you run `udevadm monitor -p` you will see that once you plug in the device, the "add" event tags the device properly, but then comes the "bind" event which untags it! The workaround in my case is the following change in the udev rules of libgphoto2:

diff /usr/lib/udev/rules.d/40-libgphoto2.rules{.orig,}
7c7
< ACTION!="add", GOTO="libgphoto2_rules_end"
---
> ACTION!="add|bind", GOTO="libgphoto2_rules_end"



However this is not specific to libgphoto2! If you run the above udevadm command, you'll see that more tags added at the "add" event are being removed with the "bind" event. Probably all udev rules need to be changed!

I believe I've found related bug reports, with much more software misbehaving:

https://bugs.kde.org/show_bug.cgi?id=387454
https://lists.freedesktop.org/archives/modemmanager-devel/2018-May/006417.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890641
https://github.com/systemd/systemd/issues/8221


Given that the brokenness appeared once I updated to Fedora 28, which included an update of systemd from 234 to 238, and given the above bug reports, I'm filing this under the "systemd" project. Feel free to recategorise as you deem.

Comment 1 Dimitrios Apostolou 2018-05-31 20:43:20 UTC
This one looks similar too:

https://bugzilla.redhat.com/show_bug.cgi?id=1581520

Comment 2 Ben Cotton 2019-05-02 21:29:37 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2019-05-28 18:57:24 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.