From 1b9888aaa0361abb4c3ea62880a04b669f4dc050 Mon Sep 17 00:00:00 2001 From: Tmplt Date: Fri, 19 Oct 2018 00:57:35 +0200 Subject: [PATCH] nixos/compton: fix corrupt colours with Mesa 18 on AMD On AMD hardware with Mesa 18, compton renders some colours incorrectly when using the glx backend. This patch sets an environmental variable for compton so colours are rendered correctly. Topical bug: --- nixos/modules/services/x11/compton.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/services/x11/compton.nix b/nixos/modules/services/x11/compton.nix index 8641c05de52e..cafd8d88ec4d 100644 --- a/nixos/modules/services/x11/compton.nix +++ b/nixos/modules/services/x11/compton.nix @@ -238,6 +238,12 @@ in { description = "Compton composite manager"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; + + # Temporarily fixes corrupt colours with Mesa 18 + environment = mkIf (cfg.backend == "glx") { + allow_rgb10_configs = "false"; + }; + serviceConfig = { ExecStart = "${cfg.package}/bin/compton --config ${configFile}"; RestartSec = 3;