Skip to content

Commit

Permalink
feat: Add rusticl as opt-in option (#67)
Browse files Browse the repository at this point in the history
- Adds SKIP_PACKAGE_CHECK=1 during DaVinci Resolve installation, due to
an error with the installer not detecting that zlib is present
- Adds mesa-libOpenCL for rusticl
- Makes rusticl opt-in with `run-davinci`
  • Loading branch information
zelikos authored Apr 24, 2024
1 parent 0e51e96 commit fcc7a76
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ You will also need the latest release of DaVinci Resolve from [Blackmagic's webs

If you're less comfortable in the CLI, I recommend using the `setup.sh` script from this repository to help simplify the setup process, but ultimately use of the CLI is currently a requirement.

### AMD

Currently, davincibox uses ROCm by default for AMD GPUs. However, [GPU support in ROCm is very limited](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html#supported-gpus), and some users may have reported [issues](https://github.com/zelikos/davincibox/issues/65) when using it. Davincibox now also includes `mesa-libOpenCL`, and so `rusticl` can be tried as an alternative.

If you experience issues using ROCm and would like to test rusticl:

- Follow the davincibox setup instructions below as normal
- Run DaVinci Resolve with:
- Toolbox: `toolbox run -c davincibox /usr/bin/run-davinci rusticl`
- Distrobox: `distrobox enter -n davincibox -- /usr/bin/run-davinci rusticl`

If rusticl does work better for you and you would like to launch Resolve with rusticl automatically, you can also adjust the `DaVinciResolve.desktop` file in `$HOME/.local/share/applications`. Add `rusticl` to the end of the `Exec=` line, before `%u`. e.g. `Exec=/usr/bin/toolbox run -c davincibox /usr/bin/run-davinci rusticl %u`

### NVIDIA

NVIDIA users will need to install the `nvidia-container-toolkit`. If you are using a [Universal Blue](https://universal-blue.org/) image such as [Bluefin](https://projectbluefin.io/), this will already be installed. Otherwise, see [NVIDIA's installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) for instructions for your distribution.
Expand Down
1 change: 1 addition & 0 deletions extra-packages
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ libXrandr
libXtst
libXxf86vm
mesa-libGLU
mesa-libOpenCL
mtdev
pipewire-alsa
pulseaudio-libs
Expand Down
13 changes: 7 additions & 6 deletions system_files/usr/bin/add-davinci-launcher
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

container_type="distrobox"
container_run_command=""
setup_launcher=true

if [[ $1 == "remove" ]]
Expand Down Expand Up @@ -66,14 +67,14 @@ then
sed -i "s,Icon=/opt/resolve/graphics,Icon=$HOME/.local/share/resolve/graphics," ~/.local/share/applications/DaVinci*.desktop
sed -i "s,Path=.*,Path=$HOME," ~/.local/share/applications/{blackmagicraw*,DaVinci*}.desktop

if [[ $container_type == "toolbox" ]]
then
sed -i 's/Exec=/Exec=env QT_QPA_PLATFORM=xcb \/usr\/bin\/toolbox run --container davincibox /' ~/.local/share/applications/{blackmagicraw*,DaVinci*}.desktop
elif [[ $container_type == "distrobox" ]]
then
sed -i 's/Exec=/Exec=env QT_QPA_PLATFORM=xcb \/usr\/bin\/distrobox-enter -n davincibox -- /' ~/.local/share/applications/{blackmagicraw*,DaVinci*}.desktop
if [[ $container_type == "toolbox" ]]; then
container_run_command="/usr/bin/toolbox run -c davincibox"
elif [[ $container_type == "distrobox" ]]; then
container_run_command="/usr/bin/distrobox-enter -n davincibox --"
fi

sed -i "s,Exec=/opt/resolve/bin/resolve,Exec=$container_run_command /usr/bin/run-davinci," ~/.local/share/applications/{blackmagicraw*,DaVinci*}.desktop

# Overwrite shortcut created by upstream DaVinci Resolve installer
desktop_shortcut=$HOME/Desktop/com.blackmagicdesign.resolve.desktop
if [[ -f $desktop_shortcut ]]
Expand Down
7 changes: 7 additions & 0 deletions system_files/usr/bin/run-davinci
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [[ $1 == "rusticl" ]]; then
QT_QPA_PLATFORM=xcb RUSTICL_ENABLE=radeonsi,iris,nouveau OCL_ICD_VENDORS=rusticl.icd /opt/resolve/bin/resolve
else
QT_QPA_PLATFORM=xcb /opt/resolve/bin/resolve
fi
2 changes: 1 addition & 1 deletion system_files/usr/bin/setup-davinci
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
if [[ $valid = true ]]
then
# See https://github.com/zelikos/davincibox/issues/35
sudo QT_QPA_PLATFORM=minimal $installer -i -a -y
sudo QT_QPA_PLATFORM=minimal SKIP_PACKAGE_CHECK=1 $installer -i -a -y
if [[ $? -eq 0 ]]; then
install_success=true
# Workaround for an issue with Resolve's included libglib-2.0
Expand Down

0 comments on commit fcc7a76

Please sign in to comment.