global(gui): add pure nvidia flicker workaround

This commit is contained in:
514fpv 2024-01-19 21:59:46 +08:00
parent 048f37e680
commit c8c6f4ef08
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -41,7 +41,9 @@ in {
vaapiVdpau
libvdpau-va-gl
intel-compute-runtime
] ++ optional nvidia nvidia-vaapi-driver;
] ++
optional nvidia nvidia-vaapi-driver ++
optional (cfg.type == "nvidia") vulkan-validation-layers;
};
services.xserver.videoDrivers =
@ -66,8 +68,12 @@ in {
open = false;
};
environment.variables = {
# work around broken nvidia hw cursor on wayland
environment.variables.WLR_NO_HARDWARE_CURSORS = mkIf (cfg.type == "nvidia") "1";
WLR_NO_HARDWARE_CURSORS = mkIf (cfg.type == "nvidia") "1";
# work around wlroots flickering on pure nvidia
WLR_RENDERER = mkIf (cfg.type == "nvidia") "vulkan";
};
specialisation.integratedGraphics = mkIf (cfg.type == "prime") {
configuration = {