Files
vimix/rsc/launch_vimix.sh
Bruno Herbelin 8a336b3a6e Package launch_vimix script in flatpak and snap for wayland support
under wayland window manager, there are opengl driver issues (specifically for nvidia) so vimix shall be launched with specific settings using a launcher script
2025-01-09 18:58:46 +01:00

20 lines
554 B
Bash

#!/bin/bash
# Test if running under wayland
if [ -z "$WAYLAND_DISPLAY" ]; then
# not Wayland, nothing special
vimix "$@"
else
# 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