Force Gamescope to use NVIDIA graphics card on hybrid system

This is apparently an issue with gamescope 3.15.0 and above as reported in Assertion '!modifiers.empty()' when running gamescope in embedded mode · Issue #1215 · ValveSoftware/gamescope · GitHub

The easiest workaround is to backport the version to 3.14.29 until this is fixed:

  nixpkgs.overlays = [
    (_: prev: {
      gamescope = prev.gamescope.overrideAttrs (_: rec {
        version = "3.14.29";
        src = prev.fetchFromGitHub {
          owner = "ValveSoftware";
          repo = "gamescope";
          rev = "refs/tags/${version}";
          fetchSubmodules = true;
          hash = "sha256-q3HEbFqUeNczKYUlou+quxawCTjpM5JNLrML84tZVYE=";
        };
      });
    })
  ];

You should probably do this as an overlay to override this for all launchers that might use the derivation.

1 Like