Difference between revisions of "Intel Graphics"
(Remove the Iris section (used by default in the imminent 20.09 release)) |
m (Update page to use `hardware.graphics` in-place of `hardware.opengl`.) |
||
(11 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
== Video acceleration == | == Video acceleration == | ||
− | To enable hardware (GPU) accelerated video decoding and encoding you need to add additional entries in <code>hardware. | + | To enable hardware (GPU) accelerated video decoding and encoding you need to add additional entries in <code>hardware.graphics.extraPackages</code> (see [[Accelerated_Video_Playback|"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 [https://github.com/Intel-Media-SDK/MediaSDK Intel Media SDK] or [https://github.com/intel/libvpl 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 <code>intel-media-sdk</code> or <code>vpl-gpu-rt</code> to <code>hardware.graphics.extraPackages</code>. You can check the [https://github.com/intel/libvpl?tab=readme-ov-file#dispatcher-behavior-when-targeting-intel-gpus this] table to decide whether you need the Media SDK or VPL GPU runtime. | ||
+ | |||
+ | Sample configuration: | ||
+ | <syntaxHighlight lang=nix> | ||
+ | hardware.graphics = { | ||
+ | enable = true; | ||
+ | extraPackages = with pkgs; [ | ||
+ | ... # your Open GL, Vulkan and VAAPI drivers | ||
+ | vpl-gpu-rt # for newer GPUs on NixOS >24.05 or unstable | ||
+ | # onevpl-intel-gpu # for newer GPUs on NixOS <= 24.05 | ||
+ | # intel-media-sdk # for older GPUs | ||
+ | ]; | ||
+ | }; | ||
+ | </syntaxHighlight> | ||
+ | |||
+ | On version 24.05 and below, you will need to use <code>opevpl-intel-gpu</code> in-place of <code>vpl-gpu-rt</code> and <code>hardware.opengl</code> in-place of <code>hardware.graphics</code>. | ||
+ | |||
+ | == 12th Gen (Alder Lake) == | ||
+ | |||
+ | 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: | ||
+ | |||
+ | <syntaxHighlight lang=console> | ||
+ | $ 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) | ||
+ | </syntaxHighlight> | ||
+ | |||
+ | In this example, "46a8" is the device ID. You can then add this to your configuration and reboot: | ||
+ | |||
+ | <pre>boot.kernelParams = [ "i915.force_probe=<device ID>" ];</pre> | ||
+ | |||
+ | |||
+ | == 6th Gen or Newer Specific Example == | ||
+ | I'm on an Intel 11th Gen and adding this to my <code>configuration.nix</code> file got GPU acceleration working in Celluloid (along with hwdec=yes in Celluloid). Maybe it'll help you too. | ||
+ | <pre>hardware.graphics.extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];</pre> | ||
+ | |||
+ | [[Category:Video]] |
Latest revision as of 13:17, 22 July 2025
Video acceleration
To enable hardware (GPU) accelerated video decoding and encoding you need to add additional entries in hardware.graphics.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
to hardware.graphics.extraPackages
. You can check the this table to decide whether you need the Media SDK or VPL GPU runtime.
Sample configuration:
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
... # your Open GL, Vulkan and VAAPI drivers
vpl-gpu-rt # for newer GPUs on NixOS >24.05 or unstable
# onevpl-intel-gpu # for newer GPUs on NixOS <= 24.05
# intel-media-sdk # for older GPUs
];
};
On version 24.05 and below, you will need to use opevpl-intel-gpu
in-place of vpl-gpu-rt
and hardware.opengl
in-place of hardware.graphics
.
12th Gen (Alder Lake)
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>" ];
6th Gen or Newer Specific Example
I'm on an Intel 11th Gen and adding this to my configuration.nix
file got GPU acceleration working in Celluloid (along with hwdec=yes in Celluloid). Maybe it'll help you too.
hardware.graphics.extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];