DaVinci Resolve: Difference between revisions

Ahi6 (talk | contribs)
Intel: driSupport32Bit→enable32Bit
m Update status of wayland support
 
(6 intermediate revisions by 5 users not shown)
Line 52: Line 52:




'''Here is a confirmed minimal system configuration for amdgpu, radeonsi and OpenCL via Mesa (Rusticl):'''<syntaxhighlight lang="nix">
'''Here is a confirmed minimal configuration for amdgpu, radeonsi and OpenCL via Mesa (Rusticl):'''<syntaxhighlight lang="nix">{
{ config, lib, pkgs, ... }:
  config,
  lib,
  pkgs,
  ...
}:
{
{
   imports = [ ./hardware-configuration.nix];
   environment.systemPackages = with pkgs; [
  boot.loader.systemd-boot.enable = true;
    davinci-resolve
  boot.loader.efi.canTouchEfiVariables = true;
   ];
  boot.kernelPackages=pkgs.linuxPackages_latest;
   environment.variables = {
  boot.initrd.kernelModules=["amdgpu"];
    RUSTICL_ENABLE = "radeonsi";
  nixpkgs.config.allowUnfree = true;
  networking.hostName = "davinci-test";
   networking.networkmanager.enable = true;  
   time.timeZone = "Europe/Amsterdam";
  services.pipewire = {
    enable = true;
    pulse.enable = true;
   };
   };
  environment.systemPackages = with pkgs; [
  hardware.graphics = {
kitty
    enable = true;
mesa-demos
    extraPackages = with pkgs; [
vulkan-tools
      mesa.opencl # Enables Rusticl (OpenCL) support
clinfo
    ];
  davinci-resolve
  };
  ];
}</syntaxhighlight>
  programs.hyprland.enable=true;
  services.dbus.enable=true;
  services.xserver.videoDrivers =["amdgpu"];
  environment.variables={
RUSTICL_ENABLE="radeonsi";
ROC_ENABLE_PRE_VEGA = "1";
  };
hardware.graphics = {
  enable = true;
  extraPackages = with pkgs; [
    mesa
    libva
    libvdpau-va-gl
    vulkan-loader
    vulkan-validation-layers
    amdvlk  # Optional: AMD's proprietary Vulkan driver
    mesa.opencl # Enables Rusticl (OpenCL) support
  ];
};
  system.stateVersion = "24.11";
}
</syntaxhighlight>


=== Intel ===
=== Intel ===
Line 103: Line 78:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  hardware.opengl = {
  hardware.graphics = {
     enable = true;
     enable = true;
     enable32Bit = true;
     enable32Bit = true;
Line 114: Line 89:
== X11 or Wayland ==
== X11 or Wayland ==


DaVinci Resolve can run on both X11 and on Wayland.
Currently, DaVinci Resolve can not run on native Wayland. This is due to qtwayland version mismatch. See [https://github.com/NixOS/nixpkgs/issues/341634 nixpkgs issue] .  


If you want to maximize your chances you can try and start davinci in the following way to check for ROCM or Rusticl support
If you want to maximize your chances you can try and start davinci in the following way to check for ROCM or Rusticl support
Line 120: Line 95:
<code>ROC_ENABLE_PRE_VEGA=1 RUSTICL_ENABLE=amdgpu,amdgpu-pro,radv,radeon,radeonsi DRI_PRIME=1 QT_QPA_PLATFORM=xcb davinci-resolve</code>
<code>ROC_ENABLE_PRE_VEGA=1 RUSTICL_ENABLE=amdgpu,amdgpu-pro,radv,radeon,radeonsi DRI_PRIME=1 QT_QPA_PLATFORM=xcb davinci-resolve</code>


== OpenFX Plugins ==
The usual install location <code>/usr/OFX/Plugins</code> is not available on NixOS. Fortunately, DaVinci Resolve supports loading OpenFX plugins from locations specified in <code>OFX_PLUGIN_PATH</code>. This environment variable can be configured comfortably by adding the following code listing to the system configuration:<syntaxhighlight lang="nixos">
environment.variables = {
    OFX_PLUGIN_PATH = lib.concatStringsSep ";" [
      # specify plugin packages here
    ];
};
</syntaxhighlight>Plugins usually contain a directory called <code>$PLUGINNAME.ofx.bundle</code> with a <code>.ofx</code> file somewhere inside of it. Since the coercion of a package to a string outputs its store location and the paths specified in the environment variable are traversed recursively, it is not necessary to specify the precise location of the ofx bundle in the nix store.


== Troubleshooting ==
== Troubleshooting ==
=== Resolve crashes/fails to start ===
=== Resolve crashes/fails to start ===
If it doesn't launch, and crashes when running <code>davinci-resolve</code>, then try running it as root.
If it doesn't launch, and crashes when running <code>davinci-resolve</code>, then try running it as root.
Line 145: Line 126:
If DaVinci Resolve shows a popup asking to review GPU configuration in preferences, and if there is no GPU detected in "Memory and GPU" in preferences, you can try the following in your <code>configuration.nix</code>:
If DaVinci Resolve shows a popup asking to review GPU configuration in preferences, and if there is no GPU detected in "Memory and GPU" in preferences, you can try the following in your <code>configuration.nix</code>:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">hardware.graphics = {
hardware.opengl = {
   enable = true;
   enable = true;
   extraPackages = with pkgs; [
   amdgpu.opencl.enable = true;
    rocmPackages.clr.icd
  };</syntaxhighlight>
  ];
  };
</syntaxhighlight>


[[Category:Applications]]
[[Category:Applications]]