DaVinci Resolve: Difference between revisions

Marie (talk | contribs)
m Reformat example code with nixfmt
Updated the broken link.
 
(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,
   config,
   lib,
   lib,
Line 59: Line 59:
}:
}:
{
{
  imports = [ ./hardware-configuration.nix ];
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.initrd.kernelModules = [ "amdgpu" ];
  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; [
   environment.systemPackages = with pkgs; [
    kitty
    mesa-demos
    vulkan-tools
    clinfo
     davinci-resolve
     davinci-resolve
   ];
   ];
  programs.hyprland.enable = true;
  services.dbus.enable = true;
  services.xserver.videoDrivers = [ "amdgpu" ];
   environment.variables = {
   environment.variables = {
     RUSTICL_ENABLE = "radeonsi";
     RUSTICL_ENABLE = "radeonsi";
    ROC_ENABLE_PRE_VEGA = "1";
   };
   };
   hardware.graphics = {
   hardware.graphics = {
     enable = true;
     enable = true;
     extraPackages = with pkgs; [
     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
       mesa.opencl # Enables Rusticl (OpenCL) support
     ];
     ];
   };
   };
  system.stateVersion = "24.11";
}</syntaxhighlight>
}</syntaxhighlight>


=== Intel ===
=== Intel ===


DaVinci Resolve has partial support for Intel GPUs on Linux. Audio playback works on the Fairlight page, but the video timeline does not work. To add Intel support, add the following setting to your <code>configuration.nix</code>:
DaVinci Resolve has partial support for Intel GPUs on Linux. Audio playback works on the Fairlight page, but the video timeline does not work. To add Intel support, add one of the option to your <code>configuration.nix</code>:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 110: Line 82:
     enable32Bit = true;
     enable32Bit = true;
     extraPackages = with pkgs; [
     extraPackages = with pkgs; [
         intel-compute-runtime
         intel-compute-runtime # For Intel 12th Gen and newer
        intel-compute-runtime-legacy1 # For Intel Gen 8, 9, 11
     ];
     ];
   };
   };
Line 117: Line 90:
== 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 139: Line 112:


If you can spot a line similar to <code>Cannot mix incompatible Qt library (5.15.12) with this library (5.15.2)</code>, and have configured QT options in your NixOS configuration (<code>qt.enable = true;</code>), try disabling them.
If you can spot a line similar to <code>Cannot mix incompatible Qt library (5.15.12) with this library (5.15.2)</code>, and have configured QT options in your NixOS configuration (<code>qt.enable = true;</code>), try disabling them.
=== Resolve crashes on Edit/Fusion tab with Intel iGPU ===
If you are using <code>intel-compute-runtime-legacy1</code> and DaVinci Resolve crashes whenever you try to switch to Edit or Fusion tab, it indicates the issue with the latest package. If you want to learn more about how to pinning packages works you can read [[FAQ/Pinning Nixpkgs|this article]].
Here's the solution for [[NixOS system configuration#Defining NixOS as a flake|flake-based]] NixOS system:
{{File|3=inputs = {
    nixpkgs-c5ae371f1.url = "github:nixos/nixpkgs/0c3fc1cd3494aa52a2c111d5f18a7689fd15ab83"; # Paste this nixpkgs commit to your Flake's inputs.
  };
  outputs = { nixpkgs, ... }@inputs
  {
    # Pass it to your configuration.nix via inputs.
  };|name=flake.nix|lang=Nix}}{{File|3={ inputs, ... }:
{
  # OpenCL support.
  hardware.graphics = {
    enable = true;
    enable32Bit = true;
    extraPackages =
    let
      pkgs = import inputs.nixpkgs-c5ae371f1 {
        system = "x86_64-linux";
        config.allowUnfree = true;
      };
    in
      [
        pkgs.intel-compute-runtime-legacy1 # Use the latest driver commit that worked with DaVinci Resolve.
      ];
  };
}|name=configuration.nix|lang=Nix}}


=== Cannot import video file ===
=== Cannot import video file ===
Line 154: Line 158:
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]]