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 regular apt-get upgrade. However, lensfun provides a command lensfun-update-data to get the latest lens data.

To update the lens data, simply open a terminal and run

lensfun-update-data

This will download the latest lens data to ~/.local/share/lensfun/updates. 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.

References