Darktable on WSL

I’ve just compiled darktable on windows using WSL and I’m amazed how good it works! The performance is slightly better than using the windows build.

And I’m also happy about the fact that I can get open source programs running on windows more easily than on Linux systems (for example displaycal). Also I can get the newest versions and updates of my favorite open source programs faster. Digikam and calibre latest versions are earlier available on windows using chocolatey than for example on Ubuntu.

I’ve already tried several times to use a Linux distro as my only operating system but at the end of the day I wasted all my time trying to fix problems related to drivers, energy management, display profiles not being loaded, Bluetooth headphones not working properly and so on.

I just feel bad for liking windows :smiley:

What do you think about WSL? Do you have a similar experience?

You shouldn’t. If it works for you that’s great. There are trade offs to every platform.

However…

I think you’re going to have a bad time here with WSL and darktable. So far as I know, GUI apps on WSL use RDP and Wayland to display the app. For Wayland, there is no working color management yet (it seems its being worked on now, for the Linux version of Wayland), and throwing on a layer of RDP, I have no idea what that is doing or how its rendering things. If you do a deep dive, please do let us know.

Can you provide export time for the same image and same settings between WSL and MSYS2?

Does OpenCL works on WSL?

No RDP in Win 11… but the issues around color management and no GPU support yet for OpenCL would still be there I would guess… I did it some time ago when you had to use RDP and later when you didn’t…but I found it easier to just dual boot into PopOS. In the end I just went back to WIndows as I have to do so much work in that platform… Using them I didn’t seem to think there was a massive difference but I have a decently spec’d machine …maybe the gap is greater as the hardware falls off??

Not unless that happened in the last month or so…

You mentioned that on another thread and I checked it doing an empiric test: using “system display profile” within WSL I get indeed wrong colors, but when I use my windows display profile I get correct colors:

darktable 4.0.1 on windows:
251.208603 [dev_process_export] pixel pipeline processing took 18.312 secs (5.453 CPU)

darktable 4.1.0+721~g8c01944cc-dirty on WSL:
498.157075 [dev_process_export] pixel pipeline processing took 18.580 secs (8.615 CPU)

I exported the same edit several times and the processing times are always very similar. Before that test I was just looking around into the -d perf logs and the WSL version seemed for me slighty faster.

Yes it works. I just followed the instructions here: https://www.intel.com/content/www/us/en/artificial-intelligence/harness-the-power-of-intel-igpu-on-your-machine.html

I think only CUDA works for Nvidia…this is specific to Intel stuff no??

Yes, I have an intel iris xe graphic card. I am more than satisfied with its performance.

All good but I think it has been shown before that its not such a huge improvement over CPU alone compared to say a discrete graphics card which with OpenCL working can often be 10x as fast so your system and set up might not reflect what someone would see comparing Windows performance with say a 3060 video card and then running it on WSL without opencl… if I get the time I will try my Win 11 , WSL and PopOS with Nvidia support on some common images and see what the times are…

I’ve just did again the export test with the current master version:

  • With OpenCL deactivated:
    125.605098 [dev_process_export] pixel pipeline processing took 35.950 secs (239.173 CPU)

  • With OpenCL enabled:
    93.179735 [dev_process_export] pixel pipeline processing took 21.704 secs (10.509 CPU)

Looking at the seconds it seems to be better with OpenCL. What does mean the number in parenthesis?

(I’m running now on battery saving mode, I think that is the reason why I get longer times exporting the same edit as in the previous post).

(PD: Indeed, when I plug in the computer I get again the exported edit in 18 seconds).

Yes you can actually add darktable as an application to use the GPU to the full extent… the settings are in the graphics section in windows and I have added ON1 Affinity and a couple of others…not sure if it makes a difference but it could also setting Windows to run on high performance mode …that might not work for your laptop but you could set it up to switch to that when plugged in to get the most bang for your buck…

You might find some interesting discussion here and it got explained to me near the end of this thread…

1 Like

@7osema I’m interested to try this on my windows box. What guide did you follow? And is it only running Darktable via WSL or the whole desktop, like a virtual machine?

What are you hoping for with this… When I did it it was just to see if I could get a GUI app to run in WSL after some recent updates… It ran fine but was certainly not faster than my native Windows version running on Windows with OpenCL activated…

I think you would get the same or better performance from a USB stick and boot in to Linux with opencl support… maybe wsl opencl support has expanded but back when I was playing with it there was no support for my 3060Ti

If you just wanted to do some testing or trouble shooting WSL would be okay but it is not going to be equal to running a true linux install if that was what you were after…

1 Like

I like to test things out, but if it does not have any improvement I will cancel my research. Did not thought about booting on an usb stick.

I decided to test it out maybe 18 months ago or so. I put POPOS on a separate hardrive. As a non linux person I saw so many posts about people trying to get NVIDIA drivers and opencl working I just used this as it had an simple install with NVIDIA support integrated.

I installed it independently so I don’t mess around with any boot loader. To access it I have to reboot and select that drive using the bios boot option but this is the way I like it. I can just simply reformat that drive or do what I like and it will not touch or be related to my main Windows install…

I played around for a bit in DT and really I didn’t seem to find that it was in any way noticeably different than my windows install. I had a decent spec’d system and so if my hardware was a bit older maybe there would have been a very good case to make the switch but in the end I have had very little issues or complaints running in WIndows. I usually build DT myself almost weekly and given that I do that the lack of any major issue in over 2 or 3 years save one or two small bugs makes it so that I find very little need to move to the linux version for now… Perhaps when I leave work and have no real reliance on the Windows eco system then I might revisit that…

Yes that is also a good option. Currently I only have installed Debian on a dedicated machine, you can see what I did for that here: seamless darktable on Debian 12 - Software / darktable - discuss.pixls.us

I will have to try to build Darktable on Windows, a year ago it did not work for me, while on Linux it’s working as expected.

I just installed msys2 and the dependencies then cloned the DT repo and the build.sh script works perfectly for me… has been that way for a few years now at least on my box… hopefully works for you if you decide you need it…

I tried to build it on Windows and it worked for me in one shot. I did a proper install of msys2 and all went well. First testing seems good because I had scaling issues with the pre compiled version.

:grinning:

1 Like