Troubleshooting darktable

Today I compiled dt from github master (commit 7abc527b6e5cc024b28b6d946c447a8a8524a941). When starting darktable nothing happens on screen but the process seems to hang. I tried disabling opencl in darktablerc but that doesn’t help.
So I ran darktable -d all but the output isn’t very helpful.

Is there a way to get more feedback about what is going on?

I am running dt on linux (kernel 6.2.7) with X11.

There is an error with lcms2 but I think I always had this, even when dt worked fine.

The debug output is:

     0.0001 application_directory: /opt/darktable/bin
     0.0001 darktable.datadir: /opt/darktable/share/darktable
     0.0001 darktable.plugindir: /opt/darktable/lib/darktable
     0.0001 darktable.localedir: /opt/darktable/share/locale
     0.0001 darktable.configdir: /media/sg/Pictures/config/darktable
     0.0002 darktable.cachedir: /home/sg/.cache/darktable
     0.0002 darktable.sharedir: /opt/darktable/share
     0.0002 darktable.tmpdir: /tmp
     0.0002 [memory] at startup
     0.0002 [memory] max address space (vmpeak):      448372 kB
            [memory] cur address space (vmsize):      448372 kB
            [memory] max used memory   (vmhwm ):       55636 kB
            [memory] cur used memory   (vmrss ):       55636 kB
     0.0002 new_xdg_data_dirs: /opt/darktable/share:/usr/local/share/:/usr/share/
     0,0177 [lcms2] error 5: Read from memory error. Got 0 bytes, block should be of 128 bytes
     0,0185 output profile `Epson SC-P800 Hahnemühle Photo Rag 188g 2880dpi' color space `RGB ' not supported for work or histogram profile
     0,0185 output profile `Hahnemuhle Photo Rag' color space `RGB ' not supported for work or histogram profile
     0,0746 output profile `PICTO_Arizona_Dibon_3.icc' color space `CMYK' not supported for work or histogram profile
     0,0746 output profile `PICTO_Lambda_Coul_RC_Brillant_KE_2' color space `RGB ' not supported for work or histogram profile
     0,0746 output profile `PICTO_Lambda_Coul_RC_Satine_KE_2' color space `RGB ' not supported for work or histogram profile
     0,1291 output profile `SaalDigital_Acrylglas.icc' color space `CMYK' not supported for work or histogram profile
     0,1291 output profile `TurboPrint Epson_SureColorP800 Brilliant Paper/Glossy' color space `RGB ' not supported for work or histogram profile
     0,1291 output profile `TurboPrint Epson_SureColorP800 Canson/Canson High Gloss Premium' color space `RGB ' not supported for work or histogram profile
     0,1291 output profile `TurboPrint Epson_SureColorP800 Canson/Infinity Baryta Photographique' color space `RGB ' not supported for work or histogram profile
     0,1291 output profile `TurboPrint Epson_SureColorP800 Canson/Infinity Platin Fibre Rag' color space `RGB ' not supported for work or histogram profile
     0,1291 output profile `TurboPrint Epson_SureColorP800 Canson/Infinity Platine Fiber' color space `RGB ' not supported for work or histogram profile
     0,1291 output profile `TurboPrint Epson_SureColorP800 Canson/Infinity Rag Photographique 310' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Epson/Premium Glossy' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Hahnemuehle/Fine Art Baryta 325' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Hahnemuehle/Fine Art Pearl 285' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Hahnemuehle/Leonardo Canvas 390' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Hahnemuehle/Photo Rag Pearl 320' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Sandinavian Photo/Satin Professional Semi Gloss' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Scandinavian Photo/Matte Professional Inkjet' color space `RGB ' not supported for work or histogram profile
     0,1292 output profile `TurboPrint Epson_SureColorP800 Scandinavian/Scandinavian Photo High Gloss Inkjet 300g' color space `RGB ' not supported for work or histogram profile
     0,1375 [init sql] library: /media/sg/Pictures/config/darktable/library.db, data: /media/sg/Pictures/config/darktable/data.db
     0,3639 [sql] /home/sg/Repos/darktable/src/common/tags.c:583, function dt_set_darktable_tags(): exec "DELETE FROM memory.darktable_tags"
     0,3639 [sql] /home/sg/Repos/darktable/src/common/tags.c:587, function dt_set_darktable_tags(): prepare "INSERT INTO memory.darktable_tags (tagid) SELECT DISTINCT id FROM data.tags WHERE name LIKE 'darktable|%%'"
     0,3643 [dt_worker_threads] using 4 worker threads
     0,3652 [sql] /home/sg/Repos/darktable/src/common/film.c:528, function dt_film_set_folder_status(): prepare "DELETE FROM memory.film_folder"
     0,3652 [sql] /home/sg/Repos/darktable/src/common/film.c:534, function dt_film_set_folder_status(): prepare "SELECT id, folder FROM main.film_rolls"
     0,3652 [sql] /home/sg/Repos/darktable/src/common/film.c:539, function dt_film_set_folder_status(): prepare "INSERT INTO memory.film_folder (id, status) VALUES (?1, ?2)"
     0,3703 [dt_get_sysresource_level] switched to 2 as `large'
     0,3703   total mem:       64165MB
     0,3703   mipmap cache:    8020MB
     0,3703   available mem:   43863MB
     0,3703   singlebuff:      4010MB
     0,3703   OpenCL tune mem: WANTED
     0,3703   OpenCL pinned:   WANTED
     0,3703 [sql] /home/sg/Repos/darktable/src/common/collection.c:899, function _dt_collection_compute_count(): prepare "SELECT COUNT(DISTINCT mi.id) FROM (SELECT  id, group_id, film_id, filename, datetime_taken,   flags, version,  position, aspect_ratio,  maker, model, lens, aperture, exposure, focal_length,  iso, import_timestamp, change_timestamp,  export_timestamp, print_timestamp  FROM main.images AS mi  ) AS mi WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) AND (group_id = -1 OR id IN (SELECT id FROM (SELECT id, MIN(ABS(id-group_id)*2 + CASE WHEN (id-group_id) < 0 THEN 1 ELSE 0 END) FROM main.images WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) GROUP BY group_id))) OR (id = -1) ORDER BY datetime_taken DESC, filename, version DESC LIMIT ?1, ?2"
     0,3729 [sql] /home/sg/Repos/darktable/src/common/collection.c:899, function _dt_collection_compute_count(): prepare "SELECT COUNT(DISTINCT mi.id) FROM (SELECT  id, group_id, film_id, filename, datetime_taken,   flags, version,  position, aspect_ratio,  maker, model, lens, aperture, exposure, focal_length,  iso, import_timestamp, change_timestamp,  export_timestamp, print_timestamp  FROM main.images AS mi  ) AS mi WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) ORDER BY datetime_taken DESC, filename, version DESC LIMIT ?1, ?2"
     0,3740 [sql] /home/sg/Repos/darktable/src/common/collection.c:927, function dt_collection_get_selected_count(): prepare "SELECT COUNT(*) FROM main.selected_images"
     0,3740 [sql] /home/sg/Repos/darktable/src/common/collection.c:2399, function dt_collection_update_query(): prepare "DELETE FROM main.selected_images WHERE imgid NOT IN (SELECT DISTINCT mi.id FROM (SELECT  id, group_id, film_id, filename, datetime_taken,   flags, version,  position, aspect_ratio,  maker, model, lens, aperture, exposure, focal_length,  iso, import_timestamp, change_timestamp,  export_timestamp, print_timestamp  FROM main.images AS mi  ) AS mi WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) ORDER BY datetime_taken DESC, filename, version DESC LIMIT ?1, ?2)"
     0,3760 [sql] /home/sg/Repos/darktable/src/common/collection.c:899, function _dt_collection_compute_count(): prepare "SELECT COUNT(DISTINCT mi.id) FROM (SELECT  id, group_id, film_id, filename, datetime_taken,   flags, version,  position, aspect_ratio,  maker, model, lens, aperture, exposure, focal_length,  iso, import_timestamp, change_timestamp,  export_timestamp, print_timestamp  FROM main.images AS mi  ) AS mi WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) AND (group_id = -1 OR id IN (SELECT id FROM (SELECT id, MIN(ABS(id-group_id)*2 + CASE WHEN (id-group_id) < 0 THEN 1 ELSE 0 END) FROM main.images WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) GROUP BY group_id))) OR (id = -1) ORDER BY datetime_taken DESC, filename, version DESC"
     0,3783 [sql] /home/sg/Repos/darktable/src/common/collection.c:899, function _dt_collection_compute_count(): prepare "SELECT COUNT(DISTINCT mi.id) FROM (SELECT  id, group_id, film_id, filename, datetime_taken,   flags, version,  position, aspect_ratio,  maker, model, lens, aperture, exposure, focal_length,  iso, import_timestamp, change_timestamp,  export_timestamp, print_timestamp  FROM main.images AS mi  ) AS mi WHERE   (flags & 256) != 256  AND  (( (film_id IN (SELECT id FROM main.film_rolls WHERE folder LIKE '/media/sg/Pictures/Catalog/2023%')))) ORDER BY datetime_taken DESC, filename, version DESC"
     0,3794 [sql] /home/sg/Repos/darktable/src/common/collection.c:927, function dt_collection_get_selected_count(): prepare "SELECT COUNT(*) FROM main.selected_images"
     0,3794 [sql] /home/sg/Repos/darktable/src/common/collection.c:927, function dt_collection_get_selected_count(): prepare "SELECT COUNT(*) FROM main.selected_images"
     0,3794 [sql] /home/sg/Repos/darktable/src/common/collection.c:944, function dt_collection_get(): prepare "SELECT mi.imgid FROM main.selected_images AS s JOIN memory.collected_images AS mi WHERE mi.imgid = s.imgid LIMIT -1, ?1"
     0,3794 [pwstorage_new] Creating new context 0x56363b5341b0
     0,3794 [pwstorage_new] no storage backend. not storing username/password. please change in preferences, core tab.
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: 'very fast GPU'
[opencl_init] opencl_library: 'default path'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl library 'libOpenCL' found on your system and loaded

Try starting darktable via: darktable --disable-opencl

1 Like

Thanks, this works! Disabling opencl in darktablerc seemed not to work, no idea why. Now I’ll need to find out why dt doesn’t work anymore with opencl.

The opencl showed as active in your output. I would start with checking your video card drivers. Up to date? Also, turn off the opencl performance running. What card do you have?

I am using an AMD Radeon RX5700XT card. I updated all software on my system, so it should have the latest driver.
glxinfo gives:

:→ glxinfo | rg OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 5700 XT (navi10, LLVM 15.0.7, DRM 3.49, 6.2.7-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.3.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.3.6
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions: