intel

From Gentoo Wiki
Jump to: navigation, search

External resources

intel is the open source graphics driver for Intel GMA onboard graphics cards, starting with the Intel 810.

Hardware detection

To choose the right driver, first detect the graphics card. You can use lspci for this task:

root # lspci | grep -i VGA

Feature support

Generation Chipset OpenGL OpenGL ES OpenCL VAAPI VIDEO_CARDS
Gen1 810, 815 1.2 No No No intel
Gen2 i830M, 845G, 855GM, 865G 1.3 No No No intel
Gen3 915G/GM, 945G/GM, G/Q33, Atom D4xx/D5xx/N4xx/N5xx 1.4/1.5 No No No intel i915
Gen4 965G/GM/Q, G/Q35, G41, G/Q43, G/GM/Q45 2.1 2.0 No G/GM45: MPEG2 only intel i965
Gen5 Ironlake 2.1 2.0 No Yes intel i965
Gen6 Sandy Bridge 3.3 3.0 No Yes intel i965
Gen7 Ivy Bridge, Valley View, Haswell 3.3 3.0 1.11 Yes intel i965
1) A FOSS implementation is in development under the name Beignet

Installation

Kernel

You need to activate the following kernel options:

Kernel configuration

Processor type and features  --->
    [*] MTRR (Memory Type Range Register) support
Device Drivers  --->
    Graphics support  --->
        <*> /dev/agpgart (AGP Support)  --->
             <*> Intel 440LX/BX/GX, I8xx and E7x05 chipset support
        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
            <*> Intel 8xx/9xx/G3x/G4x/HD Graphics
            [*]   Enable modesetting on intel by default
            [*]   Enable legacy fbdev support for the modesetting intel driver 

The legacy fbdev support is required since kernel 3.14.14 at least for i915 (CONFIG_DRM_i915_FBDEV=y).[1][2] For hybrid Intel/AMD system, follow also the steps of radeon (opensource) or fglrx (closed binary) drivers.

Driver

Portage uses the variable VIDEO_CARDS for enabling support for various graphics cards in packages. Setting VIDEO_CARDS in /etc/portage/make.conf will pull in the correct video driver: (see the feature matrix)

File/etc/portage/make.confGen 1&2

VIDEO_CARDS="intel"
File/etc/portage/make.confGen 3

VIDEO_CARDS="intel i915"
File/etc/portage/make.confGen 4-7

VIDEO_CARDS="intel i965"

"intel" is for xorg-base/xorg-drivers and i915 resp. i965 are for media-libs/mesa.[3]

Check the USE flags of x11-drivers/xf86-video-intel:

→ Information about USE flags
USE flag Default Recommended Description
dri Yes Yes Enable direct rendering: used for accelerated 3D and some 2D, like DMA
glamor No Enable Glamor OpenGL 2D acceleration
sna Yes Yes Enable SandyBridge's New Acceleration (useful on all chipsets, not just SandyBridge)
udev Yes Yes Enable sys-fs/udev integration (device discovery, power and storage device support, etc)
uxa No Enable UMA Acceleration Architecture
xvmc No Enables X-Video Motion Compensation support

After setting this you want to update your system so the changes take effect:

root # emerge --ask --changed-use --deep @world

VAAPI

Intel GMA X4500HD / G45 / GM45 and newer supports VAAPI hardware video acceleration.

Configuration

Permissions

If you have the USE flag acl enabled globally and are using ConsoleKit (i.e you're using a Desktop profile) permissions to video cards will be handled automatically. You can check the permissions using getfacl:

user $ getfacl /dev/dri/card0 | grep larry
user:larry:rw-

A broader solution is to add the user you want to be able to access the video card to the video group:

root # gpasswd -a larry video

Note that you will still be able to run X without permission to the DRI subsystem, but usually not with acceleration enabled.

xorg.conf

As xorg is not aware of i915 or i965 they will need to be addressed as Driver "intel".

Fileetc/X11/xorg.conf.d/device_no_vesa.conf

#
# Remove errors regarding modules "fbdev" and "vesa"
# 

Section "Device"
        Identifier "Device0"
        Driver "intel"

	Option "Monitor-LVDS" "Internal Panel"
	Option "Monitor-VGA" "External VGA Monitor"
EndSection

The X server is designed to work out-of-the-box, with no need to manually edit X.Org's configuration files. It should detect and configure devices such as displays, keyboards, and mice.

However, the main configuration file of the X server is the xorg.conf.

See also

Troubleshooting

KDM freezes

A workaround is to set TerminateServer=true in all sections of the file /usr/share/config/kdm/kdmrc, which starts with X-.

Black screen

According to this Debian wiki, CONFIG_FRAMEBUFFER_CONSOLE must be set to y (aka built-in). Otherwise, it is possible to always have a black screen unless nomodeset is passed to the kernel, thus disabling KMS.

You can also try to pass acpi_osi="Linux" to the kernel line to try to solve this kind of issue

Brightness doesn't change with keyboard shortcuts

First, make sure your vendor compatibility is on in the kernel configuration, toshiba for toshiba and so on. If it is, or if you're sure that the brightness buttons are working, it's probably that your kernel can't detect where the brightness is. Luckily, this is easy enough to modify, as long as your kernel version is 3.13.x +.

Simply add
Kernel configurationcommand line

video.use_native_backlight=1
to your kernel command line.

External resources

References