I can't be arsed to remember

This commit is contained in:
Marc
2024-07-27 12:32:16 +02:00
parent 0f71c4d79d
commit 9b046ba364
4 changed files with 32 additions and 55 deletions
+2
View File
@@ -1,3 +1,5 @@
older-packages
*.pkg.*
src
sign*
pkg
-23
View File
@@ -1,23 +0,0 @@
# Maintainer: Marc barbier
pkgname=game-runner
pkgver=2.2
pkgrel=1
pkgdesc="Simple wrapper around envycontrol and optimus manager"
arch=('any')
url=''
license=('GPL2')
source=( 'gamerunner.sh' 'gamerunner.cfg' )
backup=( 'etc/gamerunner.cfg' )
optdepends=('optimus-manager: optimus-manager support'
'envycontrol: envycontrol support'
'supergfxctl: supergfxctl support' )
sha512sums=(
'b073f717f83942dbb90a98e557b4e32a9e8d0ac1ebb94e753698278afa40333ec8168d0f0ffde7d60a4ac75e66f41c98ba0a56becb691712cd76e39886691fbc'
'227fcebb72a73ff634278a61f07ef82e367bb9dc6f8bdd00a0fe774882b6c234421d1ef8639475e301820eb05ac9a4a3dc047c13875cc6f69d313f63c9e27c91'
)
package() {
install -Dm 755 "$srcdir/gamerunner.sh" "$pkgdir/usr/bin/gamerunner"
install -Dm 644 "$srcdir/gamerunner.cfg" "$pkgdir/etc/gamerunner.cfg"
}
+16 -10
View File
@@ -1,27 +1,32 @@
# 0=off(default safe) 1=on(might not load or cause crashes) 2=forced(might cause crashes)
MANGOHUD=0
MANGOHUD=2
USE_GAMEMODE=1
USE_DLSYM=1
#Un comment for RTX support on older proton
#Un comment for forced RTX support
#VKD3D_CONFIG=dxr,dxr11
PROTON_ENABLE_NVAPI=1
PROTON_HIDE_NVIDIA_GPU=0
PROTON_ENABLE_NGX_UPDATER=1
#Obs-vk capture
OBSCAP=1
#Not useful in most modern games, allows to tell the game you have an nvidia gpu
#PROTON_HIDE_NVIDIA_GPU=0
# Update automatically the Nvidia NGX framework, this cause lots of problem, The finals crash with it
#PROTON_ENABLE_NGX_UPDATER=1
#Enable obs-vk capture (cause issues with the finals)
OBSCAP=0
# small amd vulkan perf boost
RADV_PERFTEST=nggc
# Increase performance in most cases
__GL_THREADED_OPTIMIZATIONS=1
# Increase opengl performance in some cases but causes compatiblity issues(steam might not like it for instance)
#__GL_THREADED_OPTIMIZATIONS=1
mesa_glthread=true
# Reduce lantency on nvidia systems
__GL_MaxFramesAllowed=1
# Large BAR(Smart access memory) on any AMD hardware ( please use it only on suported hardware )
RADV_PERFTEST=sam
#RADV_PERFTEST=sam
# Force a specific icd
# Put here the icd of your igpu (radv / amdvlk / intel ). full path required !
# RADV
@@ -33,5 +38,6 @@ RADV_PERFTEST=sam
# INTEL (useless to specify leave it commented out)
# MESA_ICD="/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/intel_icd.i686.json"
#Unreliable in most cases
# Mostly untested
# Do not trust it with nvidia gpus
GAMESCOPE=0
+14 -22
View File
@@ -6,11 +6,14 @@ function preload() {
export LD_PRELOAD="${LD_PRELOAD}${LD_PRELOAD:+:}$1"
}
function prefix() {
export GR_PREFIX="$(which $1) $GR_PREFIX"
}
GR_PREFIX=""
MAIN_VENDOR=$(glxinfo | grep "OpenGL vendor string")
VULKAN_VENDOR=$(vulkaninfo --summary | grep "driverName" | grep -v llvm)
NVK_ICD="/usr/share/vulkan/icd.d/nouveau_icd.i686.json:/usr/share/vulkan/icd.d/nouveau_icd.x86_64.json"
NVKTEST=$(VK_ICD_FILENAMES=$NVK_ICD vulkaninfo --summary)
if [ "$MAIN_VENDOR" == "OpenGL vendor string: MESA" ]
then
@@ -21,10 +24,14 @@ else
MODE="nvidia"
export GAMESCOPE=0
else
# idenpendent from X11 and Wayland
VULKAN_VENDOR=$(vulkaninfo --summary | grep "driverName" | grep -v llvm)
if [[ "$VULKAN_VENDOR" =~ "NVIDIA" ]]
then
MODE="hybrid"
else
# idenpendent from X11 and Wayland
NVKTEST=$(VK_ICD_FILENAMES=$NVK_ICD vulkaninfo --summary)
if [[ ! -z "$NVKTEST" ]]
then
MODE="hybridnvk"
@@ -89,7 +96,7 @@ else
if (( $USE_GAMEMODE == 1 ))
then
preload "libgamemodeauto.so.0"
prefix "gamemoderun"
fi
if [ "$MODE" = "nvidia" ] || [ "$MODE" = "hybrid" ]
@@ -98,24 +105,9 @@ else
GAMESCOPE=0
fi
if (( $GAMESCOPE == 1 ))
then
echo "Disabling mangohud for safety with gamescope"
export MANGOHUD=0
fi
if (( $MANGOHUD == 2 ))
then
echo force loading mangohud
#on load la lib mango
preload "libMangoHud.so"
if (( "$USE_DLSYM" == 1 ))
then
export MANGOHUD_DLSYM=1
preload "libMangoHud_dlsym.so"
fi
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/\$LIB:/usr/\$LIB/mangohud"
export MANGOHUD=1
prefix "mangohud"
fi
if (( $OBSCAP == 1 ))
@@ -151,7 +143,7 @@ else
then
echo "hybrid"
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/nvidia_icd.json"
if [ "$XDG_SESSION_TYPE" == 1 ]
if [ "$XDG_SESSION_TYPE" == "x11" ]
then
export __NV_PRIME_RENDER_OFFLOAD=1
fi
@@ -175,7 +167,7 @@ then
echo hud $MANGOHUD
echo "Warning: this is still experimental"
echo "$GAMESCOPE_PATH" -f -b "$@"
"$GAMESCOPE_PATH" -f -b "$@"
exec "$GAMESCOPE_PATH" -f -b "$GR_PREFIX" "$@"
else
"$@"
exec sh -c "$GR_PREFIX '$@'"
fi