Davinci Resolve Studio install Issues

Happy for you!

It doesn’t solve the issue for me. QT is a library for creating plots / user interfaces, so that flag has probably got something to do with it, but no idea to what extent!

A couple questions to help me:

  • What’s your desktop environment? (Gnome, Sway, Hyprland)
  • What version of davinci-resolve are you running?
  • What version of nixpkgs?

Thank you for your help. fingers crossed it’s also a command line argument for me too

Sorry, I think I mistakenly mislead you on my progress.
Prior, I never even got to any visible Resolve screen, nothing visible.
Using QT_QPA_PLATFORM = “wayland;xcb”; at least got me to booting up Resolve.

My issue now is ‘Unsupported GPU Processing Mode’ so something is weird in passing / seeing mu opencl/opengl/gpus, for some reason. So not functional yet.

Bear in mind, I did get Resolve working under Distrobox so I know the program runs on my hardware. Something is weird with nixos.

If you want to try Distrobox - https://www.youtube.com/watch?v=wmRiZQ9IZfc

But for now. I need to determine the opencl/gpu issue


I’m running Sway, Davinci Resolve Studio 18.6.6 and using the unstable branch

After quite a bit of debugging the “unsupported gpu processing mode” message on my AMD-based laptop, I realized that the NixOS Resolve packages have broken OpenCL support. You can build them with OpenCL support using this overlay:

  davinci-resolve-studio = prev.davinci-resolve-studio.override (old: {
    buildFHSEnv = a: (old.buildFHSEnv (a // {
      extraBwrapArgs = a.extraBwrapArgs ++ [
        "--bind /run/opengl-driver/etc/OpenCL /etc/OpenCL"
      ];
    }));
  });

With that, Resolve seems to work great on my AMD internal graphics.

3 Likes

wow great it’s working for you. I can’t say the same but that may well be on my side. I’m very new to nix and linux but I’m trying.

I made these entries in my flake.nix file which built ok. That doesn’t mean the implentation is correct tho. I still get Unsupported GPU

  outputs = { self, nixpkgs, nixpkgs-2311, disko, home-manager, ... }@inputs:
    let
      system = "x86_64-linux";

      overlay-2311 = final: prev: {
        pkgs-2311 = import nixpkgs-2311 {
          inherit system;
          config.allowUnfree = true;
        };
      };

      overlay-davinci-resolve-studio = old: prev: {
        davinci-resolve-studio = prev.davinci-resolve-studio.override (old: {
          buildFHSEnv = a: (old.buildFHSEnv (a // {
            extraBwrapArgs = a.extraBwrapArgs ++ [
              "--bind /run/opengl-driver/etc/OpenCL /etc/OpenCL"
            ];
          }));
        });
      };

..........

      my-modules = [
        disko.nixosModules.disko
        # nur.nixosModules.nur
        home-manager.nixosModules.home-manager
        {
          # nixpkgs.overlays = [
          #   inputs.neovim-nightly-overlay.overlay
          #   inputs.neorg-overlay.overlays.default
          # ];
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.extraSpecialArgs = specialArgs;
        }
        # Overlays-module makes `pkgs.pkgs-2311` available in configuration.nix
        ({ config, pkgs, ... }: {
          nixpkgs.overlays = [ overlay-2311 overlay-davinci-resolve-studio ];
        })
      ];

Do you see anything in error?
Thanks for all this work in debugging too. That’s just incredible!

I don’t see where you’ve actually installed the davinci-resolve-studio package, but maybe you did that in the elided part of the config.

Two questions:

  • Does your GPU show up in clinfo --list? I see:
