From bc3350f5019bb79ef99939b102ac79e3b9e3c5df Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Wed, 28 Jan 2026 10:44:47 +0000 Subject: [PATCH] AMD GPU Kernel patch --- nixos/configuration.nix | 22 +++++++++++----------- nixos/home.nix | 9 +++++---- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 16e87230..765857d0 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -126,17 +126,17 @@ defaultRuntime = true; autoStart = true; }; - # Kernel patch for SteamVR performance issues on AMD GPUs - # boot.kernelPatches = [ - # { - # name = "amdgpu-ignore-ctx-privileges"; - # patch = pkgs.fetchpatch { - # name = "cap_sys_nice_begone.patch"; - # url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch"; - # hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo="; - # }; - # } - # ]; + # Kernel patch for SteamVR performance issues on AMD GPUs (recompiles the kernel) + boot.kernelPatches = [ + { + name = "amdgpu-ignore-ctx-privileges"; + patch = pkgs.fetchpatch { + name = "cap_sys_nice_begone.patch"; + url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch"; + hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo="; + }; + } + ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/nixos/home.nix b/nixos/home.nix index edf6ee8d..11d9eccc 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -14,6 +14,7 @@ home.packages = with pkgs; [ nerd-fonts.jetbrains-mono nixfmt + nil bat vscode @@ -81,17 +82,17 @@ ORANGE='\e[38;5;214m' RESET='\e[0m' - pushd ~/dotfiles + pushd ~/dotfiles > /dev/null git diff -U0 *.nix echo -e "''${ORANGE}NixOS Rebuilding...''${RESET}" - if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC &> ~/.nixos-rebuild.log; then + if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC | tee ~/.nixos-rebuild.log; then cat ~/.nixos-rebuild.log | grep --color error exit 1 fi - cat ~/.nixos-rebuild.log | grep --color error + echo echo -e "''${ORANGE}Cleaning up old generations...''${RESET}" echo -e "''${GRAY}$(sudo nix-collect-garbage --delete-older-than 15d 2>&1)''${RESET}" - popd + popd > /dev/null '') ];