Intel - hxrmonlka/alice GitHub Wiki
Intel
Alice has one generic Intel module and one preset.
| Item | Name | File |
|---|---|---|
| Module | self.custom.hardwareModules.hardwareIntel |
modules/hardware/drivers/intel.nix |
| Preset | self.custom.hardwareModules.intelSettings |
modules/hardware/settings/intel.nix |
The module declares options in hardware.alice.intel. Serpentine uses the preset.
GPU generations
Set gpu.generation to the tier of your GPU.
| Value | GPUs | VA-API drivers |
|---|---|---|
pre-broadwell |
Sandy Bridge, Ivy Bridge, Haswell (1st to 4th gen) | i965 only |
legacy |
Broadwell to Comet Lake (5th to 10th gen), including Coffee Lake UHD 620/630 | iHD (primary) and i965 (fallback) |
xe |
Iris Xe, Arc, 12th gen and newer | iHD and vpl-gpu-rt (QSV) |
The default is xe. The legacy tier keeps i965 because it works better in some browsers.
Options
| Option | Default | Effect |
|---|---|---|
gpu.enable |
false |
Turns on the Intel GPU module. |
gpu.generation |
"xe" |
Picks the driver tier. See above. |
gpu.earlyKms |
true |
Loads i915 in the initrd. |
gpu.enableGuC |
true on xe, else false |
Adds i915.enable_guc=3 to the kernel parameters. |
gpu.hybridCodec |
false |
Builds intel-vaapi-driver with hybrid codec support. Needs legacy. |
gpu.openclNeo |
false |
Adds the Intel NEO OpenCL and Level Zero runtime. Needs xe. |
gpu.openclLegacy |
false |
Adds intel-compute-runtime-legacy1 for OpenCL. Needs legacy. |
cpu.enable |
false |
Turns on the Intel CPU module and CPU microcode updates. |
cpu.pstate |
true |
Adds intel_pstate=active to the kernel parameters. |
What the module sets
services.xserver.videoDriversis["modesetting"].hardware.graphicsgets 64-bit and 32-bit packages for your tier. Steam and Wine use the 32-bit packages.LIBVA_DRIVER_NAMEisi965onpre-broadwellandiHDon the other tiers. If a browser has video problems, set it toi965for the session.hardware.enableRedistributableFirmwareistrue(as a default).- Vulkan on Intel uses ANV from Mesa. It needs no extra package. See
hardware.alice.vulkanin Design.
Assertions
The build stops with a message when you combine options in the wrong way:
openclNeoneedsgeneration = "xe".openclLegacyneedsgeneration = "legacy".hybridCodecneedsgeneration = "legacy".
The preset
intelSettings imports hardwareIntel and vulkan, and sets these values:
hardware.alice.intel = {
gpu = {
enable = true;
generation = "legacy";
openclLegacy = true;
};
cpu.enable = true;
};
hardware.alice.vulkan = {
enable = true;
tools = true;
};
Use the module on a newer machine
Import the module in your host and set the options. This example fits a 12th gen CPU:
{
imports = [self.custom.hardwareModules.hardwareIntel];
hardware.alice.intel = {
gpu = {
enable = true;
generation = "xe";
openclNeo = true;
};
cpu.enable = true;
};
}
If more than one host needs the same values, make a preset in modules/hardware/settings/. See Design.