$ clinfo --list
Platform #0: AMD Accelerated Parallel Processing
 `-- Device #0: gfx1103
  1. Does the new argument appear in your davinci-resolve-studio wrapper script?
$ grep OpenCL $(which davinci-resolve-studio)
  --bind /run/opengl-driver/etc/OpenCL /etc/OpenCL

If those both check out and you still get unsupported GPU, I guess you could repeat the debugging step I used:

LD_DEBUG=files ROC_ENABLE_PRE_VEGA=1 strace -f -o /tmp/davinci.log -s 65535 -tt davinci-resolve-studio

This creates a very voluminous log at /tmp/davinci.log. I figured out what was wrong when I saw this line:

924994 12:51:04.151254 openat(AT_FDCWD, "/etc/OpenCL/vendors/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)

On NixOS that path is actually /run/opengl-driver/etc/OpenCL/vendors/.

1 Like

yes, I installed DRS in the packages part of my nix configs

OK, for a little while now, clinfo just gives a core dump and I have no idea why. I think it’s rocm related.

That said, ’ grep OpenCL $(which davinci-resolve-studio) ’ gives the same result as you.

Anyway, I guess I will check the debug step next.

BTW, would you mind replying with your hardware.opengl = { parameters? Maybe this is an area I’ve screwed up, while trying to get DRS working?

Thank you again

Finally a hint as to what might be going wrong. Thank you! I will try modifying the path with the overlay on my system once I have the time to later this week.

Is this a case for a bug report @quentin and if so, will you be submitting one so the nix package is fixed?

1 Like

@quentin @finnomenon

OK I finally have it figured and working.

❯ clinfo --list
Platform #0: AMD Accelerated Parallel Processing
 `-- Device #0: gfx803

For my trusty RX580, the problems stems from ROCM v6.x
I reverted anything rocm related back to v5 and clinfo now works and amazingly, so does Davinci Resolve Studio.
Thank you all for this. simply huge

1 Like

The overlay replacing the directory fixed it for the davinci-resolve package for me, same as with davinci-resolve-studio. Thank you so much!

Could you share your config? ive been trying to get it to work for a few days now

Could you share your config?

in my configuration.nix I have the following:

  nixpkgs.overlays = [ (final: prev: {
    davinci-resolve-studio = prev.davinci-resolve-studio.override (old: {
      buildFHSEnv = a: (old.buildFHSEnv (a // {
        extraBwrapArgs = a.extraBwrapArgs ++ [
          "--bind /run/opengl-driver/etc/OpenCL /etc/OpenCL"
        ];
      }));
    });
  })];

Remove -studio if you are using the free version.

I meant it more as a whole, that didnt do anything for me probably missing some options

actually tried it and i got

bwrap: Can't find source path /run/opengl-driver/etc/OpenCL: No such file or directory

You will need the AMD driver and rocm packages:

  boot.initrd.kernelModules = [ "amdgpu"];
  hardware.opengl.extraPackages = with pkgs; [
        rocm-opencl-icd
        rocm-opencl-runtime
        rocmPackages.rocm-runtime
        amdvlk
  ];

Same output, i tried rebooting too

After a bit of tinkering now it doesnt even launch, but hey atleast it picks up something with openCL

Edit: everything that uses openCL crashes

you might be using the latest rocm packages which are v6.x
for me at least, reverting to rocm v5 got davinci resolve and clinfo etc to work.

     hardware.opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;
       extraPackages = with pkgs; [

        rocmPackages_5.clr.icd

      ];
      extraPackages32 = with pkgs; [
#        driversi686Linux.amdvlk 
      ];
    };

   systemd.tmpfiles.rules = [
     "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages_5.clr}"
        ];

I also load other packages which I don’t whether needed or not but they follow the same naming convention such as -

          rocmPackages_5.rocminfo
          rocmPackages_5.rocm-runtime

It’s all black magic and messy getting this to work. I’m thankful I finally got DRS working though

1 Like

Oh god ty so much i spent days trying to get it to work this fixed it for me

Arms heavy. Davinci Resolve (package) on its knees sweating.
Here’s to apply the fix on AMD graphics (for future reference):

  1. Add the overlay-davinci-resolve-studio block to flake.nix (expand quote to see the code needed):
  1. Add these lines in configuration.nix if missing:
  boot = {
    initrd.kernelModules = ["amdgpu"];
  };
  # Usually some other configuration...
  hardware.opengl.extraPackages = with pkgs; [
    rocmPackages_5.rocm-runtime
    rocmPackages_5.rocminfo
    amdvlk
    rocmPackages_5.clr.icd
  ];
  hardware.opengl = {
    enable = true;
    driSupport = true;
    driSupport32Bit = true;
  };
  systemd.tmpfiles.rules = [
     "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages_5.clr}"
  ];

Also, if you have double GPU setup it might help to launch DRS as so: DRI_PRIME=1 davinci-resolve-studio for the dGPU to be used.

2 Likes