Difference between revisions of "Intel Graphics"

From NixOS Wiki
Jump to: navigation, search
(Move the VA-API note into a dedicated section)
m (rollback unauthorized mass edits)
Tag: Rollback
 
(7 intermediate revisions by 6 users not shown)
Line 3: Line 3:
 
To enable hardware (GPU) accelerated video decoding and encoding you need to add additional entries in <code>hardware.opengl.extraPackages</code> (see [[Accelerated_Video_Playback|"accelerated video playback"]]).
 
To enable hardware (GPU) accelerated video decoding and encoding you need to add additional entries in <code>hardware.opengl.extraPackages</code> (see [[Accelerated_Video_Playback|"accelerated video playback"]]).
  
== Iris ==
+
== 12th Gen (Alder Lake) ==
  
On <code>nixos-unstable</code> the new Gallium <code>iris</code> driver is enabled by default. For <code>nixos-20.03</code> you can use the following in your system configuration:
+
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=nix>
+
<syntaxHighlight lang=console>
  config = {
+
$ nix-shell -p pciutils --run "lspci -nn | grep VGA"
    environment.variables = {
+
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics] [8086:46a8] (rev 0c)
      MESA_LOADER_DRIVER_OVERRIDE = "iris";
 
    };
 
    hardware.opengl.package = (pkgs.mesa.override {
 
      galliumDrivers = [ "nouveau" "virgl" "swrast" "iris" ];
 
    }).drivers;
 
  };
 
 
</syntaxHighlight>
 
</syntaxHighlight>
  
(See [https://github.com/NixOS/nixpkgs/pull/65017 this GitHub thread] for context and explanation. <code>nouveau</code> is included to trigger the gallium-xa build, which is currently required because the nix derivation expects to copy the gallium-xa pkg-config files into place. Without <code>swrast</code> and/or <code>virgl</code>, it complains about needing softpipe/llvmpipe to build the <code>nine state tracker</code>.)
+
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>
 +
 
 +
[[Category:Video]]

Latest revision as of 10:59, 6 April 2024

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").

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>" ];