- First off, the screen tearing;
Nvidia-settings is empty which I assume means that – among other things – “prime synchronization” is off, which from what I know would lead to screen tearing,
From what I can tell “nvidia-drm” is set to be on by default since setting it with my nvidia.nix didn’t change much if anything,
I’ve also tried adding various things under the xserver config section but nothing I’ve tried so far has mitigated the screen tearing or shown anything new under Nvidia-settings, If anyone has xserver configs that work with offloading please share them,
- and second, the crashing;
HollowKnight specifically crashes when I add the “nv-offload %command%” to it through steam, none of my other games do this, just HK for some reason…
But when I add the relevant wrapper commands directly with the following:
__NV_PRIME_RENDER_OFFLOAD=1 __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only %command%
The game functions as expected which is very strange and I have no idea what would be causing that…
- my nvidia.nix;
{ config, pkgs, … }:
let
nv-offload = pkgs.writeShellScriptBin “nv-offload” ‘’
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a “$0” “$@”
‘’;
in{
environment.systemPackages = [ nv-offload ];services.xserver = {
videoDrivers = [ “nvidia” ];config = ‘’ ‘’;
};
hardware.nvidia.prime = {
offload.enable = true;intelBusId = “PCI:0:2:0”;
nvidiaBusId = “PCI:1:0:0”;
};
}