From a258f0c86127cb32ee1cab7c391d3c1d58d76584 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sat, 3 May 2025 21:56:51 +0100 Subject: [PATCH] hyprland: GSK_RENDERER=ngl Mitigate an issue with GTK4 apps becoming unresponsive and logging the message: vkWaitForFences(): The logical or physical device has been lost. (VK_ERROR_DEVICE_LOST) (-4) According to https://gitlab.gnome.org/GNOME/gtk/-/issues/7441 this manifests when running: - Fractional scaling - GTK < 4.18 - nvidia driver <= 570 --- users/jordan/common/optional/graphical/hyprland/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/users/jordan/common/optional/graphical/hyprland/default.nix b/users/jordan/common/optional/graphical/hyprland/default.nix index 55b6297..aa8f948 100644 --- a/users/jordan/common/optional/graphical/hyprland/default.nix +++ b/users/jordan/common/optional/graphical/hyprland/default.nix @@ -12,6 +12,7 @@ let elem mapAttrs mkIf + versionOlder ; inherit (lib.generators) toINI @@ -36,6 +37,8 @@ let if elem "nvidia" osConfig.services.xserver.videoDrivers then { GBM_BACKEND = "nvidia-drm"; + GSK_RENDERER = + if versionOlder osConfig.hardware.nvidia.package.version "570" then "ngl" else "vulkan"; LIBVA_DRIVER_NAME = "nvidia"; } else