Intel Video: Difference between revisions

From Alpine Linux
m (Categorized: Drivers)
(mesa gallium and libva intel driver)
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The following instructions are for modern Intel GPU chipsets covered by the i915 driver.
Install the following packages as needed:
See [[#Known working configurations]].


== Setup Xorg/udev ==
* <code>mesa-dri-gallium</code>: '''necessary''' Mesa drivers for all Intel Graphics
* <code>libva-intel-driver</code>: VAAPI drivers, for hardware accelerated video encoding and decoding


# Run the [[Alpine setup scripts#setup-xorg-base|setup-xorg-base]] script.
== Note ==
# Install the Xorg Intel video drivers: {{Cmd|apk add xf86-video-intel}}
# Enable [[#Kernel Modesetting (KMS)]]. Specifically, the <code>fbcon</code> module is necessary, or leaving Xorg (via <code>Ctrl+Alt+F1</code> or quitting) will result in a black screen until the machine is power cycled. If you have already launch Xorg and don't want to experience this effect, you can <code>modprobe fbcon</code> while Xorg is running.


For all Intel Graphics up to Haswell, the user must manually select '''crocus''' Mesa driver in order to let the graphics work properly:


== Kernel Modesetting (KMS) ==
<pre>
export MESA_LOADER_DRIVER_OVERRIDE=crocus
</pre>


To enable KMS at boot:
For newer Intel Graphics, if automatic driver selection does not work and bugs such as missing mouse cursor under [[Sway]] occur (no hardware graphics acceleration), the user can manually select '''iris''' driver:
# Add the <code>i915</code> and <code>fbcon</code> modules to {{Path|/etc/modules}}: {{Cmd|$ echo i915 >> /etc/modules<br />$ echo fbcon >> /etc/modules}}
# Install <code>mkinitfs</code>: {{Cmd|apk add mkinitfs}}
# Enable the <code>kms</code> feature in the <code>mkinitfs</code> configuration by adding it to the <var>features</var> variable, e.g., {{cat|/etc/mkinitfs/mkinitfs.conf|features{{=}}"keymap cryptsetup kms ata base ide scsi usb virtio ext4"}}
# Run <code>mkinitfs</code>.
# Reboot to test the configuration.


 
<pre>
== Fixing MESA-LOADER errors ==
export MESA_LOADER_DRIVER_OVERRIDE=iris
 
The ''linux-hardened'' kernel package places restrictions on sysfs and will prevent the MESA-LOADER from working as a normal user even if added to the video group.
 
See https://bugs.alpinelinux.org/issues/7265
 
Either switch to the ''linux-vanilla'' package or apply the '''grsec_sysfs_restrict=0''' kernel parameter to allow normal users to access hardware acceleration on the desktop.
 
 
== Known working configurations ==
 
; Lenovo X1 Carbon (1st gen), <code>sys</code> installation
<pre style="white-space: pre-wrap; word-wrap: break-word;"># lspci -s 02 -v
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
        Subsystem: Lenovo Device 21f9
        Flags: bus master, fast devsel, latency 0, IRQ 28
        Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 4000 [size=64]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [a4] PCI Advanced Features
        Kernel driver in use: i915
</pre>
</pre>
[[Category:Drivers]]

Revision as of 15:26, 21 July 2022

Install the following packages as needed:

  • mesa-dri-gallium: necessary Mesa drivers for all Intel Graphics
  • libva-intel-driver: VAAPI drivers, for hardware accelerated video encoding and decoding

Note

For all Intel Graphics up to Haswell, the user must manually select crocus Mesa driver in order to let the graphics work properly:

export MESA_LOADER_DRIVER_OVERRIDE=crocus

For newer Intel Graphics, if automatic driver selection does not work and bugs such as missing mouse cursor under Sway occur (no hardware graphics acceleration), the user can manually select iris driver:

export MESA_LOADER_DRIVER_OVERRIDE=iris