Nikon D500 + AF-S DX Nikkor 16-80mm f/2.8-4E ED VR
With Fedora 27 and the latest darktable as of today (2.4.1), lens autodetection in the Lens Correction module fails (it can’t find the lens).
This method is for Linux / any distribution that ships lensfun >= 0.3 (Fedora 27 includes 0.3.2)
lensfun >= 0.3 comes with an utility that downloads the latest DB, run it:
lensfun-update-data
it will install a new copy of the db that overrides the default one, here: ~/.local/share/lensfun/updates/version_1/slr-nikon.xml
Customize it to fix the 16-80mm f/2.8-4E “lens not found” issue with the Lens Correction module
edit the above xml file, then search the original string below and change with the fixed one:
Original:<model>Nikon AF-S DX Nikkor 16-80mm f/2.8-4.0E ED VR</model>
Fixed: <model>Nikon AF-S DX Nikkor 16-80mm f/2.8-4E ED VR</model>
Finally, reload darktable, the issue should be gone and lens autodetection should now work. No need to reimport images nor delete existing sidecars xml files.
I advised the lensfun database maintainer so hopefully this change will be incorporated in future database releases.
Exactly. Looks like the initial calibration was done with a 7200 (there is a comment in the database entry that mentions this) perhaps before the D500 release, and/or perhaps with an older camera firmware.
@darix yes, the first step is to run ‘lensfun-update-data’ to get a copy of the latest database installed in your home folder, that you can then easily edit.
As of July/2018, the process is now simpler since the latest lensfun include the change to their database.
Since Darktable still comes with an older database, you still need to run lensfun-update-data
In Fedora/28 this utility is included in the lensfun-tools package.
After running an update, the downloaded db update already includes the needed change.
Just restart darktable, and the lens correction will work out of the box for photos taken with this lens (D500 kit lens)
That explains it
In any case, it seems the updated database isn’t part of a release yet so likely all distros are impacted. Good thing is that it’s easier now