I noticed that the waveform showed different black levels for the channels. I checked in exiftool, and that indicated 128 for all channels, like used in darktable:
Changing the black levels allowed me to fix the colour cast:
It seems that a non-adjustable, hidden parameter, crop right, also changed. I guess this is related to the LX7 being a multi-aspect-ratio camera. I was just wondering why the parameter is hidden.
Seems more like a 7+ year bug with a magic number no one understands. I wonder if Panasonic fixed the black levels in a newer version of their raw format. The fix worked for several samples I tried. I think I tried the GH5, GH5s, G9 and GX9 in addition to my S5. I didn’t try to push the exposure tho. I’ll have to try older camera samples and retest the others.