Geoffrey Frogeye
1f61ceb395
They're a bit slower to start :(. Hopefully this is something that flakes will help with, otherwise I'll find another way.
13 lines
309 B
Bash
Executable file
13 lines
309 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [ -z $DISPLAY ]
|
|
then
|
|
sudo tee /proc/acpi/bbswitch <<< ON
|
|
"$@"
|
|
rmmod nvidia_uvm
|
|
rmmod nvidia
|
|
sudo tee /proc/acpi/bbswitch <<< OFF
|
|
else
|
|
PATH="/opt/cuda/bin:$PATH" LD_LIBRARY_PATH="/opt/cuda/lib64:$LD_LIBRARY_PATH" VBLANK=0 VGL_READBACK=pbo optirun -c yuv "$@"
|
|
fi
|