DT 3.01 - BasicAdjustments (saturation or vibrance) + Shadows & Highlights = darkroom image disappears

Just upgraded to DT3.01 (platform: linux / ubuntu) and noticed an issue between BasicAdjustments and Shadows&Highligts. When both are active and I set in BasicAdj any value in Saturation or Vibrance that is different from zero, the image in darkroom disappears; when I zoom in or out I can see that the image flashes but is quickly “overwritten” by the background color and disappears.

This is reproducible 100% of the time in my setup. Deleting the xmp sidecar, importing a Nikon (d500) raw, and then turning on thes two modules as above is enough to trigger the problem.

I am also running DT3.01 in a Mac and no problems there.

I tried both the “Stable” and the “latest stable snaphot” versions from OBS and both have the same problem. I was using DT3.0 before with no issues.

I’ve read that BasicAdj had some changes in 3.01 that impacted importing older edits however the issue I am describing here happens with newly imported RAWs too.

Running darktable from the command line and reproducing the issue shows no error messages in the console.

Can anyone reproduce the issue? just to confirm if it’s my setup that has the problem. If others can reproduce I will open a bug in github

Running darktable in debug mode I see:

7.115060 [opencl memory] device 0: 54795804 bytes (52.3 MB) in use
57.115068 [opencl memory] device 0: 54795648 bytes (52.3 MB) in use
57.115075 [opencl memory] device 0: 53222784 bytes (50.8 MB) in use
57.116572 [opencl memory] device 0: 79986048 bytes (76.3 MB) in use
57.117357 [opencl memory] device 0: 106749312 bytes (101.8 MB) in use
57.124986 [opencl memory] device 0: 79986048 bytes (76.3 MB) in use
57.125019 [opencl memory] device 0: 53222784 bytes (50.8 MB) in use
57.125911 [opencl memory] device 0: 79834176 bytes (76.1 MB) in use
57.125925 [opencl memory] device 0: 53222784 bytes (50.8 MB) in use
57.125931 [opencl memory] device 0: 26611392 bytes (25.4 MB) in use
57.125951 [dev_pixelpipe] took 0.021 secs (0.161 CPU) processed `shadows and highlights' on GPU, blended on GPU [full]
[dev_pixelpipe] module `shadows and highlights' outputs NaNs! [full]
[dev_pixelpipe] module `shadows and highlights' min: (340282346638528859811704183484516925440.000000; 0.000000; 0.000000) max: (0.000000; 0.000000; 0.000000) [full]
57.143588 [dev_pixelpipe] took 0.047 secs (0.318 CPU) processed `output color profile' on CPU, blended on CPU [preview]
57.149681 [opencl memory] device 0: 0 bytes (0.0 MB) in use
[dev_pixelpipe] module `output color profile' min: (0.000000; 0.000000; 0.000000) max: (1.000000; 1.000000; 1.000000) [preview]
57.175347 [dev_pixelpipe] took 0.005 secs (0.054 CPU) processed `gamma' on CPU, blended on CPU [preview]
57.249767 [dev_pixelpipe] took 0.106 secs (0.790 CPU) processed `output color profile' on CPU, blended on CPU [full]
[dev_pixelpipe] module `output color profile' min: (0.730343; 0.000000; 0.000000) max: (0.730343; 0.730327; 0.730327) [full]
57.292392 [dev_pixelpipe] took 0.006 secs (0.039 CPU) processed `gamma' on CPU, blended on CPU [full]
57.292808 [dev_process_image] pixel pipeline processing took 0.294 secs (1.647 CPU)
57.292827 [run_job-] 00 296108323.768131 57.292851 develop process image | queue: 0 | priority: 057.292854 
image colorspace transform RGB-->RGB took 0.121 secs (0.853 lcms2) [final histogram]
final histogram took 0.003 secs (0.008 CPU)
57.299484 [dev_process_preview] pixel pipeline processing took 0.301 secs (1.668 CPU)
57.299506 [run_job-] 01 296108323.774810 57.299512 develop process preview | queue: 0 | priority: 057.299529 

Looks like an OpenCL regression in 3.01

 [dev_pixelpipe] module `shadows and highlights' outputs NaNs! [full]

Disabling OpenCL I can no longer reproduce the issue.
Sad though because opencl helps a lot

Sorry. I can not reproduce your issue.
I am on Manjaro and using dt 3.1.0-git.

Do you use OpenCL?

Yes.

Nvidia or AMD? if AMD is it ROCM or the proprietary driver?

Nvidia & proprietary drivers.

I’m not able to reproduce this either (3.0.1 or 3.1.0)

  • OS : Linux - kernel 5.4.0-0.bpo.4-amd64
  • Distro : Debian Buster (rel. 10.3)
  • Processor : AMD Ryzen
  • Graphics card : GeForce RTX
  • Graphics driver : 440.59
  • OpenCL activated : Yes and No (tried both)

AMD ROCM driver here. It sucks, first the locallaplacian problem (reported a year ago to AMD and still not fixed) and now this.

Maybe I’ll use the quarantine to finally ditch AMD GPUs and move on :slight_smile:

1 Like

are you using ROCm or AMDGPUPro? Seems that AMDGPU pro should work fine.

as for ROCm - you can fill a bug in their github repo :slight_smile:

ROCm. I did try AMDGPUpro in the past. Unfortunately, AMDgpupro is a pain to use in modern distros. They support only old RHELs and old ubuntu LTS. And then if you only want OpenCL, you have to extract the libraries manually.
ROCM on the other end, only supports the latest kernel. So it only works in very recent distros while the kernel is still almost mainline, and a few months later as the kernel evolves, the latest rocm stops working in your distro - distros just don’t package it and AMD did not step in either. Also, on occassion bugs creep up and they can take a long while to get noticed and fixed, since ROCM is not that popular.
Lastly, there are small but annoying bugs here and there in OpenCL affecting darktable that AMD does not show interest in fixing.

I really wanted to like AMD and support their open source approach, but after two years of tinkering the system to get the driver to work and workaround issues, enough is enough; I just swapped an RX560 card with a GTX1650 (both 75W TDP bus-powered) and it’s like night and day. A LOT faster, and it’s a pleasure to use darktable with this performance. OpenCL just works, in whatever distro and whatever release since all of them package NVIDIA proprietary drivers.
I wish Nvidia will opensource its driver one day but in the meantime, their hardware is much more performant and their software works on linux just fine, so I will just use it :slight_smile:

Have you really checked recently? Latest AMDGPUpro is e.g. available for RHEL/CentOS 8.1, last released around December/January using the 4.18 kernel. Not too old for most hardware. On Ubuntu, it’s for 18.04.4 HWE - basically a 19.10 backport to 18.04 LTE - supporting the Linux 5.3 kernel.