aarpc, amdgpu steamvr fix, deadbeef, 😭

This commit is contained in:
k3t
2026-07-10 23:44:41 -06:00
parent 7c0ab9e7a4
commit 6514158245
8 changed files with 147 additions and 13 deletions
+5
View File
@@ -0,0 +1,5 @@
{
services.arrpc = {
enable = true;
};
}
+4 -1
View File
@@ -7,5 +7,8 @@
email = "k3t@k3t.dev"; email = "k3t@k3t.dev";
}; };
}; };
lfs = {
enable = true;
};
}; };
} }
+2 -2
View File
@@ -1,6 +1,6 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
gtk = { gtk = {
enable = true; enable = false;
colorScheme = "dark"; colorScheme = "dark";
cursorTheme = { cursorTheme = {
name = "WhiteSur-cursors"; name = "WhiteSur-cursors";
@@ -20,4 +20,4 @@
theme = config.gtk.theme; theme = config.gtk.theme;
}; };
}; };
} }
+18 -1
View File
@@ -1,9 +1,26 @@
{pkgs, ...}:
{ {
imports = [ imports = [
./common.nix ./common.nix
./cfg/arrpc.nix
./cfg/keepassxc.nix ./cfg/keepassxc.nix
./cfg/kitty.nix ./cfg/kitty.nix
./cfg/gtk.nix #./cfg/gtk.nix
# excluded since there are issues with kde
./cfg/qbz.nix ./cfg/qbz.nix
]; ];
home.packages = with pkgs; [
(deadbeef-with-plugins.override {
plugins = [
deadbeefPlugins.mpris2
deadbeefPlugins.lyricbar
deadbeefPlugins.statusnotifier
deadbeefPlugins.waveform-seekbar
deadbeefPlugins.vgmstream
deadbeefPlugins.headerbar-gtk3
];
})
];
} }
@@ -0,0 +1,26 @@
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
@@ -0,0 +1,38 @@
{ 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;
};
}
+37
View File
@@ -4,6 +4,13 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
amdgpu-kernel-module = pkgs.callPackage ./amdgpu-kernel-module.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.
@@ -12,6 +19,36 @@
networking.hostName = "TheBlackBox"; networking.hostName = "TheBlackBox";
# Linux and VR... nightmare below
boot.extraModulePackages = [
(amdgpu-kernel-module.overrideAttrs (_: {
patches = [ ./amdgpu-cap_sys_nice_begone.patch ];
}))
];
services.wivrn = {
enable = true;
openFirewall = true;
# Run WiVRn as a systemd service on startup
autoStart = true;
};
programs.alvr = {
enable = true;
openFirewall = true;
};
services.monado = {
enable = true;
defaultRuntime = true; # Register as default OpenXR runtime
};
systemd.user.services.monado.environment = {
STEAMVR_LH_ENABLE = "1";
XRT_COMPOSITOR_COMPUTE = "1";
};
users.users.k3t = { users.users.k3t = {
packages = with pkgs; [ packages = with pkgs; [
virt-viewer virt-viewer
+17 -9
View File
@@ -1,12 +1,20 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
# Graphics services.lact.enable = true;
hardware.enableRedistributableFirmware = true;
hardware.graphics = { nixpkgs.config.rocmSupport = true;
enable = true; hardware = {
enable32Bit = true; amdgpu = {
extraPackages = with pkgs; [ opencl.enable = true;
vkbasalt initrd.enable = true;
]; };
enableRedistributableFirmware = true;
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
vkbasalt
];
};
}; };
} }