play around with vaapi

This commit is contained in:
Kopatz
2025-01-25 17:14:53 +01:00
parent fea688cb80
commit 5bfe9cb367
3 changed files with 23 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ in {
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
}; };
} else { } else {
hardware.opengl = { hardware.opengl = {
@@ -28,7 +29,8 @@ in {
}; };
}; };
in lib.mkIf cfg.enable (lib.recursiveUpdate nvidiaOption { in lib.mkIf cfg.enable (lib.recursiveUpdate nvidiaOption {
boot.kernelParams = [ "nvidia-drm.fbdev=1" ]; boot.kernelParams =
[ "nvidia-drm.fbdev=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.deviceSection = '' services.xserver.deviceSection = ''
Option "Coolbits" "24" Option "Coolbits" "24"
@@ -72,9 +74,19 @@ in {
#}; #};
}; };
environment.systemPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
libva
libva-utils
];
systemd.services.nvpl = lib.mkIf cfg.powerLimit.enable { systemd.services.nvpl = lib.mkIf cfg.powerLimit.enable {
description = "Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts"; description =
script = "/run/current-system/sw/bin/nvidia-smi -pl=${toString cfg.powerLimit.wattage}"; "Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
script = "/run/current-system/sw/bin/nvidia-smi -pl=${
toString cfg.powerLimit.wattage
}";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
}; };
}); });

View File

@@ -94,6 +94,11 @@ in {
path = "${cfg.basePath}/no_backup"; path = "${cfg.basePath}/no_backup";
devices = [ "kop-pc" "server" "laptop" "mini-pc" "mini-pc-proxmox" ]; devices = [ "kop-pc" "server" "laptop" "mini-pc" "mini-pc-proxmox" ];
}; };
folders."emu" = {
id = "emu";
path = "${cfg.basePath}/emu";
devices = [ "kop-pc" "server" "mini-pc" "mini-pc-proxmox" ];
};
}; };
}; };

View File

@@ -27,6 +27,9 @@
ssd.enable = true; ssd.enable = true;
wooting.enable = true; wooting.enable = true;
}; };
misc = {
docker.enable = true;
};
graphical = { graphical = {
audio.enable = true; audio.enable = true;
sddm.enable = true; sddm.enable = true;