From 747032d9a4b4bcdc120c8b10e0bde74ab2971a8f Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 2 Apr 2024 09:02:44 +0000 Subject: [PATCH] dino: run with higher scheduling priority --- hosts/common/programs/dino.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/common/programs/dino.nix b/hosts/common/programs/dino.nix index 32959ec8..9fdaa8f1 100644 --- a/hosts/common/programs/dino.nix +++ b/hosts/common/programs/dino.nix @@ -99,9 +99,14 @@ in # pipewire uses power-of-two buffering for the mic itself. that would put us at 21.33 ms, but this env var supports only whole numbers (21ms ends up not power-of-two). # also, Dino's likely still doing things in 10ms batches internally anyway. # + # further: decrease the "niceness" of dino, so that it can take precedence over anything else. + # ideally this would target just the audio processing, rather than the whole program. + # pipewire is the equivalent of `nice -n -21`, so probably don't want to go any more extreme than that. + # nice -n -15 chosen arbitrarily; not optimized + # # note that debug logging during calls produces so much journal spam that it pegs the CPU and causes dropped audio # env G_MESSAGES_DEBUG = "all"; - command = "env PULSE_LATENCY_MSEC=20 dino"; + command = "env PULSE_LATENCY_MSEC=20 nice -n -15 dino"; }; }; }