AMD - hxrmonlka/alice GitHub Wiki
AMD
Alice has one generic AMD module and one preset.
| Item | Name | File |
|---|---|---|
| Module | self.custom.hardwareModules.hardwareAmd |
modules/hardware/drivers/amd.nix |
| Preset | self.custom.hardwareModules.amdSettings |
modules/hardware/settings/amd.nix |
The module declares options in hardware.alice.amd. No host imports amdSettings today. Tanuki gets its hardware settings from asusSettings and asustuf.
GPU options
| Option | Default | Effect |
|---|---|---|
gpu.enable |
false |
Turns on the AMD GPU module (amdgpu). |
gpu.earlyKms |
true |
Loads amdgpu in the initrd. |
gpu.rocm |
false |
Adds the ROCm OpenCL runtime (rocmPackages.clr) and links /opt/rocm/hip. |
gpu.lact |
false |
Starts the LACT service for fan, power and overclock control. Use lact-gui for the GUI. |
gpu.amdvlk |
false |
Adds AMD's own Vulkan driver next to Mesa RADV. It can be outdated and break some games. |
gpu.legacySupport.southernIslands |
false |
Uses amdgpu instead of radeon for GCN 1 cards. |
gpu.legacySupport.seaIslands |
false |
Uses amdgpu instead of radeon for GCN 2 cards. |
CPU options
| Option | Default | Effect |
|---|---|---|
cpu.enable |
false |
Turns on the AMD CPU module and CPU microcode updates. |
cpu.pstate |
true |
Adds amd_pstate=active and blocks the acpi_cpufreq module. |
cpu.zenpower |
false |
Loads the zenpower kernel module for CPU sensor readings. |
The option text for cpu.pstate says it targets Zen 3 and newer. On older CPUs, set cpu.pstate = false.
Vulkan
- RADV from Mesa is the default Vulkan driver, and it is the best choice for games.
- Both
hardware.alice.amd.gpu.amdvlkandhardware.alice.vulkan.amd.amdvlkadd theamdvlkpackage. Use one of them. - To keep RADV when
amdvlkis present, sethardware.alice.vulkan.defaultDriver = "radv".
The preset
amdSettings imports hardwareAmd and vulkan, and sets these values:
hardware.alice.amd = {
cpu.enable = true;
gpu.enable = true;
};
hardware.alice.vulkan = {
enable = true;
tools = true;
};
Use the module with more options
{
imports = [self.custom.hardwareModules.hardwareAmd];
hardware.alice.amd = {
gpu = {
enable = true;
rocm = true;
lact = true;
};
cpu.enable = true;
};
}
If more than one host needs the same values, make a preset in modules/hardware/settings/. See Design.