mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 22:50:49 +00:00
Merge pull request #127711 from eadwu/nvidia_x11/127693
This commit is contained in:
commit
3384abd78a
|
@ -179,28 +179,41 @@ in
|
||||||
You cannot configure both an Intel iGPU and an AMD APU. Pick the one corresponding to your processor.
|
You cannot configure both an Intel iGPU and an AMD APU. Pick the one corresponding to your processor.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
assertion = primeEnabled -> pCfg.nvidiaBusId != "" && (pCfg.intelBusId != "" || pCfg.amdgpuBusId != "");
|
assertion = primeEnabled -> pCfg.nvidiaBusId != "" && (pCfg.intelBusId != "" || pCfg.amdgpuBusId != "");
|
||||||
message = ''
|
message = ''
|
||||||
When NVIDIA PRIME is enabled, the GPU bus IDs must configured.
|
When NVIDIA PRIME is enabled, the GPU bus IDs must configured.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
assertion = offloadCfg.enable -> versionAtLeast nvidia_x11.version "435.21";
|
assertion = offloadCfg.enable -> versionAtLeast nvidia_x11.version "435.21";
|
||||||
message = "NVIDIA PRIME render offload is currently only supported on versions >= 435.21.";
|
message = "NVIDIA PRIME render offload is currently only supported on versions >= 435.21.";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
assertion = !(syncCfg.enable && offloadCfg.enable);
|
assertion = !(syncCfg.enable && offloadCfg.enable);
|
||||||
message = "Only one NVIDIA PRIME solution may be used at a time.";
|
message = "Only one NVIDIA PRIME solution may be used at a time.";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
assertion = !(syncCfg.enable && cfg.powerManagement.finegrained);
|
assertion = !(syncCfg.enable && cfg.powerManagement.finegrained);
|
||||||
message = "Sync precludes powering down the NVIDIA GPU.";
|
message = "Sync precludes powering down the NVIDIA GPU.";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
assertion = cfg.powerManagement.enable -> offloadCfg.enable;
|
assertion = cfg.powerManagement.enable -> offloadCfg.enable;
|
||||||
message = "Fine-grained power management requires offload to be enabled.";
|
message = "Fine-grained power management requires offload to be enabled.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
assertion = cfg.powerManagement.enable -> (
|
||||||
|
builtins.pathExists (cfg.package.out + "/bin/nvidia-sleep.sh") &&
|
||||||
|
builtins.pathExists (cfg.package.out + "/lib/systemd/system-sleep/nvidia")
|
||||||
|
);
|
||||||
|
message = "Required files for driver based power management don't exist.";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# If Optimus/PRIME is enabled, we:
|
# If Optimus/PRIME is enabled, we:
|
||||||
|
|
Loading…
Reference in a new issue