Compare commits
No commits in common. "dcd50a4b96799b368747cc31abd96e268e57b657" and "a072873cc32381383df696721a98e9022ba27b19" have entirely different histories.
dcd50a4b96
...
a072873cc3
4 changed files with 21 additions and 112 deletions
12
flake.lock
generated
12
flake.lock
generated
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750973805,
|
"lastModified": 1748737919,
|
||||||
"narHash": "sha256-BZXgag7I0rnL/HMHAsBz3tQrfKAibpY2vovexl2lS+Y=",
|
"narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "080e8b48b0318b38143d5865de9334f46d51fce3",
|
"rev": "5675a9686851d9626560052a032c4e14e533c1fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -22,11 +22,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750776420,
|
"lastModified": 1748460289,
|
||||||
"narHash": "sha256-/CG+w0o0oJ5itVklOoLbdn2dGB0wbZVOoDm4np6w09A=",
|
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "30a61f056ac492e3b7cdcb69c1e6abdcf00e39cf",
|
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
{ pkgs
|
|
||||||
, lib
|
|
||||||
, kernel ? pkgs.linuxPackages_latest.kernel
|
|
||||||
}:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "amdgpu-kernel-module";
|
|
||||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
|
||||||
|
|
||||||
kernel_dev = kernel.dev;
|
|
||||||
kernelVersion = kernel.modDirVersion;
|
|
||||||
|
|
||||||
modulePath = "drivers/gpu/drm/amd/amdgpu";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
|
|
||||||
|
|
||||||
cp $BUILT_KERNEL/Module.symvers .
|
|
||||||
cp $BUILT_KERNEL/.config .
|
|
||||||
cp $kernel_dev/vmlinux .
|
|
||||||
|
|
||||||
make "-j$NIX_BUILD_CORES" modules_prepare
|
|
||||||
make "-j$NIX_BUILD_CORES" M=$modulePath modules
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make \
|
|
||||||
INSTALL_MOD_PATH="$out" \
|
|
||||||
XZ="xz -T$NIX_BUILD_CORES" \
|
|
||||||
M="$modulePath" \
|
|
||||||
modules_install
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "AMD GPU kernel module";
|
|
||||||
license = lib.licenses.gpl3;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -10,13 +10,6 @@
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
# Direct patching to enable async reprojection (for SteamVR) on AMD
|
|
||||||
let
|
|
||||||
amdgpu-kernel-module = pkgs.callPackage ./amdgpu.nix {
|
|
||||||
# Make sure the module targets the same kernel as your system is using.
|
|
||||||
kernel = config.boot.kernelPackages.kernel;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
|
@ -62,20 +55,11 @@ in
|
||||||
# Temporarily pin to 6.12 to fix llvm/rocm build
|
# Temporarily pin to 6.12 to fix llvm/rocm build
|
||||||
# https://github.com/NixOS/nixpkgs/issues/368672#issuecomment-2608697421
|
# https://github.com/NixOS/nixpkgs/issues/368672#issuecomment-2608697421
|
||||||
# boot.kernelPackages = pkgs.linuxPackages_6_12;
|
# boot.kernelPackages = pkgs.linuxPackages_6_12;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
# boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
# nct6775 - for monitoring functions on ASUS ROG STRIX B550-F GAMING WIFI II
|
# nct6775 - for monitoring functions on ASUS ROG STRIX B550-F GAMING WIFI II
|
||||||
# kvm-amd - AMD virtualization support
|
# kvm-amd - AMD virtualization support
|
||||||
boot.kernelModules = [ "kvm-amd" "nct6775" ];
|
boot.kernelModules = [ "kvm-amd" "nct6775" ];
|
||||||
|
|
||||||
# Fix problems with hanging on RX6700 (disables PSR - Panel Self Refresh)
|
|
||||||
boot.kernelParams = [ "amdgpu.dcdebugmask=0x10" ];
|
|
||||||
|
|
||||||
boot.extraModulePackages = [
|
|
||||||
(amdgpu-kernel-module.overrideAttrs (_: {
|
|
||||||
patches = [ ./patches/cap_sys_nice_begone.patch ];
|
|
||||||
}))
|
|
||||||
];
|
|
||||||
|
|
||||||
# Direct patching for enabling for async reprojection (for SteamVR) on AMD
|
# Direct patching for enabling for async reprojection (for SteamVR) on AMD
|
||||||
# boot.kernelPatches = [
|
# boot.kernelPatches = [
|
||||||
# {
|
# {
|
||||||
|
@ -206,7 +190,6 @@ in
|
||||||
#networking.firewall.allowedTCPPorts = [ 9003 ];
|
#networking.firewall.allowedTCPPorts = [ 9003 ];
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [ 9003 ];
|
allowedTCPPorts = [ 9003 ];
|
||||||
allowedUDPPorts = [ 51820 ];
|
allowedUDPPorts = [ 51820 ];
|
||||||
# if packets are still dropped, they will show up in dmesg
|
# if packets are still dropped, they will show up in dmesg
|
||||||
|
@ -214,8 +197,8 @@ in
|
||||||
checkReversePath = "loose";
|
checkReversePath = "loose";
|
||||||
extraCommands = ''
|
extraCommands = ''
|
||||||
# Enable connections to Ollama for VPN users:
|
# Enable connections to Ollama for VPN users:
|
||||||
iptables -t filter -I INPUT --protocol TCP --source 10.40.4.0/24 --destination 10.40.4.2 --dport 8080 -j ACCEPT
|
|
||||||
iptables -t filter -I INPUT --protocol TCP --source 10.40.4.2/32 --destination 10.40.4.2 --dport 11434 -j ACCEPT
|
iptables -t filter -I INPUT --protocol TCP --source 10.40.4.2/32 --destination 10.40.4.2 --dport 11434 -j ACCEPT
|
||||||
|
iptables -t filter -I INPUT --protocol TCP --source 10.0.7.0/24 --destination 10.40.4.2 --dport 11434 -j ACCEPT
|
||||||
'';
|
'';
|
||||||
# wireguard trips rpfilter up
|
# wireguard trips rpfilter up
|
||||||
#extraCommands = ''
|
#extraCommands = ''
|
||||||
|
@ -266,6 +249,7 @@ in
|
||||||
libreoffice-qt # libreoffice - qt is best for KDE
|
libreoffice-qt # libreoffice - qt is best for KDE
|
||||||
hunspell # spell checking
|
hunspell # spell checking
|
||||||
hunspellDicts.en_US # spell check dictionary
|
hunspellDicts.en_US # spell check dictionary
|
||||||
|
#corectl # this doesn't exist????
|
||||||
magic-wormhole # transfer files with ease
|
magic-wormhole # transfer files with ease
|
||||||
screen # terminal multiplexer...from GNU
|
screen # terminal multiplexer...from GNU
|
||||||
gnumake # build automation tool
|
gnumake # build automation tool
|
||||||
|
@ -460,30 +444,13 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultRuntime = true; # Register as default OpenXR runtime
|
defaultRuntime = true; # Register as default OpenXR runtime
|
||||||
forceDefaultRuntime = true; # Register as default OpenXR runtime for each user (remove home-manager file)
|
forceDefaultRuntime = true; # Register as default OpenXR runtime for each user (remove home-manager file)
|
||||||
highPriority = true;
|
|
||||||
package = (pkgs.monado.overrideAttrs {
|
|
||||||
pname = "monado-wmr-controllers"; # optional but helps distinguishing between packages
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitLab {
|
|
||||||
domain = "gitlab.freedesktop.org";
|
|
||||||
owner = "thaytan";
|
|
||||||
repo = "monado";
|
|
||||||
rev = "467166935eea0183a8c8f5884c4ecd20c0eeacfb";
|
|
||||||
hash = "sha256-IKO/bhUsISmRb3k+wAEscuTUXDyrzyVYQG1eJkLCIUI=";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
systemd.user.services.monado.environment = {
|
|
||||||
WMR_HANDTRACKING = "0"; # Enable for hand tracking
|
|
||||||
XRT_PRINT_OPTIONS = "1"; # Enable printing env vars set/available
|
|
||||||
VIT_SYSTEM_LIBRARY_PATH = "${pkgs.basalt-monado}/lib/libbasalt.so";
|
|
||||||
XRT_COMPOSITOR_COMPUTE = "1";
|
|
||||||
STEAMVR_LH_ENABLE = "0";
|
|
||||||
U_PACING_COMP_MIN_TIME_MS = "5";
|
|
||||||
XRT_COMPOSITOR_DESIRED_MODE = "1";
|
|
||||||
};
|
};
|
||||||
|
#systemd.user.services.monado.environment = {
|
||||||
|
# WMR_HANDTRACKING = "0"; # Enable for hand tracking
|
||||||
|
# XRT_PRINT_OPTIONS = "1"; # Enable printing env vars set/available
|
||||||
|
# VIT_SYSTEM_LIBRARY_PATH = "${pkgs.basalt-monado}/lib/libbasalt.so";
|
||||||
|
# #U_PACING_COMP_MIN_TIME_MS = "5"; # This is a tweak for something...I forgot
|
||||||
|
#};
|
||||||
# allow clock adjustments/priority change, etc (gamemoderun ./game)
|
# allow clock adjustments/priority change, etc (gamemoderun ./game)
|
||||||
# https://wiki.nixos.org/wiki/GameMode
|
# https://wiki.nixos.org/wiki/GameMode
|
||||||
programs.gamemode.enable = true; # for performance mode
|
programs.gamemode.enable = true; # for performance mode
|
||||||
|
@ -492,6 +459,12 @@ in
|
||||||
|
|
||||||
programs.steam.gamescopeSession.enable = true;
|
programs.steam.gamescopeSession.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
From fe059b4c373639fc5d69067e62de3f2a0e44a037 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sefa Eyeoglu <contact@scrumplex.net>
|
|
||||||
Date: Fri, 17 Mar 2023 16:50:57 +0100
|
|
||||||
Subject: [PATCH] amdgpu: allow any ctx priority
|
|
||||||
|
|
||||||
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
||||||
---
|
|
||||||
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
|
|
||||||
index d2139ac12159..c7f1d36329c8 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
|
|
||||||
@@ -107,7 +107,7 @@ static int amdgpu_ctx_priority_permit(struct drm_file *filp,
|
|
||||||
if (drm_is_current_master(filp))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
- return -EACCES;
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum amdgpu_gfx_pipe_priority amdgpu_ctx_prio_to_gfx_pipe_prio(int32_t prio)
|
|
||||||
--
|
|
||||||
2.39.2
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue