硬件:Intel 945G芯片组
全部默认状态下,用系统自带的电影播放机无法播放rmvb格式的视频文件,提示下载插件后还是无法正常播放
到realplay官方下载了linux版本的播放器可以播放,但是画面卡。
是不是驱动的问题?(第一次安装Ubuntu,对linux了解比较少)
到了Intel官方linux下载中心,获知可以下载945G的驱动来增强3D功能,
但是研究了大半天还是装不成功,编译不过去,又错误。。
下面是安装向导的说明,
。。。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.
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. If they have been built into kernel or built as kernel modules, you need not recompile them. Agpgart is only available from kernel source, but drm can be downloaded standalone.
2, libdrm;
Libdrm is included in drm source.
3, Xorg 2D driver: xf86-video-intel;
4, Mesa and 3D driver;
To get the detailed download address for above components, please refer http://intellinuxgraphics.org/download.html.
3. Building
We suppose you have downloaded all components under directory $DOWN_ROOT except kernel source.
3.1 Agpgart
To compile agpgart, you must recompile kernel.
Note: from kernel 2.6.20, agpgart can only build into kernel rather than building as modules.
When you execute "make menuconfig", you should:
-- Go to Device Driver -> Character devices
-- Go to /dev/agpgart (AGP Support)
-- Hit SPACE to build AGP support as Module
-- Enable Intel chipsets' support for AGP as Module
3.2 Drm and libdrm
To compile drm, simply enter source directory and execute make:
$ cd $DOWN_ROOT/drm/linux-core
$ make
Two binary modules will be generated: drm.ko and i915.ko. Then copy these two binary kernel modules to kernel lib directory:
$ cp *.ko /lib/module/$(uname -r)/kernel/driver/char/drm/
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.
3.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/.
3.4 Mesa and 3D driver
The 3D drivers are built from the Mesa source. Choose the right 'make' target depending on the hardware architecture you're compiling for. linux-dri is generic configuration file for all architectures on Linux.
You can edit configs/linux-dri file to customize the building. The first line defines some compiler optimization/debugging flags. You can simply use the default settings. The last line can be used to optimize the build by compiling only the drivers you need.
DRI_DIRS = <dri drivers>
The full set of current supported drivers is :
DRI_DIRS = i810 i915tex i915 mach64 mga r128 r200 radeon s3v savage sis tdfx trident unichrome r300
If you only need Intel driver, you can modify this line as:
DRI_DIRS = i915 i965
Note: You will need to update PKG_CONFIG_PATH if you installed libdrm in /usr/local/lib. For example, export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH.
Now you're ready to compile it:
$ make linux-dri
After compiling the Mesa tree, the 3D drivers can be found in mesa/lib/. You will need to copy the drivers to $XORG_DIR/lib/modules/dri/. In different OS distribution, the default directory may be different. You can also specify an environment variable LIBGL_DRIVES_PATH to override this default directory.
$ cp lib/*_dri.so $XORG_DIR/lib/modules/dri/
You need to install the mesa library and head files, by default they are /usr/local/lib and /usr/local/include. You can override this directory in command line when execute the installation script:
$ bin/installmesa $XORG_DIR
4. Configuration
4.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.
4.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
Note: The old name i810 has been deprecated now.
4.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
5. Reference
[1] http://intellinuxgraphics.org - Intel Linux graphics website.
[2] http://dri.freedesktop.org/wiki/Building - Document about building and installing DRM and Mesa.
[3] http://wiki.x.org/wiki/ModularDevelopersGuide - Document about building and installing Xorg.