# Installing blackmagic Design DaVinci Resolve
***Last Updated: Early 2023***
[[Solus]] does not include [[Blackmagic DaVinci Resolve|Resolve]] in its 3rd party repo and [does not accept new contributions](https://github.com/getsolus/3rd-party/issues/63) to it even though there is as yet no new way to handle prepackaged applications with dependencies. This will walk you through a successful installation.
## Prerequisites
Resolve relies on the [OpenCL ICD loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) to do most of its work on the GPU. Optionally, it can use PostgreSQL to manage projects. Particularly good for multi-user setups.
To install those prerequisites:
```shell
sudo eopkg install ocl-icd
sudo eopkg install postgresql # optional
```
## Device Access
Resolve requires direct access to USB devices in order to see the license dongle and possibly for other hardware like the Speed Editor or consoles.
To do this set up your user groups to allow for low level access of USB devices:
```shell
sudo usermod -A -G plugdev
```
(you may also need to add the `usb` group)
## GPU Drivers
You will also need to make sure you are using the *official* binary NVidia drivers, the open source ones will *not* work:
```shell
sudo eopkg install nvidia-glx-driver-current
```
(or `nvidia-glx-driver` if you are on the LTS kernel)
## Running the Installer
Then you can obtain the official installer from the home page:
- https://www.blackmagicdesign.com/products/davinciresolve/
Ensure the installer is executable and run it from the command line.
```sh
r_version="18.6.4_Linux"
unzip "DaVinci_Resolve_Studio_$r_version.zip"
chmod +x "./DaVinci_Resolve_Studio_$r_version.run"
"./DaVinci_Resolve_Studio_$r_version.run"
```
Resolve will be installed automatically into `/opt/resolve` and also will provide a launch menu icon by placing a [[Linux Desktop Entry Files|.desktop file]] into your `~/Desktop` directory without you having to do anything.
## First Launch
During its first launch I recommend running it from the command line in case of any issues, since it will report errors there.
```sh
/opt/resolve/bin/resolve
```
External blackmagic control panels work with no additional effort for me.
# Troubleshooting
## SEGFAULT
If Resolve crashes with a `SEGFAULT` then you may have a permissions error.
- Ensure that [[#Device Access]] was set up properly.
- You may need to relog to ensure your user group changes go into effect.
- You can also run `/opt/resolve/bin/resolve` with `strace` to get an idea of what problem it is running into.
- The `deb` Resolve installer includes some extra permissions checks that might also be useful for troubleshooting.
## DaVinci Resolve Crashes on Startup due to Symbol Lookup Error
***Last Updated: May 2024***
This shouldn't be a problem with newer version of Resolve and Solus, but if Resolve is crashing to desktop at launch, then run it from a terminal as with [[#First Launch]].
If you see that Resolve is giving you a "symbol lookup error" in the terminal like this:
```
resolve: symbol lookup error: /usr/lib/libpango-1.0.so.0: undefined symbol: g_string_free_and_steal
```
Or
```
resolve: symbol lookup error: /opt/resolve/bin/../libs/libgio-2.0.so.0: undefined symbol: g_once_init_leave_pointer
```
Then the problem is likely due to an update to some important system libraries (`libpango`/`glib2`) in early 2023. This library update caused widespread issues in many apps and distros, including Resolve and Solus.
### Use System Libraries (simple)
If these files exist in `/opt/resolve/libs` then they may be interfering with Resolve's ability to talk to the system libraries which use different versions.
To get them out the way they can be deleted:
```sh
cd /opt/resolve/libs
rm -v libglib-2.0.so.0
rm -v libgio-2.0.so.0
rm -v libgmodule-2.0.so.0
rm -v libgobject-2.0.so.0
rm -v libpango-1.0.so.0
```
Or see a similar script below to rename them.
### Use System Libraries (explicit)
>[!SUCCESS] Updated May 2024
> This shouldn't be necessary anymore as of v18.6, but is left here for posterity.
To fix this, some of Resolve's libraries need to be switched out to use the system libraries instead:
```sh
cd /opt/resolve/libs
libdir="/usr/lib64"
# GLIB
mv -v libglib-2.0.so libglib-2.0.so.bak
ln -s -v "$libdir/libglib-2.so.0"
# GIO
mv -v libgio-2.0.so libgio-2.0.so.bak
ln -s -v "$libdir/libgio-2.0.so.0"
# GMODULE
mv -v libgmodule-2.0.so.0 libgmodule-2.0.so.0.bak
ln -s -v "$libdir/libgmodule-2.0.so.0"
# GOBJECT
mv -v libgobject-2.0.so.0 libgobject-2.0.so.0.bak
ln -s -v "$libdir/libgobject-2.0.so.0"
```
### Use Custom Libraries
>[!SUCCESS] Updated May 2024
> This shouldn't be necessary anymore as of v18.6, but is left here for posterity.
If you are not using Solus or are on a system which cannot be properly updated to use those libraries then it is possible to build your own instead.
#### Glib Build
As an alternative to using the system versions, you can build your own `glib` libraries and use them instead. This is what I've done and is surprisingly easy to do.
```sh
source_dir="~/Source/Clones"
mkdir -p "$source_dir"
cd "$source_dir"
git clone https://gitlab.gnome.org/GNOME/glib.git
cd glib
meson setup _build
meson compile -C _build
```
Then you an just copy `libglib-2.0.so`, `libgio-2.0.so.0`, and `libgmodule-2.0.so.0` to `/opt/resolve/libs` or just symlink them the same as we did above for the system libraries except swapping out `/usr/lib64/` with the path to your `_build` directory.
#### Pango Build
>[!SUCCESS] Updated May 2024
> This shouldn't be necessary at all, the errors are more likely due to the `glib` issue above.
Pretty much the same procedure as for `glib` above, but you want to make sure it is using the same `glib` you built above.
```sh
cd "$source_dir"
git clone https://gitlab.gnome.org/GNOME/pango.git
cd pango
ln -s "$source_dir/glib" subprojects/glib
meson setup _build
meson compile -C _build
```
>[!NOTE]
> If the [[Meson]] setup fails check the log, it will show the full paths of the binaries it is running. Ensure that tools like [[Fix Homebrew|Homebrew]] or [[Nix]] aren't disrupting things by injecting a `pkg-config` or `python3` binary into your path.
##### Pixbuf Build
>[!SUCCESS] Updated May 2024
> This shouldn't be necessary anymore as of v18.6, but is left here for posterity.
At one point I also built my own version of `pixbuf`.
```sh
git clone https://gitlab.gnome.org/GNOME/gdk-pixbuf.git
# edit meson_options.txt to disable man page generation
meson setup _build
meson compile -C _build
```
### References
- https://unix.stackexchange.com/questions/743572/fedora-38-davinci-resolve-no-longer-opens-after-updating-from-fedora-37-to-38
- https://www.reddit.com/r/voidlinux/comments/12g71x0/davinci_resolve_18_symbol_lookup_error_libgdk/
- https://www.reddit.com/r/Fedora/comments/12z32r1/davinci_resolve_libpango_undefined_symbol_g/
- https://github.com/AppImage/AppImageKit/issues/1162
- https://github.com/audacity/audacity/pull/1797/files
## Invalid GPU Configuration
>[!SUCCESS] Update 2023: This no longer seems to be an issue!
If Solus suspends the system then Resolve may report an Invalid GPU configuration or otherwise be unable to detect your GPU any longer. A reboot will reset it. You can enable "Caffeine Mode" with a Budgie widget to prevent sleeping.
## Arch-based Distros
If you are on this page but happen to be using an [[Arch]]-based distro, run the [DaVinci Resolve Checker](https://github.com/Ashark/davinci-resolve-checker) if anything misbehaves. Make sure you have the `distro` Python module installed and that the correct version of Python which has the module is the one you use.