Lots of davinci on linux guides are very out of date:

  • Open source AMD drivers and opencl have worked fine for more than a year
  • Davinci is no longer delivered as an rpm that you have to port to debian systems with alien
  • You don't have to do fancy distrobox containerization stuff for system libraries

Installation instructions

I'll explain how I got it working recently on debian sid since it's not super obvious.

  1. Update your kernel and mesa

  2. Install opencl drivers. You have 2 choices here:

    • Install mesa-opencl-icd

      This installs 2 different opencl providers:

      • Clover: The traditional opencl. Doesn't work on AMD
      • rusticl: New opencl implementation in rust. Interface "works" when env RUSTICL_ENABLE=radeonsi is set but fails to render
    • Install rocm-opencl-icd

      • Works out of the box on newer AMD hardware, but requires env ROC_ENABLE_PRE_VEGA=1 set for older cards
  3. Install davinci. It comes in a .run executable.

    • It'll install to /opt/resolve by default.
    • You may need to set SKIP_PACKAGE_CHECK=1
  4. There were some version mismatches with provided davinci libraries. Fix by removing or moving the libraries so it uses system ones:

    cd /opt/resolve/libs/
    mkdir _disabled/
    mv libglib-2.0.so* libgio-2.0.so* libgmodule-2.0.so* _disabled/
    
  5. Davinci will now run, but on older AMD cards you may need to set an environment variable to explicitly tell it it's on an old card, or davinci will tell you it can't find your GPU:

    ROC_ENABLE_PRE_VEGA=1 /opt/resolve/bin/resolve
    
  6. The free version of davinci on linux is missing a bunch of codecs. Format your input files with this little script:

    #!/bin/bash -x
    
    trap "exit" INT
    
    for file in "$@"
    do
        cd $(dirname "$file")
        fname=$(basename "$file")
        ffmpeg -nostdin -i "$file" -c:a pcm_s16le -c:v libsvtav1 -crf 0 "${fname%.*}.mkv"
        cd -
    done
    

    It takes media files as arguments and spits out mkv files encoded losslessly with AV1 (If your inputs are also mkv just make the extension uppercase or adjust the script)


I've spent 2 years on-and-off trying to get it running before I finally figured it out. Since all the guides are outdated or just plain wrong I figured I'd write it down for the next guy.