gamemode
gamemode copied to clipboard
Add the option to specify wrappers inside the config file
Is your feature request related to a problem? Please describe. If I want to use PRIME Render offloading (which I do), I always have to set the environment variable GAMEMODERUNEXEC before running gamemoderun.
Describe the solution you'd like I'd like to have something I could add in the config file for Gamemode to specify wrapper scripts and programs.
Describe alternatives you've considered
An alternative could be reusing the start
option in the [custom]
category and making gamemoderun use the same environment variables as the ones in this start
option, so that I could export the variable in that section
Additional context I did try doing the thing I talked about in the alternatives section, but it didn't work. Maybe it is supposed to work and I'm doing something wrong?
[custom]
start=export GAMEMODERUNEXEC="env __NV_PRIME_RENDER_OFFLOAD=1 env __GLX_VENDOR_LIBRARY_NAME=nvidia env __VK_LAYER_NV_optimus=NVIDIA_only"
Doing this won't work, but adding the environment variable before the command, like you would normally, does:
$ gamemoderun glxinfo | grep -i 'opengl renderer'
OpenGL renderer string: Mesa Intel(R) UHD Graphics (TGL GT1)
$ GAMEMODERUNEXEC="env __NV_PRIME_RENDER_OFFLOAD=1 env __GLX_VENDOR_LIBRARY_NAME=nvidia env __VK_LAYER_NV_optimus=NVIDIA_only" gamemoderun glxinfo | grep -i 'opengl renderer'
gamemodeauto:
gamemodeauto:
gamemodeauto:
OpenGL renderer string: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2