Darktable uses lensfun for its lens correction feature. lensfun provides a database with calibration parameters for many common lenses. This database is updated regularly as people provide data for new lenses. So if you have a new lens that is not already supported, a promising first step is to update the lensfun database.
Unfortunately, at least on Ubuntu, you don’t get these updates through the
apt-get upgrade. However, lensfun provides a command
to get the latest lens data.
To update the lens data, simply open a terminal and run
This will download the latest lens data to
For some reason, this was not enough on my Ubuntu 20.04 installation, though.
For Darktable to be able to use the updated files, then need to be located in
~/.local/share/lensfun, i.e. one level up. One quick way to fix this is to
symlink the files:
cd ~/.local/share/lensfun ln -s updates/*.xml .
After this, the new lens data was available for me in Darktable.
Update (2021-10-24): For some versions of lensfun the update location seems
x denotes the database
version), so check first where it really stored the files and adjust the
command if necessary.