monado: Add amdgpu patch + disable for perso-desktop
All checks were successful
check / check (push) Successful in 34s
All checks were successful
check / check (push) Successful in 34s
This commit is contained in:
parent
1c2010abdc
commit
00f0381893
3 changed files with 19 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfgAmdgpu = config.modules.system.hardware.graphics.amdgpu;
|
||||
cfg = config.modules.system.services.monado;
|
||||
in
|
||||
{
|
||||
|
@ -9,8 +10,15 @@ in
|
|||
enable = mkEnableOption ''
|
||||
Enable monado with my custom configurations
|
||||
'';
|
||||
|
||||
enableAmdgpuPatch = mkOption {
|
||||
type = types.bool;
|
||||
description = "Patch kernel to disable CAP_SYS_NICE on amdgpu. Required to allow high priority queues.";
|
||||
default = cfgAmdgpu.enable;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/VR
|
||||
# https://github.com/NixOS/nixpkgs/issues/258196
|
||||
services.monado = {
|
||||
enable = true;
|
||||
|
@ -28,5 +36,16 @@ in
|
|||
XRT_COMPOSITOR_COMPUTE = "1";
|
||||
WMR_HANDTRACKING = "0";
|
||||
};
|
||||
|
||||
boot.kernelPatches = mkIf cfg.enableAmdgpuPatch [
|
||||
{
|
||||
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=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue