Lensfun - getting it to work with darktable

Mixing snap packages into a clean Ubuntu linux installation controlled by dpkg / apt in most cases is not the most intelligent solution. You can find masses of posts on the internet reporting issues when updates of dependencies are necessary. If I was in your place I would remove the snap package first and then use a PPA for example. This way a clean integration of the application into the system is assured and updates of the application and it’s dependencies by the system tools dpkg and/or apt are guaranteed.
On http://ubuntuhandbook.org/index.php/2020/08/darktable-3-2-1-improved-lighttable-view/ you will find detailed instructions. Also install | darktable may help.

1 Like

They dont really mix. Snap packages are isolated and contain their dependencies inside the snap itself.

Citation needed please.

Exactly this causes the problems if people do not know the relations of the different package management systems and how they are intended to work. I do not want to kick off a discussion about packaging here, I just wanted to give the hint that using a PPA would possibly make it easier for @carusoswi to get an up-to-date and working lensfun including library.

2 Likes

It would have been nice to let people know when you posted the question as it would have saved people a lot of time.

It is like with all software-related questions on any website: people almost never provide sufficient info for the question to be properly answered. I always tell people to be nice and help me help them.

2 Likes

Mike:
With all due respect, my question centered around Lens Fun. I had no idea that a snap version of DT would come into play. Additionally, I am a consumer of computer applications (I wouldn’t normally go looking for the advantages/disadvantages of snap packages if they appear to be working). I installed DT from the Ubuntu software center. If we should not be using these applications, why are they being offered. Software from the software center is supposed to be the safest.

I appreciate the replies and will look into the suggestions offered. Sorry to have wasted so much of everyone’s time.

Caruso

I uninstalled DTsnap and searched for the latest flatpak version from an online PPA (Install package graphics:darktable / darktable). The version that I got is 3.0.1, so probably not the latest, but it is flatpak. Interesting, I have another post on this forum asking for help because the snap version would not fit on my second monitor since I upgraded to that version (3.2.1snap). This older version does not have that problem.
As for Lensfun, it behaves identically as it did with the snap version, so, maybe it has always worked and I am just ignorant of what it is supposed to do.
It tells me that my camera/lens is not found, please select manually. My camera is a Sony A900 which shows, and I can also drop down that list and select it.
My lens (on this particular file) is a Sony 50mm F1.4 which automatically shows. If I drop that menu down, the name Sony does not even appear. I cannot believe there are no Sony lenses in the database.
What am I doing wrong? I have searched for lensfun tutorials, but have yet to find one.
Any additional advice appreciated (or maybe I should give up on Lensfun).
Thanks.
Caruso

Correction: Once I closed DT and reopened it, it no longer fits on my second screen. I’m not certain what the problem could be. FWIW, that screen’s resolution is 1280 x 1024, but this item is off-topic to this thread, so feel free to ignore it.

Flatpack packages follow a similar concept as snap does, packaging all the dependencies in one big “black box”. Flatpack is not a ppa which follows a completely different concept. Please read and learn about package managing systems to really understand what your are doing on your system.

1 Like

I followed your suggestion to remove the Snap package and installed from a PPA. There are no dependency issues reported on my system. What am I not understanding about package managing systems that would be applicable to my problem (if I have a problem). You opened my sample image and reported that lensfun is responding as it should, so what adjustments, exactly, should I be able to perform from that menu?
I am not at all new to photo editing or DT, but I have never been able to make lensfun work. My latest DT upgrade took me to a Snap package because Ubuntu introduced it. All previous versions were not Snaps.
If you or someone can help me to get lensfun working, I would appreciate it. If not, thanks for your attempts so far. If it will not work for me, I will live without lensfun.
Thanks.
Caruso

Sorry, but now I am completely confused. In your second last post you told us that you installed a flatpack package, now you speek of a ppa. Totally unclear what you have installed now and which version of dt you are using.
In general : using snap or flatpack packages you never can be certain if they use the lensfun libraries installed by apt. In contrast using a PPA ensures that the lensfun libraries you already installed can be used (shared libraries). Please learn about the packaging systems you want to use, otherwise you never really know what you are doing on your system and you will be unable to debug issues like the one you actually have.

1 Like

I understood you to say that I should uninstall the snap version and seek a flatpak from a ppa. I did a search on the ‘latest version of DT’ and came upon instructions to download/install from a PPA which is what I did.

There is also a non-snap version in the Ubuntu software center. I don’t know if I would need to uninstall this flatpak version to install that one.

I am getting dizzy trying to follow the suggestions here, although I do appreciate efforts made to help.

Caruso

No, I did not say that you should install a flatpack package, @paperdigits did so. I recommend to install darktablle from a PPA (I sent you a link with detailed instructions how to do this). And again: a flatpack is not a PPA, a PPA is something completely different. Please read the recent posts again and try to understand.
In general : if you are not absolutely certain what you are doing you should install only one version to avoid irritations. If you want to use the PPA I recommended please first remove the flatpack.

1 Like

What you’re saying doesn’t make any sense. If you want to recommend the PPA, that’s good, but there is no need to malign a technology that you don’t understand.

@carusoswi the flatpak is here: https://flathub.org/apps/details/org.darktable.Darktable and you need to sudo apt install flatpak before you can actually install the flatpak :slight_smile:

With apt you’ll only be able to have one version of the package from the repo or PPA, but you can also have the flatpak and snap installed alongside it without issue.

OK, I reviewed Pehar’s instructions to install version 3.2.1. When I click on lens corrections, the same menu appears with the same messages, correct camera listed, correct lens listed, then the message that the camera/lens is not found, select manually.
If someone can explain what I am missing, that would be appreciated. If you have already explained it, then I did not understand, please try once more.
Thanks for hanging in with me (BTW, I did not seek to malign any technology, nor did I recommend a PPA, just listed the address so you could review from whence I got that version of DT.
Thanks.
Caruso

1 Like

Make sure you updated to the most recent lensfun database, run sudo lensfun-update-data. If you then get the same menu entries for the lenses, read the manual (chapter about lens correction). Not every camera - lens combination is supported by lensfun.
@paperdigits : no comment, you missunderstood nearly everything.

Clearly, paperdigits, I do not possess sufficient intellect to be seeking advice here. Thanks for the helpful reply.
Later,
Caruso

This is not true. We all have ample room to learn.

If your camera/lens combination is not already supported there are ways to create your own database entries and/or to support the project by providing RAW images. You find more information and tutorials at Lensfun.
The documentation can be found at lensfun: Lensfun: A library for rectifying and simulating photographic lens distortions, it contains a chapter about the file format of the database and a description how to add own entries (chapter “Filling the database”).

I have had some luck with hand editing the lensfun database. I get the exact character strings the camera/lens reports from the image information in the Lighttable view. Then I add or replace the database entry.

So, while it may look like your camera/lens is correctly shown in the Lens Correction module, if there is even an errant space or dash character from that given by the EXIF info, you will get the error message that it cannot be found.

Also, this means that the next time the database is updated, you may have to edit it, again.

under linux, you can also create a file .exiv2 under your home directory, with a structure like:
[sony]
28=Tamron SP AF 90mm F2.8 Di Macro

i.e. a section per camera (body) brand, then for each lens a line with
<lensID>=<lensfun name>

This will make the exiv2 library use the name you specified for the given lens ID, overriding the default name.

See the exiv2 manpage for exact details

Can you look in the xml file in the lensfun folder and confirm the info matches your exif data…if not you could modify them to match…