Nvidia offload, screen tearing, and game crashes

  • 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:


The game functions as expected which is very strange and I have no idea what would be causing that…

  • my nvidia.nix;

{ config, pkgs, … }:

nv-offload = pkgs.writeShellScriptBin “nv-offload” ‘’
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a “$0” “$@”

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”;