Intel Linux Graphics Driver Installation Guide
1. Introduction
In general, Intel graphics driver is well integrated in Linux distributions so users won't worry about the driver setup.
This guide is for those users who would like to build the latest driver from scratch. This will be useful when trying the upstream stuff and customize the graphics driver.
Section 3 is for people who only need build the 2D driver to try a new 2D feature or bug fix. Section 4 and 5 are for people who want to build the whole stack including 3D.
2. Getting source
To make the Intel graphics chipset work, below components are needed:
1, kernel module agpgart and drm;
The source of kernel modules is
included in Linux kernel.
2, libdrm;
Libdrm is included in freedesktop drm source.
3,
Xorg 2D driver:
xf86-video-intel;
4,
To get the detailed download address for above
components, please refer http://intellinuxgraphics.org/download.html.
3. 2D only driver build
In order to test or use the latest Intel X driver, you typically don't
need to upgrade other components of the graphics stack, like Mesa or the
DRM drivers. In order to build the driver, you'll need several development
packages installed (list taken from the Fedora build requirements for the
driver):
- autoconf
- automake
- libtool
- hwdata (for PCI
IDs)
- xorg-x11-server-Xorg >= 1.3.0.0-6
- xorg-x11-server-sdk
>= 1.3.0.0-6
- libXvMC-devel
- mesa-libGL-devel >= 6.5-9
-
libdrm-devel >= 2.0-1
If these packages are available, building should be as simple as:
$
./autogen
$ make
$ sudo -c "make install"
Note that depending on your distribution, you may need extra flags, like --prefix=, --exec-prefix=, --libdir=, --sysconfdir=, etc. depending on where your X server is installed (see ./configure --help for details).
Once the new driver is installed, make sure your xorg.conf file (often in /etc/X11/) points at the new driver, which should be called "intel" or "i810" assuming the "make install" step created the appropriate symlinks.
4. Whole stack building
We
suppose you have downloaded all components under directory $DOWN_ROOT
except kernel source.
4.1 Linux kernel
Just using an upstream kernel is fine in most cases, and you can build customized kernel if needed.
4.2 libdrm
Build and install libdrm:
$
cd $DOWN_ROOT/drm
$
./autogen.sh
Note: libdrm installs to /usr/local/lib by default. To install in /usr/lib run:
$
./autogen.sh --prefix=/usr --exec-prefix=/
$
make
$
make install
libdrm.so will be installed to /usr/lib.
4.3 Xorg 2D driver
If
you install xorg in another directory(refered as $XORG_DIR) instead of overriding
the xorg shipped in your Linux distribution, you need set two macros at
first:
$
export PKG_CONFIG_PATH=${XORG_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
$
export ACLOCAL="aclocal -I
${XORG_DIR}/share/aclocal"
Of
coz, if you install xserver to another
directory, you need compile all xorg modules. As
for the detailed guide about xserver and xorg module compilation, please refer to Xorg Modular
Developers' Guide.
The compilation of 2D driver is
simple:
$
cd
$DOWN_ROOT/xf86-video-intel
$
./autogen.sh --prefix=${XORG_DIR}
$
make && make install
At
last, 2D driver library file (intel_drv.so) will
be installed to $XORG_DIR/lib/xorg/modules/drivers/.
4.4 Mesa and 3D driver
You can refer http://wiki.x.org/wiki/Development/git for new building process and skip this section.
If you only need Intel
driver, you can specify it when run autogen.sh by adding option:
5. Full stack configurations
5.1 Load kernel modules
If agpgart and drm are not compiled
into kernel, when system boot up you need load these kernel modules: agpgart, intel-agp, drm and
i915.
To automatically load
kernel modules when system boot up, you can edit file /etc/modules to add
modules' name (on Debian/Ubuntu); or edit file
/etc/rc.local to add lines such as: modprobe agpgart.
5.2 Enable Intel driver
Make sure intel driver is used in Xorg configure file (usually is /etc/X11/xorg.conf):
Section
"Device"
Identifier "name"
Driver
"intel"
Entries...
...
EndSection
5.3 Enable DRI
DRI (Direct Rendering
Infrastructure) is a framework for allowing direct access to graphics
hardware under the X Window System in a safe and efficient manner. You
need enable DRI in xorg.conf.
Firstly, make sure the GLX and DRI modules are
being loaded:
Section
"Module"
#
...
Load "glx"
Load "dri"
#
...
EndSection
Then, set the permissions for DRI
appropriately. To allow anyone to use DRI, do:
Section
"DRI"
Mode
0666
EndSection
After restart X server, you can check
whether direct rendering is enabled by running glxinfo, the output of
glxinfo should show:
direct
rendering: Yes
6. Reference
[1] http://intellinuxgraphics.org/testing.html
- Intel Linux graphics website.
[2] http://wiki.x.org/wiki/Development/git - Document about building and installing whole stack.
[3]
http://wiki.x.org/wiki/ModularDevelopersGuide
- Document about building and installing Xorg.
