From 954d659264f89227d21b42bb5bc8716056ee1022 Mon Sep 17 00:00:00 2001 From: oddlama Date: Sun, 1 Oct 2023 14:03:42 +0200 Subject: [PATCH] chore: remove picom again. makes everything slow :( --- modules/optional/hardware/nvidia.nix | 9 +-------- users/myuser/graphical/default.nix | 1 - users/myuser/graphical/i3.nix | 2 +- users/myuser/graphical/picom.nix | 19 ------------------- 4 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 users/myuser/graphical/picom.nix diff --git a/modules/optional/hardware/nvidia.nix b/modules/optional/hardware/nvidia.nix index 493b7ac..cdc2bf5 100644 --- a/modules/optional/hardware/nvidia.nix +++ b/modules/optional/hardware/nvidia.nix @@ -6,14 +6,7 @@ }: lib.optionalAttrs (!minimal) { boot.blacklistedKernelModules = ["nouveau"]; - services.xserver = { - videoDrivers = lib.mkForce ["nvidia"]; - screenSection = '' - Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" - Option "AllowIndirectGLXProtocol" "off" - Option "TripleBuffer" "on" - ''; - }; + services.xserver.videoDrivers = lib.mkForce ["nvidia"]; hardware = { nvidia = { diff --git a/users/myuser/graphical/default.nix b/users/myuser/graphical/default.nix index f80b5c2..21c9fec 100644 --- a/users/myuser/graphical/default.nix +++ b/users/myuser/graphical/default.nix @@ -17,7 +17,6 @@ # XXX: retest this in the future. Problems were flickering under gles, black screens and refresh issues under vulkan, black wine windows. # ./sway.nix ./i3.nix - ./picom.nix ] ++ lib.optionals nixosConfig.graphical.gaming.enable [ ./games/bottles.nix diff --git a/users/myuser/graphical/i3.nix b/users/myuser/graphical/i3.nix index d2d37cd..c019dd7 100644 --- a/users/myuser/graphical/i3.nix +++ b/users/myuser/graphical/i3.nix @@ -59,7 +59,7 @@ in { out="/tmp/screenshots.$UID/$(date +"%Y-%m-%dT%H:%M:%S%:z")-selection.png" mkdir -p "$(dirname "$out")" - ${pkgs.maim}/bin/maim --color=.4,.7,1 --bordersize=1.0 --nodecorations=1 --hidecursor --format=png --quality=10 --noopengl --select "$out" + ${pkgs.maim}/bin/maim --color=.4,.7,1,0.2 --bordersize=1.0 --nodecorations=1 --hidecursor --format=png --quality=10 --noopengl --select "$out" notification_id=$(${pkgs.libnotify}/bin/notify-send --icon="$out" --print-id --app-name "screenshot-area" "Screenshot Captured" "šŸ“‹ copied to clipboard\nāŒ› Running OCR...") ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png < "$out" if ${pkgs.tesseract}/bin/tesseract "$out" - -l eng+deu | ${pkgs.xclip}/bin/xclip -selection primary; then diff --git a/users/myuser/graphical/picom.nix b/users/myuser/graphical/picom.nix deleted file mode 100644 index aecad55..0000000 --- a/users/myuser/graphical/picom.nix +++ /dev/null @@ -1,19 +0,0 @@ -{pkgs, ...}: { - services.picom = { - enable = true; - package = pkgs.picom-next; - backend = "glx"; - # XXX: switch to backend = "xrender"; if glx causes issues - settings = { - # Unredirect all windows if a full-screen opaque window is detected, to - # maximize performance for full-screen windows. Known to cause - # flickering when redirecting/unredirecting windows. - unredir-if-possible = true; - - # Use X Sync fence to sync clients' draw calls, to make sure all draw - # calls are finished before picom starts drawing. Needed on - # nvidia-drivers with GLX backend for some users. - xrender-sync-fence = true; - }; - }; -}