mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Hardware/Nvidia] Activate modesetting for nvidia-drm and use PageAttributeTable
This commit is contained in:
parent
1e54cd710b
commit
b2c521273f
1 changed files with 13 additions and 6 deletions
|
|
@ -15,6 +15,8 @@ in {
|
||||||
"nvidia"
|
"nvidia"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.xserver.exportConfiguration = true;
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
powerManagement.finegrained = mkIf config.hardware.nvidia.prime.offload.enable true;
|
powerManagement.finegrained = mkIf config.hardware.nvidia.prime.offload.enable true;
|
||||||
|
|
@ -22,9 +24,14 @@ in {
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
aviallon.boot.cmdline = mkIf cfg.saveAllVram {
|
aviallon.boot.cmdline = {}
|
||||||
NVreg_PreserveVideoMemoryAllocations = 1;
|
// {
|
||||||
NVreg_TemporaryFilePath = "/tmp/nvidia-gpu.vram.img";
|
"nvidia-drm.modeset" = 1;
|
||||||
|
"nvidia.NVreg_UsePageAttributeTable" = 1;
|
||||||
|
}
|
||||||
|
// optionalAttrs cfg.saveAllVram {
|
||||||
|
"nvidia.NVreg_PreserveVideoMemoryAllocations" = 1;
|
||||||
|
"nvidia.NVreg_TemporaryFilePath" = "/tmp/nvidia-gpu.vram.img";
|
||||||
};
|
};
|
||||||
|
|
||||||
aviallon.programs.allowUnfreeList = [
|
aviallon.programs.allowUnfreeList = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue