-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Apply workarounds for other programs included with Resolve (#104)
- Replaces `run-davinci` with `/etc/profile.d/davinci.sh` - Repurposse `run-davinci` for just opting in to ROCm on AMD, or rusticl on Intel/Nouveau - Restores old `add-davinci-launcher` behavior of modifying every .desktop file included with Resolve, not just the one for DaVinci Resolve itself Closes #100
- Loading branch information
Showing
6 changed files
with
43 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Info for this line comes from here: https://www.reddit.com/r/voidlinux/comments/12g71x0/comment/l2cwo27/ | ||
# Slightly modified, as the original wasn't pointed to the correct lib file names | ||
export LD_PRELOAD=/usr/lib64/libglib-2.0.so.0:/usr/lib64/libgdk_pixbuf-2.0.so.0:/usr/lib64/libgio-2.0.so.0:/usr/lib64/libgmodule-2.0.so.0 | ||
export QT_QPA_PLATFORM=xcb | ||
|
||
gpu_type="" | ||
|
||
get_gpu_type () { | ||
if lshw -c video 2>/dev/null | grep -qi nvidia; then | ||
gpu_type="nvidia" | ||
elif lshw -c video 2>/dev/null | grep -qi amd; then | ||
gpu_type="amd" | ||
elif lshw -c video 2>/dev/null | grep -qi intel; then | ||
gpu_type="intel" | ||
fi | ||
} | ||
|
||
use_rusticl () { | ||
export RUSTICL_ENABLE=radeonsi,iris,nouveau | ||
export OCL_ICD_VENDORS=rusticl.icd | ||
} | ||
|
||
get_gpu_type | ||
|
||
# Default to rusticl on AMD GPUs | ||
if [[ $gpu_type == "amd" ]]; then | ||
use_rusticl | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Info for this line comes from here: https://www.reddit.com/r/voidlinux/comments/12g71x0/comment/l2cwo27/ | ||
# Slightly modified, as the original wasn't pointed to the correct lib file names | ||
export LD_PRELOAD=/usr/lib64/libglib-2.0.so.0:/usr/lib64/libgdk_pixbuf-2.0.so.0:/usr/lib64/libgio-2.0.so.0:/usr/lib64/libgmodule-2.0.so.0 | ||
export QT_QPA_PLATFORM=xcb | ||
source /etc/profile.d/davinci.sh | ||
|
||
gpu_type="" | ||
|
||
get_gpu_type () { | ||
if [[ -n $(glxinfo -B | grep -i nvidia) ]]; then | ||
gpu_type="nvidia" | ||
elif [[ -n $(glxinfo -B | grep -i AMD) ]]; then | ||
gpu_type="amd" | ||
elif [[ -n $(glxinfo -B | grep -i Intel) ]]; then | ||
gpu_type="intel" | ||
fi | ||
} | ||
|
||
use_rusticl () { | ||
export RUSTICL_ENABLE=radeonsi,iris,nouveau | ||
export OCL_ICD_VENDORS=rusticl.icd | ||
disable_rusticl () { | ||
export RUSTICL_ENABLE="" | ||
export OCL_ICD_VENDORS="" | ||
} | ||
|
||
get_gpu_type | ||
|
||
# Default to rusticl on AMD GPUs | ||
# Don't use rusticl if arg rocm is passed | ||
# Allow use of arg rusticl to opt in for Intel and Nvidia nouveau users | ||
if [[ $gpu_type == "amd" && $1 != "rocm" || $1 == "rusticl" ]]; then | ||
if [[ $1 == "rusticl" ]]; then | ||
use_rusticl | ||
elif [[ $1 == "rocm" ]]; then | ||
disable_rusticl | ||
fi | ||
|
||
/opt/resolve/bin/resolve |