DaVinci Resolve: Difference between revisions

Opengears (talk | contribs)
updated davinci compatibility matrix
m Changed hardware.opengl to hardware.graphics in Unsupported GPU Processing Mode, because i got a evaluation warning when building nix
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[https://www.blackmagicdesign.com/products/davinciresolve Black Magic Davinci Resolve] is a program for video editing, color effects and A/V post production. For FOSS alternatives you might want to look into [https://www.shotcut.org/ Shotcut] and [https://kdenlive.org/ Kdenlive].  
[https://www.blackmagicdesign.com/products/davinciresolve Black Magic DaVinci Resolve] is a program for video editing, color effects and A/V post production. For FOSS alternatives you might want to look into [https://www.shotcut.org/ Shotcut] and [https://kdenlive.org/ Kdenlive].  


== Installation ==
== Installation ==


There are [https://github.com/NixOS/nixpkgs/blob/504dc57774510c1213a8a3a04d03048893d8edce/pkgs/by-name/da/davinci-resolve/package.nix#L37 two versions] of [https://www.blackmagicdesign.com/products/davinciresolve Black Magic Davinci Resolve] on NixOS.
There are [https://github.com/NixOS/nixpkgs/blob/504dc57774510c1213a8a3a04d03048893d8edce/pkgs/by-name/da/davinci-resolve/package.nix#L37 two versions] of [https://www.blackmagicdesign.com/products/davinciresolve Black Magic DaVinci Resolve] on NixOS.
  * <code>davinci-resolve</code> (the free version)
  * <code>davinci-resolve</code> (the free version)
  * <code>davinci-resolve-studio</code> (the paid version)
  * <code>davinci-resolve-studio</code> (the paid version)


For Linux, Davinci Resolve Free has [https://www.reddit.com/r/davinciresolve/comments/y4ytkl/why_no_mp4h264_support_on_linux/ only partial h.264 and h.265 support due to licensing restrictions]. AAC audio is also not supported in the Free version.
For Linux, DaVinci Resolve Free has [https://www.reddit.com/r/davinciresolve/comments/y4ytkl/why_no_mp4h264_support_on_linux/ only partial h.264 and h.265 support due to licensing restrictions]. AAC audio is also not supported in the Free version.


== Drivers ==
== Drivers ==
Line 15: Line 15:
=== AMD ===
=== AMD ===


There are multiple options to run Davinci Resolve with AMD cards, but it strongly depends on the generation of your AMD card. Also make sure to read the [[AMD_GPU|AMD GPU page]] (this wiki) and the [https://wiki.archlinux.org/title/DaVinci_Resolve Davinci Resolve entry on Archwiki].
There are multiple options to run DaVinci Resolve with AMD cards, but it strongly depends on the generation of your AMD card. Also make sure to read the [[AMD_GPU|AMD GPU page]] (this wiki) and the [https://wiki.archlinux.org/title/DaVinci_Resolve DaVinci Resolve entry on Archwiki].
{| class="wikitable"
{| class="wikitable"
|+ AMD GPU Compatibility with DaVinci Resolve on Linux
|+ AMD GPU Compatibility with DaVinci Resolve on Linux
Line 37: Line 37:
|Only working if card is supported in <code>amdgpu</code> open-source driver!
|Only working if card is supported in <code>amdgpu</code> open-source driver!
|-
|-
| GCN 1.2 (Gen 3) || Radeon R9 285, R9 380, R9 Fury || Moderate (OpenCL 1.2) || ❌ Not Supported || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed with <code>amdgpu</code>, <code>radeonsi</code>, and OpenCL via Rusticl
| GCN 1.2 (Gen 3) || Radeon R9 285, R9 380, R9 Fury || Moderate (OpenCL 1.2) || ❌ Not Supported || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed with amdgpu, radeonsi and OpenCL via Mesa (Rusticl). See the demo configuration below
|-
|-
| GCN 4th Gen (Polaris) || Radeon RX 400/500 Series || Moderate (OpenCL 1.2) || Supported up to ROCm 5.6 || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed with amdgpu, radeonsi and OpenCL via Mesa (rustiCL). See the configuration below
| GCN 4th Gen (Polaris) || Radeon RX 400/500 Series || Moderate (OpenCL 1.2) || Supported up to ROCm 5.6 || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed with <code>amdgpu</code>, <code>radeonsi</code>, and OpenCL via Rusticl (Mesa)
|-
|-
| GCN 5th Gen (Vega) || Radeon RX Vega Series || Moderate (OpenCL 1.2) || Supported up to ROCm 5.6 || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed
| GCN 5th Gen (Vega) || Radeon RX Vega Series || Moderate (OpenCL 1.2) || Supported up to ROCm 5.6 || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed
Line 49: Line 49:
| RDNA3 (Navi 3x) || Radeon RX 7000 Series || Good (OpenCL 1.2) || Supported || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed
| RDNA3 (Navi 3x) || Radeon RX 7000 Series || Good (OpenCL 1.2) || Supported || ✅ Yes || ✅ Rusticl supported via <code>radeonsi</code> & Mesa || ✅ Confirmed
|}
|}
Contrary to the [https://wiki.archlinux.org/title/DaVinci_Resolve#Installation Arch Wiki], DaVinci Resolve seems to work (on an RX 570) without switching to proprietary GPU drivers, as they can work with [https://www.phoronix.com/search/RadeonSI radeonsi]. Cheap and good working cards to look out for are the ''Radeon RX Polaris'' series, which are supported with the amdgpu driver (radeonssi, OpenCL via Mesa and Rusticl).
Cheap and minimal supported cards to look out for are the ''Radeon R9'' series starting from GCN 1.2 and higher. Find more information about the [[wikipedia:AMDgpu_(Linux_kernel_module)|AMDgpu (Linux kernel module)]] which is upstreamed with Linux. There is also the proprietary '''amdgpu-pro''' driver which has [https://www.reddit.com/r/NixOS/comments/13vcufk/install_radeon_6650xt_pro_drivers/ mixed results]. The free drivers (amdgpu) are better.


There is also the proprietary '''amdgpu-pro''' driver which has [https://www.reddit.com/r/NixOS/comments/13vcufk/install_radeon_6650xt_pro_drivers/ mixed results]. The free drivers (amdgpu) are better.


'''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 104: Line 78:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  hardware.opengl = {
  hardware.graphics = {
     enable = true;
     enable = true;
     driSupport32Bit = true;
     enable32Bit = true;
     extraPackages = with pkgs; [
     extraPackages = with pkgs; [
         intel-compute-runtime
         intel-compute-runtime
Line 115: Line 89:
== X11 or Wayland ==
== X11 or Wayland ==


Davinci Resolve can run on both X11 and on Wayland.
DaVinci Resolve can run on both X11 and on Wayland.


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


<code>ROC_ENABLE_PRE_VEGA=1 RUSTICL_ENABLE=amdgpu,amdgpu-pro,radv,radeon 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 146: 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; [
   extraPackages = with pkgs; [
     rocmPackages.clr.icd
     rocmPackages.clr.icd
   ];
   ];
  };
  };</syntaxhighlight>
</syntaxhighlight>
 
[[Category:Applications]]