个人工具

UbuntuHelp:OpenChrome

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 15:38的版本 (新页面: {{From|https://help.ubuntu.com/community/OpenChrome}} {{Languages|UbuntuHelp:OpenChrome}} '''openChrome'''' is a free and open source video driver for the ASROCK/VIA/S3G UniChrome and U...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


openChrome' is a free and open source video driver for the ASROCK/VIA/S3G UniChrome and UniChrome Pro graphics chipsets. (CLE266, KN400, KM400, K8M800, PM800, CN400, CN700, VN800, K8M890, P4VM800)

For more information, please visit [1].

This howto will help you compile and install the openChrome driver in Ubuntu 6.06 LTS and up. It should also work on Debian and other Debian based distributions like Kanotix and Knoppix.

Before You Start

openChrome 2D driver compilation

  • Install needed packages

In Ubuntu 6.10 (Edgy) and 7.04 (Feisty), run:

sudo apt-get build-dep xserver-xorg-video-via

In Ubuntu 6.06.1 (Dapper), Debian and other Debian based distributions, run:

sudo apt-get build-dep xserver-xorg-driver-via

In both versions you should also run:

sudo apt-get install subversion autoconf automake1.9 libtool
  • Start the real fun

We will now compile the openChrome 2D driver

    • For chipsets different from K8M890 get the openChrome sourcecode like this:
svn checkout http://svn.openchrome.org/svn/trunk openchrome
    • For K8M890 chipset, alternatively run :
svn co http://svn.openchrome.org/svn/branches/experimental_branch openchrome-vt3336
    • Change into the newly created directory
cd openchrome*
    • Run autogen.sh with the prefix option so that the driver is being installed in the correct directory
./autogen.sh --prefix=/usr
    • Compile openChrome
make
    • Install openChrome
sudo make install

Now we have to edit /etc/X11/xorg.conf and change the Device Driver to via

gksudo gedit /etc/X11/xorg.conf

Or in Kubuntu

kdesu kate /etx/X11/xorg.conf

Go to

Section "Device"

and change Driver "vesa" to Driver "via" Save the file.

Finally, we have to restart our X server. You can do this by logging out and pressing Ctrl-Alt-Backspace from the login screen. If Xorg does not start anymore, log in in a console and change the Driver in the Device section back with an editor like nano. (Write the following on a piece of paper.)

sudo nano /etc/X11/xorg.conf


openChrome and 3D

3D should work out of the box in Edgy. If it does not do the following:

  • Install required packages

Get the kernel headers package and the client tool for retreiving source code from a git source code repository. In a terminal, type:

sudo apt-get install git-core linux-headers-generic
  • Obtain the sourcecode
git clone git://anongit.freedesktop.org/git/mesa/drm
  • Compile libdrm and drm kernel modules
    • libdrm

Change to the directory where the drm sourcecode is stored

cd drm

Run the autogen script

./autogen.sh --prefix=/usr

Compile the source code

make

Install the compiled source code

sudo make install
    • drm kernel modules

Change to the correct directory (you have to already be in the directory drm)

cd linux-core

Compile the kernel modules

make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via

If you get errors like that in Ubuntu 7.04 (Feisty)...

/home/shad/stuff/drm/linux-core/drm_compat.c:190: error: static declaration of ‘vm_insert_pfn’ follows non-static declaration
include/linux/mm.h:1126: error: previous declaration of ‘vm_insert_pfn’ was here
make[2]: *** [/home/shad/stuff/drm/linux-core/drm_compat.o] Error 1
make[1]: *** [_module_/home/shad/stuff/drm/linux-core] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make: *** [modules] Error 2

...this topic: http://ubuntuforums.org/showthread.php?t=419094 could be helpful.

Copy the kernel modules to the correct location

sudo cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/

Run depmod

sudo depmod -ae

Launch the modules

sudo modprobe drm
sudo modprobe via

Test with the following command

glxinfo | grep render

You should obtain a line saying "direct rendering: Yes"

If it works, add the modules so that they are launched at start up

echo "drm" | sudo tee -a /etc/modules
echo "via" | sudo tee -a /etc/modules

That should be it. Reboot and see how it goes.

Deb packages repository

SVN will have the lastest fixes on the openchrome, but if you prefer a .deb binary package you will find it at:

http://wiki.openchrome.org/tikiwiki/tiki-index.php?page=Collection+of+contributed+binary+packages

so, download the .deb for your Ubuntu version an then

sudo   dpkg -i [package_name.deb]

this will install the driver for you, after that edit your xorg configuration. (see Change the Xorg driver to via)

Problems and solutions

  • My system sometimes freezes

This is being caused by a bug in drm. To solve this, you have to uncomment

Load    "dri"

in your xorg.conf. As a result, you won't have 3D acceleration anymore, but your system won't freeze.

  • I do not have any picture when playing videos

This mostly happens when using a laptop and is caused by openChrome not supporting Xv correctly on some models. You can try to change the video driver in Xine to "gl" or "x11" and see if that helps. This problem does not appear when not using the integrated LCD and using an external monitor instead. The OpenChrome ticket for that is located here: [2]

  • My mouse cursor sometimes disappears

This is known to happen on VN800 and VM800 chipsets. As a solution, you can try to add

Option          "SWCursor" "true"

To the device section in your xorg.conf.

  • I installed a kernel update. Now 3D does not work anymore

You have to recompile the drm kernel module. The procedure is described above.

  • When running autogen.sh for the openchrome 2D driver, I get errors like
configure.ac: 30: required file `./[config.h].in' not found
unichrome/Makefile.am:33: via_drv_la_SOURCES defined both conditionally and unconditionally

This is due to having multiple versions of automake installed with the wrong version as the default. Run

sudo update-alternatives --config automake

and choose automake-1.9.