Intel Graphics: Difference between revisions

drop 24.05 compat
DHCP (talk | contribs)
m style fixes
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Example configuration with Hardware Acceleration & Quick Sync Video enabled on a modern Intel Graphics (Including ARC)
<syntaxhighlight lang="nix">
services.xserver.videoDrivers = [ "modesetting" ];
hardware.graphics = {
  enable = true;
  extraPackages = with pkgs; [
    # Required for modern Intel GPUs (Xe iGPU and ARC)
    intel-media-driver    # VA-API (iHD) userspace
    vpl-gpu-rt            # oneVPL (QSV) runtime
    # Optional (compute / tooling):
    intel-compute-runtime  # OpenCL (NEO) + Level Zero for Arc/Xe
    # NOTE: 'intel-ocl' also exists as a legacy package; not recommended for Arc/Xe.
    # libvdpau-va-gl      # Only if you must run VDPAU-only apps
  ];
};
environment.sessionVariables = {
  LIBVA_DRIVER_NAME = "iHD";    # Prefer the modern iHD backend
  # VDPAU_DRIVER = "va_gl";      # Only if using libvdpau-va-gl
};
# May help if FFmpeg/VAAPI/QSV init fails (esp. on Arc with i915):
hardware.enableRedistributableFirmware = true;
boot.kernelParams = [ "i915.enable_guc=3" ];
# May help services that have trouble accessing /dev/dri (e.g., jellyfin/plex):
# users.users.<service>.extraGroups = [ "video" "render" ];
</syntaxhighlight>
== Driver ==
== Driver ==
Refer to the [https://nixos.org/manual/nixos/stable/#sec-x11--graphics-cards-intel Intel Graphics drivers] section of the NixOS manual.
Refer to the [https://nixos.org/manual/nixos/stable/#sec-x11--graphics-cards-intel Intel Graphics drivers] section of the NixOS manual.
Line 17: Line 48:
Sample configuration:
Sample configuration:
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
  hardware.graphics = {
hardware.graphics = {
    enable = true;
  enable = true;
    extraPackages = with pkgs; [
  extraPackages = with pkgs; [
      ... # your Open GL, Vulkan and VAAPI drivers
    ... # your Open GL, Vulkan and VAAPI drivers
      vpl-gpu-rt # or intel-media-sdk for QSV
    vpl-gpu-rt # or intel-media-sdk for QSV
    ];
  ];
  };
};
</syntaxHighlight>
</syntaxHighlight>


Line 37: Line 68:
In this example, "46a8" is the device ID. You can then add this to your configuration and reboot:  
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>
<syntaxHighlight lang=nix>
boot.kernelParams = [ "i915.force_probe=<device ID>" ];
</syntaxHighlight>


[[Category:Video]]
[[Category:Video]]