Intel Graphics

From NixOS Wiki
Revision as of 05:36, 19 June 2024 by Mic92 (talk | contribs) (imported from old wiki)

Driver

Refer to the Intel Graphics drivers section of the NixOS manual.

Video acceleration

To enable hardware (GPU) accelerated video decoding and encoding you need to add additional entries in hardware.opengl.extraPackages (see accelerated video playback).

Quick Sync Video

Intel Quick Sync Video (QSV) is a hardware accelerated media conversion framework for Intel GPUs. Applications that can be accelerated using QSV include OBS Studio and ffmpeg.

QSV support can be used through either Intel Media SDK or Intel VPL. Intel VPL supersedes the now deprecated Media SDK.

Both libraries dispatch to a backing implementation that is different depending on the GPU generation at runtime. You need to add either intel-media-sdk or vpl-gpu-rt (previously onevpl-intel-gpu) to hardware.opengl.extraPackages. You can check the this table to decide whether you need the Media SDK or VPL GPU runtime.

Sample configuration:

  hardware.opengl = {
    enable = true;
    extraPackages = with pkgs; [
      ... # your Open GL, Vulkan and VAAPI drivers
      vpl-gpu-rt # or intel-media-sdk for QSV
    ];
  };

12th Gen (Alder Lake)

The X Server may fail to start with the newer 12th generation, Alder Lake, iRISxe integrated graphics chips. If this is the case, you can give the kernel a hint as to what driver to use. First confirm the graphic chip's device ID by running in a terminal:

$ nix-shell -p pciutils --run "lspci -nn | grep VGA"
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics] [8086:46a8] (rev 0c)

In this example, "46a8" is the device ID. You can then add this to your configuration and reboot:

boot.kernelParams = [ "i915.force_probe=<device ID>" ];