I'm using Darktable 2.4.4 on Linux Mint 19 Xfce. I have updated Lensfun (v0.3.2.4). How do I get my 18-55 lens to be automatically recognized?

My Nikon D5300 is recognized, no problem, but the kit lens (Nikon AF-P DX Nikkor 18-55mm f/3.5-5.6G VR) shows in the "image module" on the right hand side as lens "160" instead of the lens name.

I have to manually select the lens in the lens correction module every time (it is listed, so it's there). The lens is listed as '160' and says, "Camera/lens not found-please select manually" (which you can). This can be tedious. I'm positive this lens (Nikon AF-P DX Nikkor 18-55mm f/3.5-5.6G VR) worked automatically with Darktable in an earlier version.

When I put my Sigma 17-50mm on D5300 everything works automatically in Darktable as expected. I've spent a ton of time googling and trying things for a solution, but so far I've got nothing.


1 Answer 1


Darktable depends on exiv2, not lensfun, for lens name mappings. You may not have this lens mapping if it's an older version of exiv2. To compound the problem, exiv2 faces some difficulties when it comes to accurately providing this information, so even recent versions may exhibit this problem for some lenses. If updating to exiv2 0.26 or later doesn't solve the problem, the suggested solution is for users to provide their own mappings for the lenses they use.

In your case, this would probably be something like:

[nikon] 160=Nikon AF-P DX Nikkor 18-55mm f/3.5-5.6G VR

added to the ~/.exiv2 file (you'll need to create it if it doesn't already exist).

Note that updating exiv2 will require rebuilding darktable along with any other applications that use the library.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.