From def7d8f75494f80ba090990cea8e62b74ac9492f Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 30 Oct 2026 00:47:51 +0800 Subject: [PATCH] feat(niri): enable on-demand VRR for games Turn on adaptive sync at the output only when a game window opts in, keeping desktop compositing fixed-rate to avoid idle/low-load VRR flicker. The Steam/Proton game rule enables VRR alongside the fullscreen rule. Assisted-by: DeepSeek Harness (deepseek-flash) --- home/linux/gui/niri/conf/windowrules.kdl | 1 + hosts/idols-ai/niri-hardware.kdl | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/home/linux/gui/niri/conf/windowrules.kdl b/home/linux/gui/niri/conf/windowrules.kdl index 69531dd2..e96e9e35 100644 --- a/home/linux/gui/niri/conf/windowrules.kdl +++ b/home/linux/gui/niri/conf/windowrules.kdl @@ -90,6 +90,7 @@ window-rule { exclude title="^(公告|Announcement|Notice)$" open-on-workspace "4entertainment" open-fullscreen true + variable-refresh-rate true } window-rule { match app-id="heroic" diff --git a/hosts/idols-ai/niri-hardware.kdl b/hosts/idols-ai/niri-hardware.kdl index b5ab17a1..713a1b86 100644 --- a/hosts/idols-ai/niri-hardware.kdl +++ b/hosts/idols-ai/niri-hardware.kdl @@ -28,6 +28,11 @@ output "Beihai Century Joint Innovation Technology Co.,Ltd P32A2V 0000000000000" // (this panel's 120 Hz mode, for example, is 119.880, not 120). mode "3840x2160@144.000" + // Adaptive sync only while a game window requests it. The desktop then + // stays fixed-rate, avoiding VRR flicker during low-load desktop work. + // The game window rule below opts in with variable-refresh-rate true. + variable-refresh-rate on-demand=true + // Position of the output in the global coordinate space. // This affects directional monitor actions like "focus-monitor-left", and cursor movement. // The cursor can only move between directly adjacent outputs.