mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
Compare commits
13 Commits
d8ca282fc0
...
nvidia
| Author | SHA1 | Date | |
|---|---|---|---|
| 62e405196e | |||
| 72d2707fa0 | |||
| f6b1f449aa | |||
| 5d04a9f5d5 | |||
| cf2bbd1c49 | |||
| d17ec55b41 | |||
|
|
27e2faf73d | ||
| dda4d8355b | |||
| 6e78d5d6eb | |||
| a9c5fac08f | |||
| fcad4c9e90 | |||
| 84e4959013 | |||
| 12fbbac878 |
@@ -282,6 +282,12 @@ in
|
||||
It also drastically increases the time the driver needs to clock down after load
|
||||
'';
|
||||
|
||||
disableOpenglMemoryReuse = lib.mkEnableOption ''
|
||||
disable OpenGL memory reuse,
|
||||
by setting `GLVidHeapReuseRatio` to `0` for all applications in NVIDIA application profiles.
|
||||
This is useful to work around issues with excessive video memory usage under wayland.
|
||||
'';
|
||||
|
||||
package = lib.mkOption {
|
||||
default =
|
||||
config.boot.kernelPackages.nvidiaPackages."${if cfg.datacenter.enable then "dc" else "stable"}";
|
||||
@@ -464,6 +470,11 @@ in
|
||||
assertion = cfg.dynamicBoost.enable -> lib.versionAtLeast nvidia_x11.version "510.39.01";
|
||||
message = "NVIDIA's Dynamic Boost feature only exists on versions >= 510.39.01";
|
||||
}
|
||||
|
||||
{
|
||||
assertion = cfg.disableOpenglMemoryReuse -> lib.versionAtLeast nvidia_x11.version "565.77";
|
||||
message = "GLVidHeapReuseRatio is only supported on versions >= 565.77";
|
||||
}
|
||||
];
|
||||
|
||||
# If Optimus/PRIME is enabled, we:
|
||||
@@ -559,6 +570,13 @@ in
|
||||
source = "${nvidia_x11.bin}/share/nvidia/nvidia-application-profiles-rc";
|
||||
};
|
||||
|
||||
"nvidia/nvidia-application-profiles-rc.d/vram" = lib.mkIf cfg.disableOpenglMemoryReuse {
|
||||
source = pkgs.writeText "save-vram" (builtins.toJSON {
|
||||
rules = [{ pattern = { feature = "true"; matches = ""; }; profile = "save-vram"; }];
|
||||
profiles = [{ name = "save-vram"; settings = [{ key = "GLVidHeapReuseRatio"; value = 0; }]; }];
|
||||
});
|
||||
};
|
||||
|
||||
# 'nvidia_x11' installs it's files to /run/opengl-driver/...
|
||||
"egl/egl_external_platform.d".source = "/run/opengl-driver/share/egl/egl_external_platform.d/";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user