just trying to compile again

This commit is contained in:
Bruno Herbelin
2025-10-19 16:20:41 +02:00
parent c9ab557aaa
commit 0317262f85
5 changed files with 72 additions and 51 deletions

View File

@@ -1,13 +1,19 @@
#!/bin/bash
# test if there is an nvidia GPU
gpu=$(lspci | grep -i '.* vga .* nvidia .*')
shopt -s nocasematch
if [[ $gpu == *' nvidia '* ]]; then
# with nvidia, request render offload
printf 'Nvidia GPU present: %s\n' "$gpu"
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vimix "$@"
# Test if running under wayland
if [ -z "$WAYLAND_DISPLAY" ]; then
# not Wayland, nothing special
vimix "$@"
else
# otherwise, nothing special
printf 'GPU present: %s\n' "$gpu"
vimix "$@"
# Wayland: test if there is an nvidia GPU
gpu=$(lspci | grep -i '.* vga .* nvidia .*')
shopt -s nocasematch
if [[ $gpu == *' nvidia '* ]]; then
# with nvidia, request Wayland render offload
printf 'Nvidia GPU present: %s\n' "$gpu"
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vimix "$@"
else
# otherwise, nothing special
vimix "$@"
fi
fi