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 = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
} else {
hardware.opengl = {
@@ -28,7 +29,8 @@ in {
};
};
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.deviceSection = ''
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 {
description = "Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
script = "/run/current-system/sw/bin/nvidia-smi -pl=${toString cfg.powerLimit.wattage}";
description =
"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" ];
};
});

View File

@@ -94,6 +94,11 @@ in {
path = "${cfg.basePath}/no_backup";
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" ];
};
};
};