Intel graphics
The Intel graphics chips that are part of many Intel processors are fairly well supported on GNU/Linux. Some chips on some combinations of the kernel and user-space tools will have random hangs and other issues. The kernel side is handled by a driver called i915
which, unlike what the name implies, handles all modern Intel graphics chips. The user-space side is handled by either the Mesa. Mesa has two drivers for OpenGL. The older and very mature i965
driver is the default. There is also a newer, for now optional, OpenGL driver called Iris. Vulkan support is provided by the Mesas ANV back-end.
Overview[edit]
Micro- architecture / Socket |
Graphics Gen / Brand | Vulkan | OpenGL | HLSL shader model | OpenCL | ||
---|---|---|---|---|---|---|---|
Sandy Bridge | 1155 | 6th[1] | HD 2000, HD 3000 | N/A | 3.3 | 4.1 | N/A |
Ivy Bridge | 1155 | 7th[2][3] | HD 2500, HD4000 | 1.0[4] | 4.2 | 5.0 | In practice unavailable (Beignet 1.2 possible) |
Bay Trail | SoCs | "HD Graphics" (Bay trail) | |||||
Haswell | 1150 | 7.5th[5] | HD 5000, 4600, 4400 and 4200 Iris Pro 5200, Iris 5000 and 5100 |
4.6 | |||
Broadwell | 1150 | 8th | HD 6000, P5700, 5600, 5500, 5300 Iris Pro 6200, P6300, Iris 6100 |
1.2 (Mesa 20+) |
2.1 (Neo) 1.2 (Mesa Clover) | ||
Braswell | SoCs | HD Graphics 400, 405 | |||||
Skylake | 1151 | 9th | HD 510, 515, 520, 530 and 535; Iris 540 and 550 Iris Pro 580 |
6.0 | |||
Apollo Lake | SoCs | HD Graphics 500, 505 | 1.2 (Neo) 1.2 (Mesa Clover) | ||||
Gemini Lake | SoCs | UHD 600, 605 | |||||
Kaby Lake | 1151 | 9.5th | HD 610, 615, 620, 630, Iris Plus 640, Iris Plus 650 | 2.1 (Neo) 1.2 (Mesa Clover) | |||
Kaby Lake recycled | UHD 620 | ||||||
Whiskey Lake | |||||||
Coffee Lake | UHD 630, Iris Plus 655 | ||||||
Ice Lake | SoCs | 11th | Intel® Iris® Plus Graphics | ||||
Tiger Lake | SoCs | 12th | Intel® Iris® Xe | ? | 3.0 (Neo) | ||
Sapphire Rapids | ? |
Kernel Driver[edit]
All Intel iGPUs are supported by a kernel module called i915
. It is found under Device Drivers
-> Graphics support
-> Intel 8xx/9xx/G3x/G4x/HD Graphics
in the kernel's make menuconfig
. While the module is called i915 it's actually a general driver for all Intel iGPUs. The help text as of 5.2.20 states "(..) including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G, G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3, Core i5, Core i7 as well as Atom CPUs with integrated graphics.". It does not matter if a specific Intel iGPU is or is not listed, all of them are supported by this kernel module.
There are issues with using the i915 kernel module in 5.3.x and 5.4.x kernels. Avoid using those.
You may need kernel parameters like intel_idle.max_cstate=1
and/or i915.enable_dc=0
to have a problem-free experience with Intel graphics. See the Troubleshooting section below for details.
User-space Drivers[edit]
OpenGL on the user-space side is supported either the Mesa i915 driver or the i965, one of those will be used automatically depending on the GPU. Future Intel GPUs will supported by a new driver called Intel Iris. It works on older chips too; Broadwell (Gen (8) and newer is supported by the Intel Iris driver.
The i965 source is hosted at freedesktop.org/(..)/drivers/dri/i965.
Vulkan is supported by a graphics driver called ANV
.
OpenCL[edit]
Intel maintained an OpenCL driver called Beignet from 2013 to 2017. This driver is required to get OpenCL on <=Gen7.5 graphics cards. Many GNU/Linux distributions have dropped the Beignet package since it is no longer maintained. It is also not required and you should not bother trying to get an old Beignet package working on a modern distribution. The Mesa Clover OpenCL provides OpenCL 1.2 support for the older Intel graphics chips that are not supported by the newer Intel Neo driver. Beignet did not provide more than OpenCL 1.2 for the older chips in question.
Beignet has been replaced by a package called Neo ("new and improved OpenCL Driver stack"). Neo packages for Ubuntu only are available at github.com /intel/compute-runtime/releases. You will have a hard time getting them to work on other GNU/Linux distributions. Neo provides OpenCL 1.2, 2.1 or 3.0 (Tiger Lake and newer) depending on which iGPU you have.
Hardware Video Decoding / Encoding[edit]
"Intel Quick Sync Video" is the marketing name for the hardware video decoding and encoding features on Intel processors with integrated graphics. Processors with an Intel iGPU can be used to do hardware video encoding in programs like OBS Studio as long as you have libva
installed and the processors iGPU supports the video codec and resolution you want to use.
You need libva
and a driver package typically called libva-intel-driver
to use GPU hardware decoding and encoding on Intel hardware. You will also want a package called libva-utils
which contains the vainfo
utility. vainfo
will tell you the capabilities of the iGPU you have on your system.
Cantiga | Clarkdale, Arrandale | Sandy Bridge | Ivy Bridge, Haswell | Broadwell | Braswell, Cherry Trail | Skylake | Apollo Lake | Kaby Lake, Gemini Lake, Coffee Lake, Comet Lake, Cannon Lake | Ice Lake | Tiger Lake | |
---|---|---|---|---|---|---|---|---|---|---|---|
MPEG-2 | Decode only | Decode only | Decode only | ||||||||
H264/MPEG-AVC | Decode only | ||||||||||
VC-1 | Decode only | Decode only | Decode only | Decode only | Decode only | Decode only | Decode only | Decode only | Decode only | ||
JPEG | Decode only | Decode only | |||||||||
VP8 | Decode only | ||||||||||
HEVC | Decode only | ||||||||||
HEVC 10-bit | Decode only (8K) | ||||||||||
HEVC 12-bit | Decode only | ||||||||||
VP9 | Hybrid Decode only | Hybrid Decode only | Hybrid Decode only | Decode only (4K) | |||||||
VP9 10-bit | Decode only | ||||||||||
VP9 12-bit | Decode only | ||||||||||
AV1 | Decode only | ||||||||||
EVC | |||||||||||
VVC |
"Hybrid" Decoding[edit]
Intel offers a special "hybrid" VAAPI driver, typically available as libva-intel-hybrid-driver
, in addition to the standard libva-intel-driver
driver for hardware decoding/encoding using VAAPI. This "hybrid" driver will, in theory, let you do partial VP9 hardware video decoding on certain older Intel iGPUs (Haswell/Broadwell). vainfo
show a VAProfileVP9Profile0: VAEntrypointVLD
in the list of supported codecs on these machines only if the hybrid driver is present, VP9 hardware decoding will not be supported without this driver.
The "Hybrid" VAAPI driver (libva-intel-hybrid-driver
) works fine as of version 1.0.2. However, there has been some problems with earlier versions of it that have caused Chromium and mpv to crash when VP9 was played using this driver. If you have an old distributions and an old Intel GPU and you experience crashes when playing VP9 video then this driver is probably the reason.
Hardware Defects To Be Aware Of[edit]
Intel integrated graphics chips have a hardware flaw which allows one process to get data from another process. A workaround for this flaw has been in place for gen8 graphics chips since 2017. The kernel got a patch which implemented that same workaround for gen9 graphics chips in January 2020. gen7 and gen7.5 chips are still vulnerable to that hardware flaw. Red Hat recommend disabling hardware acceleration on all processors with Intel integrated graphcis due to this flaw. We do not share that recommendation, it makes sense to disable hardware acceleration on servers with integratged gen7/7.5 graphics. It makes no sense on desktops, laptops and notebooks.
Intel "Baytrail" chips and some other low-powered chips have a hardware flaw which makes them randomly hang when deeper CPU sleep states are enabled[6]. Using the intel_idle.max_cstate=1
kernel parameter is a known workaround. Some Kaby Lake Refresh chips are also affected.
Troubleshooting[edit]
The kernel driver for Intel integrated graphics has been a complete and utter mess since kernel 5.1. Avoid using 5.3.x and 5.4.x kernels if you are using Intel integrated graphics.
Kernel Parameters[edit]
Some Intel-powered machines, specially those running low-powered chips (Atom, Pentium), have a tendency to randomly hang due to the problems with the power management features found in low-power Intel chips. A absolutely not ideal workaround is to add the following kernel parameters (add them to GRUB_CMDLINE_LINUX=
in /etc/sysconfig/grub
:
intel_idle.max_cstate=1 i915.enable_dc=0 ahci.mobile_lpm_policy=1
You will likely not need all of the above.
ahci.mobile_lpm_policy=1
fixes a hang on mostly Lenovo laptop computers and some Acer notebooks due to problematic SATA controller power management. That workaround is strictly not related to Intel graphics but it does solve related issues. Adding ahci.mobile_lpm_policy=1
will also solve hangs when you change display brightness on certain Lenovo machines.
i915.enable_dc=0
disables GPU power management. This does solve random hangs on certain Intel systems, notably Goldmount and Kaby Lake Refresh chips. Using this parameter does result in higher power use and shorter battery life on laptops/notebooks.
intel_idle.max_cstate=1
limits the processors sleep states, it prevents the processor from going into deep sleep states. That is absolutely not ideal and does result in higher power use and lower battery life. However, it does solve random hangs on many Intel systems. Use this if you have a Intel Baytrail or a Kaby Lake Refresh chip.
Some Intel systems, like Kaby Lake Refresh chips, require both intel_idle.max_cstate=1
and i915.enable_dc=0
to ensure a hang-free experience.
Intel "Baytrail" chips are known to randomly hang without intel_idle.max_cstate=1
due to a hardware flaw[6].
If you try adding intel_idle.max_cstate=1 i915.enable_dc=0 ahci.mobile_lpm_policy=1
in the hope of fixing frequent hangs and that solves the issue you should later remove one by one to see which of them actually helped you solve the issue. Running with cstates and display power management disabled is silly if the actual problem is related to SATA power management and ahci.mobile_lpm_policy=1
is the one that actually solves it.
Xorg configuration[edit]
Xorg can use two entirely different drivers to power Intel graphics: The Xorg X11 Intel video driver and the Xorg modesetting driver.
The Intel driver is typically packages as a package named xf86-video-intel
or xorg-x11-drv-intel
. One major problem with this driver is that it does not have very frequent releases yet there are major changes to the git tree on a regular basis. The lack of stable releases has resulted in distributions packaging snapshot of the driver in their repositories. That makes it hard to tell what "version" (or snapshot) you are actually using.
The lack of stable Xorg Intel driver releases has made several distributions switch to the more general Xorg Modesetting driver. That driver is a more generally driver capable of using any kernel driver with support for kernel modesetting. The modesetting driver is built into the Xorg server, there is no separate package for it.
Some users have reported that they have hangs when using the Intel driver which are fixed by switching to the modesetting driver. Hangs on low-powered systems tend to happen regardless of which Xorg driver are used, adding kernel parameters (see above) is needed on those systems.
You can choose what Xorg driver to use by creating a file in /etc/X11/xorg.conf.d
called 20-intel-gpu.conf
with a line that either says Driver "modesetting"
or Driver "intel"
:
Section "Device" Identifier "Intel" Driver "intel" Option "TearFree" "1" EndSection
Or, for modesetting:
Section "Device" Identifier "Intel" Driver "modesetting" EndSection
Note that the modesetting driver does not support the TearFree
option. You will have horrible tearing if you use the modesetting driver and a window manager which does not support or have compositing enabled.
Screen Tearing[edit]
Creating a configuration file in /etc/X11/xorg.conf.d/
with the option TearFree
set to 1
will prevent tearing if you opt to use the Intel driver for Xorg. It can look like this:
Section "Device" Identifier "Intel" Driver "intel" Option "TearFree" "1" EndSection
Why TearFree defaults to 0 is anyone's guess.
That option is NOT available in the alternative modesetting driver (built into the Xorg server). You have to use a compositing window manager to avoid tearing if you use that driver.
Footnotes[edit]
- ↑ 2nd Generation Intel® Core : Datasheet, Volume 1.
- ↑ Desktop 3rd Gen Intel Core Processor Family: Datasheet, Vol. 1. Intel. Retrieved on 2015-06-18.
- ↑ Intel Pentium Processor N3500-series, J2850, J2900, and Intel Celeron Processor N2900-series, N2800-series, J1800-series, J1900, J1750 – Datasheet. Intel (2014-11-01). Retrieved on 2016-02-08.
- ↑ Ivy Bridge and Haswell could support higher, please run
vulkaninfo
fromvulkan-tools
and look for VkConformanceVersion and correct if you have such a chip. - ↑ Desktop 4th Generation Intel® Core : Datasheet – Volume 1 of 2. Retrieved on 27 May 2018.
- ↑ 6.0 6.1 Kernel Bug 109051 - cstates: intel_idle.max_cstate=1 required to prevent crashes - Baytrail
Enable comment auto-refresher