DaVinci Resolve Studio GPU memory full

I have a laptop with intel and nvidia graphics. Trying to run DaVinci Resolve Studio from the 25.11 stable or unstable branch seems to have an issue where I receive a “GPU memory is full” error message.

I moved from Arch where I used to have to patch the desktop file with a string like:

env __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia 

However it seems like DaVinci sees and is using the NVIDIA without that on Nix so I’m not sure that’s necessary. I can see it using NVIDIA RAM with nvtop. Regardless, I went to try and add that to the desktop file but I cannot seem to add that line to the EXEC line Nix due to it being read-only.

Any thoughts on why this is happening and what to do to resolve?

Something I left out was that nvtop shows an increase in my NVIDIA VRAM usage by a few hundred MB when starting DaVinci but nowhere near the 6GB that my system has.

I’ve also been testing kdenlive but even when using the NVIDIA render options, can’t seem to achieve more than ~5-6fps.

I’ve tried several hardware config options including:

  hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;  
  hardware.nvidia.open = true;
  hardware.graphics.enable = true;
  services.xserver.videoDrivers = [ "nvidia" ];
  hardware.graphics.enable32Bit = true;

and

  hardware.nvidia = {
    modesetting.enable = true;
    open = false; # Use the open-source kernel module
    nvidiaSettings = true;
    package = config.boot.kernelPackages.nvidiaPackages.beta;
  
    prime = {
      offload = {
        enable = true;
        enableOffloadCmd = true;
      };
      # Use the Bus IDs you found earlier
      intelBusId = "PCI:0:2:0";
      nvidiaBusId = "PCI:1:0:0";
    };
  };

All the typical indicators seems to be showing the NVIDIA functional (nvtop and nvidia-settings) but DaVinci and Kdenlive both seem to be functioning as if it is not.

FYI, not sure this is a NIXOS issue. I’ve tried CachyOS and am now on Fedora both with the same issues. I was running DaVinci Resolve on this laptop just fine with Arch ~1 month or so ago. Don’t know what I’m missing or if DaVinci now needs more than 6GB of VRAM or what.

Correction, on Fedora, running it from the CLI preceded with the above does make it run normally.

So I guess I would just need to figure out how to replicate what that snippet is doing in NixOS to get it running.