From 796b637946eb97dc68529b395e27fa0a6a569367 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 22 Sep 2024 12:36:05 +0200 Subject: [PATCH] pipewire: fix latency when gaming --- hosts/solaire/default.nix | 1 + modules/pipewire.nix | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index efa0220..6ea595d 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -42,6 +42,7 @@ }; modules.nvidia.enable = true; modules.gaming.enable = true; + modules.pipewire.latencyFix.enable = true; stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg; } diff --git a/modules/pipewire.nix b/modules/pipewire.nix index e5cf2e9..e319ffa 100644 --- a/modules/pipewire.nix +++ b/modules/pipewire.nix @@ -21,10 +21,11 @@ in services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable { "context.properties" = { - "default.clock.rate" = 48000; - "default.clock.quantum" = 32; - "default.clock.min-quantum" = 32; - "default.clock.max-quantum" = 32; + "default.clock.rate" = 48000; + "default.clock.allowed-rates" = [ 48000 ]; + "default.clock.quantum" = 2048; + "default.clock.min-quantum" = 1024; + }; }; };