特殊:Badtitle/NS100:OpenChrome:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/OpenChrome}} | {{From|https://help.ubuntu.com/community/OpenChrome}} | ||
{{Languages|UbuntuHelp:OpenChrome}} | {{Languages|UbuntuHelp:OpenChrome}} | ||
'''openChrome | ''Revised: 10 January 2009'' | ||
For more information, please visit [http://www.openchrome.org/]. | == Description == | ||
'''openChrome''' is a free and Open Source video driver for the VIA/S3G [[UbuntuHelp:UniChrome|UniChrome]], [[UbuntuHelp:UniChrome|UniChrome]] Pro and Chrome9 graphics chipsets: CLE266, KM400/KN400/KM400A/P4M800, CN400/PM800/PN800/PM880, K8M800, CN700/VM800/P4M800Pro, CX700, P4M890, K8M890, P4M900/VN896, VX800 | |||
< | For more information, please visit [http://www.openchrome.org/] | ||
This replaces | === Ubuntu 7.10 and previous releases === | ||
A version of the openchrome driver was backported to Ubuntu 7.10 (Gutsy Gibbon) repositories and can be installed by the command | |||
<pre><nowiki> | |||
sudo apt-get install xserver-xorg-video-openchrome | |||
</nowiki></pre> | |||
This replaces the <code><nowiki>via</nowiki></code> driver with the openchrome one. The driver module is still called <code><nowiki>via</nowiki></code>, so <code><nowiki>"via"</nowiki></code> is what needs to be written to the <code><nowiki>"Driver"</nowiki></code> field of the <code><nowiki>"Device"</nowiki></code> section in <code><nowiki>/etc/X11/xorg.conf</nowiki></code> | |||
For previous Ubuntu releases the driver had to be compiled from source. | |||
=== Ubuntu 8.04 and newer releases === | |||
Since Ubuntu 8.04 (Hardy Heron) the <code><nowiki>openchrome</nowiki></code> driver is installed by default, provided by the <code><nowiki>xserver-xorg-video-openchrome</nowiki></code> package. | |||
The <code><nowiki>via</nowiki></code> driver and the <code><nowiki>xserver-xorg-video-via</nowiki></code> package are no longer available in Ubuntu 8.10 (Intrepid Ibex). | |||
The <code><nowiki>openchrome</nowiki></code> manual page indicates which options can be used to configure the driver by editing <code><nowiki>/etc/X11/xorg.conf</nowiki></code>. | |||
The <code><nowiki>xorg.conf</nowiki></code> manual page explains the structure of this file. | |||
<pre><nowiki> | |||
man xorg.conf | |||
man openchrome | |||
</nowiki></pre> | |||
== Manual Installation == | |||
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. | 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 === | |||
* You must have [[UbuntuHelp:RootSudo|administrative privileges]]. | * You must have [[UbuntuHelp:RootSudo|administrative privileges]]. | ||
* Make sure you have enabled the [[UbuntuHelp:Repositories/Ubuntu#what|Universe and Multiverse repositories]]. <<BR>> See [[UbuntuHelp:Repositories/Ubuntu|Managing Repositories in Ubuntu]] or [[UbuntuHelp:Repositories/Kubuntu|Kubuntu]] for help with this. | * Make sure you have enabled the [[UbuntuHelp:Repositories/Ubuntu#what|Universe and Multiverse repositories]]. <<BR>> See [[UbuntuHelp:Repositories/Ubuntu|Managing Repositories in Ubuntu]] or [[UbuntuHelp:Repositories/Kubuntu|Kubuntu]] for help with this. | ||
=== openChrome 2D driver compilation === | |||
<ol><li>'''Install needed dependencies'''</li></ol> | |||
In | |||
You should get necessary tools to compile source code: | |||
<pre><nowiki> | |||
sudo apt-get install build-essential subversion autoconf automake1.9 libtool | |||
</nowiki></pre> | |||
Get all the dependency packages needed to build the driver.<<BR>> | |||
In 8.04 (Hardy) and later releases run: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get build-dep xserver-xorg-video-openchrome</nowiki></pre> | sudo apt-get build-dep xserver-xorg-video-openchrome | ||
In Ubuntu 7. | </nowiki></pre> | ||
In Ubuntu 7.10 (Gutsy), 7.04 (Feisty), and 6.10 (Edgy) run: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get build-dep xserver-xorg-video-via</nowiki></pre> | sudo apt-get build-dep xserver-xorg-video-via | ||
</nowiki></pre> | |||
In Ubuntu 6.06.1 (Dapper), Debian and other Debian based distributions, run: | In Ubuntu 6.06.1 (Dapper), Debian and other Debian based distributions, run: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get build-dep xserver-xorg-driver-via</nowiki></pre> | sudo apt-get build-dep xserver-xorg-driver-via | ||
</nowiki></pre> | |||
< | <ol><li>'''Compile and install the 2D driver'''</li></ol> | ||
* Get the openChrome sourcecode like this: | |||
* Get the openChrome sourcecode like this: | |||
<pre><nowiki> | <pre><nowiki> | ||
svn checkout http://svn.openchrome.org/svn/trunk openchrome</nowiki></pre> | svn checkout http://svn.openchrome.org/svn/trunk openchrome | ||
</nowiki></pre> | |||
* Change into the newly created directory | * Change into the newly created directory | ||
<pre><nowiki> | <pre><nowiki> | ||
cd openchrome*</nowiki></pre> | cd openchrome* | ||
* Run autogen.sh with the prefix option so that the driver is being installed in the correct directory | </nowiki></pre> | ||
* Run <code><nowiki>autogen.sh</nowiki></code> with the prefix option so that the driver is being installed in the correct directory | |||
<pre><nowiki> | <pre><nowiki> | ||
./autogen.sh --prefix=/usr</nowiki></pre> | ./autogen.sh --prefix=/usr | ||
</nowiki></pre> | |||
* Compile openChrome | * Compile openChrome | ||
<pre><nowiki> | <pre><nowiki> | ||
make</nowiki></pre> | make | ||
</nowiki></pre> | |||
* Install openChrome | * Install openChrome | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo make install</nowiki></pre> | sudo make install | ||
* | </nowiki></pre> | ||
<ol><li>'''Edit the X server configuration file'''</li></ol> | |||
* Edit <code><nowiki>/etc/X11/xorg.conf</nowiki></code> and change the device driver to <code><nowiki>openchrome</nowiki></code> | |||
<pre><nowiki> | <pre><nowiki> | ||
gksudo gedit /etc/X11/xorg.conf</nowiki></pre> | gksudo gedit /etc/X11/xorg.conf | ||
</nowiki></pre> | |||
Or in Kubuntu | Or in Kubuntu | ||
<pre><nowiki> | <pre><nowiki> | ||
kdesu kate / | kdesu kate /etc/X11/xorg.conf | ||
Go to | </nowiki></pre> | ||
Make a backup of this file in case you need to revert the changes. By default some editors create a backup by appending a tilde to the name of the file (<code><nowiki>xorg.conf~</nowiki></code>). This backup may be hidden in the file manager, but is still listed with <code><nowiki>ls</nowiki></code> in a terminal. | |||
* Go to | |||
<pre><nowiki> | <pre><nowiki> | ||
Section "Device"</nowiki></pre> | Section "Device" | ||
</nowiki></pre> | |||
and change | and change | ||
<pre><nowiki> | <pre><nowiki> | ||
Driver "vesa"</nowiki></pre> | Driver "vesa" | ||
</nowiki></pre> | |||
to | to | ||
<pre><nowiki> | <pre><nowiki> | ||
Driver "openchrome" | Driver "openchrome" | ||
</nowiki></pre> | |||
* Save the file. | |||
* Alternatively, you can also run | |||
Save the file. | |||
Alternatively, you can also | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo dpkg-reconfigure -phigh xserver-xorg</nowiki></pre> | sudo dpkg-reconfigure -phigh xserver-xorg | ||
</nowiki></pre> | |||
To test the new driver, go to a console (Ctrl+Alt+F1), | and pick "openchrome" when asked. | ||
<ol><li>'''Test the driver'''</li></ol> | |||
To test the new driver, go to a console (Ctrl+Alt+F1), log in and start a new X screen: | |||
<pre><nowiki> | <pre><nowiki> | ||
X :1</nowiki></pre> | X :1 | ||
If it works, then you can continue restarting your | </nowiki></pre> | ||
Finally, | If it works, then you can continue restarting your desktop manager. If not, you probably have another problem and need to fix this first. | ||
If Xorg does not start anymore, log in in a console and | Finally, restart the X server by logging out and back in, or typing <code><nowiki>sudo /etc/init.d/gdm restart</nowiki></code>. | ||
If Xorg does not start anymore, log in in a console and revert the changes made to the <code><nowiki>xorg.conf</nowiki></code> file. You can use an editor like <code><nowiki>nano</nowiki></code>. | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo nano /etc/X11/xorg.conf</nowiki></pre> | sudo nano /etc/X11/xorg.conf | ||
</nowiki></pre> | |||
You can also restore the backup | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo | sudo mv /etc/X11/xorg.conf~ /etc/X11/xorg.conf | ||
</nowiki></pre> | |||
== openChrome and 3D == | |||
''Editor's note: I haven't been able to test the openchrome driver with the latest Mesa libraries. Please update the relevant information if you have tested that this procedure works. (10 January 2009)'' | |||
=== 3D doesn't always work === | |||
The <code><nowiki>openchrome</nowiki></code> driver (and previously the <code><nowiki>via</nowiki></code> driver) alone only supports 2D acceleration. | |||
3D acceleration (Direct Rendering Infrastructure) is provided by a companion driver by the Mesa project and it is normally already installed on your system. | |||
However, DRI doesn't always work as expected and it is a known cause of problems and system freezing, specially with OpenGL applications, games, screensavers, and [[UbuntuHelp:Wine|Wine]]. See Launchpad bugs #43154, and #274340. | |||
There is no good 3D driver because VIA has not released enough chipset specifications to free software developers. | |||
For desktop PC users a definitive solution is to use another graphics card. For laptop users, their options are limited. | |||
=== Compiling libdrm and drm kernel modules === | |||
As with the 2D driver, you may install the latest 3D kernel module from source and see if this fixes your current problem with 3D acceleration. | |||
<ol><li>'''Install required packages'''</li></ol> | |||
Get necessary tools to compile source code, get the kernel headers and the client tool for retreiving source code from a '''git''' repository. In a terminal, type: | |||
<pre><nowiki> | <pre><nowiki> | ||
git | sudo apt-get install build-essential linux-headers git-core | ||
</nowiki></pre> | |||
The metapackage <code><nowiki>linux-headers</nowiki></code> gets the headers for the currently used kernel. If you want to compile against a different kernel, you need to install a different package, such as <code><nowiki>linux-headers-2.6.24-17-generic</nowiki></code>. | |||
<ol><li>'''Obtain the sourcecode'''</li></ol> | |||
<pre><nowiki> | <pre><nowiki> | ||
git clone git://anongit.freedesktop.org/git/mesa/drm | |||
</nowiki></pre> | |||
<ol><li>'''Compile and install libdrm'''</li></ol> | |||
* Change into the newly created directory | |||
<pre><nowiki> | <pre><nowiki> | ||
cd drm | |||
</nowiki></pre> | |||
* Run <code><nowiki>autogen.sh</nowiki></code> with the prefix option so that the driver is being installed in the correct directory | |||
<pre><nowiki> | <pre><nowiki> | ||
./autogen.sh --prefix=/usr | |||
</nowiki></pre> | |||
* Compile the source code | |||
<pre><nowiki> | <pre><nowiki> | ||
make | |||
* | </nowiki></pre> | ||
* Install the compiled source code | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo make install | |||
Compile | </nowiki></pre> | ||
<ol><li>'''Compile and install drm kernel modules'''</li></ol> | |||
* Change to the correct directory (you have to already be in the <code><nowiki>drm</nowiki></code> directory) | |||
<pre><nowiki> | <pre><nowiki> | ||
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via</nowiki></pre> | cd linux-core | ||
If you get errors | </nowiki></pre> | ||
* Compile the kernel modules | |||
<pre><nowiki> | |||
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via | |||
</nowiki></pre> | |||
If you get errors (example from Ubuntu 7.04) | |||
<pre><nowiki> | <pre><nowiki> | ||
/home/shad/stuff/drm/linux-core/drm_compat.c:190: error: static declaration of ‘vm_insert_pfn’ follows non-static declaration | /home/shad/stuff/drm/linux-core/drm_compat.c:190: error: static declaration of ‘vm_insert_pfn’ follows non-static declaration | ||
第113行: | 第170行: | ||
make[1]: *** [_module_/home/shad/stuff/drm/linux-core] Error 2 | 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[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic' | ||
make: *** [modules] Error 2</nowiki></pre> | make: *** [modules] Error 2 | ||
</nowiki></pre> | |||
Copy the kernel modules to the correct location | this topic: http://ubuntuforums.org/showthread.php?t=419094 could be helpful. | ||
* Copy the kernel modules to the correct location | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/</nowiki></pre> | sudo cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/ | ||
</nowiki></pre> | |||
* Asure all dependency modules are registered | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo depmod -ae | sudo depmod -ae | ||
</nowiki></pre> | </nowiki></pre> | ||
<ol><li>'''Test the modules'''</li></ol> | |||
* Load the modules to the kernel | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo modprobe drm | sudo modprobe drm | ||
sudo modprobe via</nowiki></pre> | sudo modprobe via | ||
Test with the following command | </nowiki></pre> | ||
* Test with the following command | |||
<pre><nowiki> | <pre><nowiki> | ||
glxinfo | grep render | glxinfo | grep render | ||
</nowiki></pre> | </nowiki></pre> | ||
You should obtain a line saying "direct rendering: Yes" | You should obtain a line saying "<code><nowiki>direct rendering: Yes</nowiki></code>" <<BR>> | ||
If it works, add the modules so that they are | If it works, add the modules names to the <code><nowiki>/etc/modules</nowiki></code> file so that they are loaded every time at start up | ||
<pre><nowiki> | <pre><nowiki> | ||
echo "drm" | sudo tee -a /etc/modules | echo "drm" | sudo tee -a /etc/modules | ||
echo "via" | sudo tee -a /etc/modules | echo "via" | sudo tee -a /etc/modules | ||
</nowiki></pre> | </nowiki></pre> | ||
That should be it. Reboot and see how it goes. | * That should be it. Reboot and see how it goes. | ||
== | == Problems and solutions == | ||
Most problems can be attributed to the use of this driver with 3D acceleration, that is Direct Rendering Infrastructure (DRI). | |||
Therefore most problems are avoided by disabling this option in the X server configuration file <code><nowiki>/etc/X11/xorg.conf</nowiki></code> | |||
* '''After upgrade to the latest OpenChrome revision, the driver stop working. How to get specific OpenChrome revision ?''' | |||
To find when error occur, you must just to the specific revision. | |||
For example to get revision 713, go to checkedout directory and type: | |||
<pre><nowiki> | <pre><nowiki> | ||
svn update -r713 | |||
</nowiki></pre> | </nowiki></pre> | ||
* '''My system sometimes freezes with OpenGL applications, games, screensavers, or [[UbuntuHelp:Wine|Wine]]''' | |||
This is being caused by a bug in <code><nowiki>drm</nowiki></code>. | |||
Edit <code><nowiki>/etc/X11/xorg.conf</nowiki></code> and disable DRI in the <code><nowiki>"Module"</nowiki></code> section.<<BR>> | |||
* '''My system sometimes freezes''' | Change | ||
This is being caused by a bug in drm. | |||
<pre><nowiki> | <pre><nowiki> | ||
Section "Module" | |||
... | |||
Load "dri" | Load "dri" | ||
</nowiki></pre> | ... | ||
EndSection | |||
</nowiki></pre> | |||
This | to | ||
<pre><nowiki> | |||
* '''My | Section "Module" | ||
... | |||
Disable "dri" | |||
... | |||
EndSection | |||
</nowiki></pre> | |||
In Ubuntu 8.04 and newer, the <code><nowiki>xorg.conf</nowiki></code> file no longer lists all the sections described in the manual page. In this case you can add the <code><nowiki>"Module"</nowiki></code> section to the beginning of the file, and your options will override the defaults.<<BR>><<BR>> | |||
As a result, you won't have 3D acceleration anymore, but your system won't freeze. | |||
Without DRI, all 3D will be software-rendered, which will be very slow, specially for games.<<BR>> | |||
This is a sensible solution for those that don't care about desktop effects or games. | |||
* '''Ubuntu 8.10 (Intrepid Ibex). My system sometimes freezes after loading the Gnome Desktop Manager.''' | |||
You can try adding the <code><nowiki>"XaaNoImageWriteRect"</nowiki></code> option to the <code><nowiki>"Device"</nowiki></code> section of <code><nowiki>/etc/X11/xorg.conf</nowiki></code> | |||
<pre><nowiki> | |||
Section "Device" | |||
Driver "openchrome" | |||
Option "XaaNoImageWriteRect" | |||
EndSection | |||
</nowiki></pre> | |||
* '''Ubuntu 8.10 (Intrepid Ibex). My login prompt is not centralised.''' | |||
In addition to the above <code><nowiki>"XaaNoImageWriteRect"</nowiki></code> option, in the <code><nowiki>Section "Screen"</nowiki></code> add or modify the <code><nowiki>SubSection "Display"</nowiki></code> to include the <code><nowiki>Virtual</nowiki></code> setting to suit your screen: | |||
<pre><nowiki> | <pre><nowiki> | ||
SubSection "Display" | |||
</nowiki></pre> | Virtual 1280 800 | ||
EndSubSection | |||
* '''I | </nowiki></pre> | ||
* '''I found a bug in openchrome. How to enable debug mode?''' | |||
You must run <code><nowiki>autogen.sh</nowiki></code> with debug options, compile and install, like was described above. | |||
<pre><nowiki> | <pre><nowiki> | ||
configure.ac: 30: required file `./[config.h].in' not found | ./autogen.sh --prefix=/usr --enable-debug --enable-xv-debug | ||
</nowiki></pre> | |||
</nowiki></pre> | * '''My mouse cursor sometimes disappears.'''<<BR>> | ||
This is known to happen on VN800 and VM800 chipsets, e.g. Axioo Neon TVR 856C / TVR 016C laptops. As a solution, you can try to add <code><nowiki>"SWCursor"</nowiki></code> to the options of the <code><nowiki>"Device"</nowiki></code> section in <code><nowiki>/etc/X11/xorg.conf</nowiki></code> | |||
<pre><nowiki> | |||
Section "Device" | |||
Driver "openchrome" | |||
Option "SWCursor" "true" | |||
EndSection | |||
</nowiki></pre> | |||
* '''I installed a kernel update. Now 3D does not work anymore.'''<<BR>> | |||
If you manually installed the drm kernel module, you will have to recompile it with the new kernel headers. The procedure is described above. | |||
* '''When running <code><nowiki>autogen.sh</nowiki></code> for the openchrome 2D driver, I get errors like:''' | |||
<pre><nowiki> | |||
configure.ac: 30: required file `./[config.h].in' not found | |||
unichrome/Makefile.am:33: via_drv_la_SOURCES defined both conditionally and unconditionally | |||
</nowiki></pre> | |||
This is due to having multiple versions of automake installed with the wrong version as the default. Run | This is due to having multiple versions of automake installed with the wrong version as the default. Run | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo update-alternatives --config automake | |||
</nowiki></pre> | </nowiki></pre> | ||
and choose automake-1.9. | and choose <code><nowiki>automake-1.9</nowiki></code> | ||
* '''I have redraw mistakes on the desktop and in various applications. Lines, icons, and sliders disappear; sometimes they reappear when I move the mouse over it or when I move a window over it and back.''' | |||
The redraw-issues can be worked around by trying <code><nowiki>"True"</nowiki></code>, <code><nowiki>"False"</nowiki></code>, <code><nowiki>"On"</nowiki></code>, <code><nowiki>"Off"</nowiki></code> as values of the <code><nowiki>"EnableAGPDMA"</nowiki></code> option of the <code><nowiki>"Device"</nowiki></code> section in <code><nowiki>/etc/xorg.conf</nowiki></code> | |||
<pre><nowiki> | <pre><nowiki> | ||
Section "Device" | |||
Driver "openchrome" | |||
Option "EnableAGPDMA" "True" | |||
EndSection | |||
</nowiki></pre> | |||
</nowiki></pre> | |||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2009年5月12日 (二) 18:15的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/OpenChrome }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/af | • {{#if: UbuntuHelp:OpenChrome|Afrikaans| [[::OpenChrome/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ar | • {{#if: UbuntuHelp:OpenChrome|العربية| [[::OpenChrome/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/az | • {{#if: UbuntuHelp:OpenChrome|azərbaycanca| [[::OpenChrome/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/bcc | • {{#if: UbuntuHelp:OpenChrome|جهلسری بلوچی| [[::OpenChrome/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/bg | • {{#if: UbuntuHelp:OpenChrome|български| [[::OpenChrome/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/br | • {{#if: UbuntuHelp:OpenChrome|brezhoneg| [[::OpenChrome/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ca | • {{#if: UbuntuHelp:OpenChrome|català| [[::OpenChrome/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/cs | • {{#if: UbuntuHelp:OpenChrome|čeština| [[::OpenChrome/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/de | • {{#if: UbuntuHelp:OpenChrome|Deutsch| [[::OpenChrome/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/el | • {{#if: UbuntuHelp:OpenChrome|Ελληνικά| [[::OpenChrome/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/es | • {{#if: UbuntuHelp:OpenChrome|español| [[::OpenChrome/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/fa | • {{#if: UbuntuHelp:OpenChrome|فارسی| [[::OpenChrome/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/fi | • {{#if: UbuntuHelp:OpenChrome|suomi| [[::OpenChrome/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/fr | • {{#if: UbuntuHelp:OpenChrome|français| [[::OpenChrome/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/gu | • {{#if: UbuntuHelp:OpenChrome|ગુજરાતી| [[::OpenChrome/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/he | • {{#if: UbuntuHelp:OpenChrome|עברית| [[::OpenChrome/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/hu | • {{#if: UbuntuHelp:OpenChrome|magyar| [[::OpenChrome/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/id | • {{#if: UbuntuHelp:OpenChrome|Bahasa Indonesia| [[::OpenChrome/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/it | • {{#if: UbuntuHelp:OpenChrome|italiano| [[::OpenChrome/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ja | • {{#if: UbuntuHelp:OpenChrome|日本語| [[::OpenChrome/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ko | • {{#if: UbuntuHelp:OpenChrome|한국어| [[::OpenChrome/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ksh | • {{#if: UbuntuHelp:OpenChrome|Ripoarisch| [[::OpenChrome/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/mr | • {{#if: UbuntuHelp:OpenChrome|मराठी| [[::OpenChrome/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ms | • {{#if: UbuntuHelp:OpenChrome|Bahasa Melayu| [[::OpenChrome/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/nl | • {{#if: UbuntuHelp:OpenChrome|Nederlands| [[::OpenChrome/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/no | • {{#if: UbuntuHelp:OpenChrome|norsk| [[::OpenChrome/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/oc | • {{#if: UbuntuHelp:OpenChrome|occitan| [[::OpenChrome/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/pl | • {{#if: UbuntuHelp:OpenChrome|polski| [[::OpenChrome/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/pt | • {{#if: UbuntuHelp:OpenChrome|português| [[::OpenChrome/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ro | • {{#if: UbuntuHelp:OpenChrome|română| [[::OpenChrome/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/ru | • {{#if: UbuntuHelp:OpenChrome|русский| [[::OpenChrome/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/si | • {{#if: UbuntuHelp:OpenChrome|සිංහල| [[::OpenChrome/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/sq | • {{#if: UbuntuHelp:OpenChrome|shqip| [[::OpenChrome/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/sr | • {{#if: UbuntuHelp:OpenChrome|српски / srpski| [[::OpenChrome/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/sv | • {{#if: UbuntuHelp:OpenChrome|svenska| [[::OpenChrome/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/th | • {{#if: UbuntuHelp:OpenChrome|ไทย| [[::OpenChrome/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/tr | • {{#if: UbuntuHelp:OpenChrome|Türkçe| [[::OpenChrome/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/vi | • {{#if: UbuntuHelp:OpenChrome|Tiếng Việt| [[::OpenChrome/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/yue | • {{#if: UbuntuHelp:OpenChrome|粵語| [[::OpenChrome/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/zh | • {{#if: UbuntuHelp:OpenChrome|中文| [[::OpenChrome/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/zh-hans | • {{#if: UbuntuHelp:OpenChrome|中文(简体)| [[::OpenChrome/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:OpenChrome | UbuntuHelp:OpenChrome | {{#if: | :}}OpenChrome}}/zh-hant | • {{#if: UbuntuHelp:OpenChrome|中文(繁體)| [[::OpenChrome/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:OpenChrome|:OpenChrome|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :OpenChrome/zh | | {{#ifexist: OpenChrome/zh | | {{#ifeq: {{#titleparts:OpenChrome|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:OpenChrome|1|-1|}} | zh | | }}
Revised: 10 January 2009
Description
openChrome is a free and Open Source video driver for the VIA/S3G UniChrome, UniChrome Pro and Chrome9 graphics chipsets: CLE266, KM400/KN400/KM400A/P4M800, CN400/PM800/PN800/PM880, K8M800, CN700/VM800/P4M800Pro, CX700, P4M890, K8M890, P4M900/VN896, VX800 For more information, please visit [1]
Ubuntu 7.10 and previous releases
A version of the openchrome driver was backported to Ubuntu 7.10 (Gutsy Gibbon) repositories and can be installed by the command
sudo apt-get install xserver-xorg-video-openchrome
This replaces the via
driver with the openchrome one. The driver module is still called via
, so "via"
is what needs to be written to the "Driver"
field of the "Device"
section in /etc/X11/xorg.conf
For previous Ubuntu releases the driver had to be compiled from source.
Ubuntu 8.04 and newer releases
Since Ubuntu 8.04 (Hardy Heron) the openchrome
driver is installed by default, provided by the xserver-xorg-video-openchrome
package.
The via
driver and the xserver-xorg-video-via
package are no longer available in Ubuntu 8.10 (Intrepid Ibex).
The openchrome
manual page indicates which options can be used to configure the driver by editing /etc/X11/xorg.conf
.
The xorg.conf
manual page explains the structure of this file.
man xorg.conf man openchrome
Manual Installation
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
- You must have administrative privileges.
- Make sure you have enabled the Universe and Multiverse repositories. <
> See Managing Repositories in Ubuntu or Kubuntu for help with this.
openChrome 2D driver compilation
- Install needed dependencies
You should get necessary tools to compile source code:
sudo apt-get install build-essential subversion autoconf automake1.9 libtool
Get all the dependency packages needed to build the driver.<
>
In 8.04 (Hardy) and later releases run:
sudo apt-get build-dep xserver-xorg-video-openchrome
In Ubuntu 7.10 (Gutsy), 7.04 (Feisty), and 6.10 (Edgy) 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
- Compile and install the 2D driver
- Get the openChrome sourcecode like this:
svn checkout http://svn.openchrome.org/svn/trunk openchrome
- 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
- Edit the X server configuration file
- Edit
/etc/X11/xorg.conf
and change the device driver toopenchrome
gksudo gedit /etc/X11/xorg.conf
Or in Kubuntu
kdesu kate /etc/X11/xorg.conf
Make a backup of this file in case you need to revert the changes. By default some editors create a backup by appending a tilde to the name of the file (xorg.conf~
). This backup may be hidden in the file manager, but is still listed with ls
in a terminal.
- Go to
Section "Device"
and change
Driver "vesa"
to
Driver "openchrome"
- Save the file.
- Alternatively, you can also run
sudo dpkg-reconfigure -phigh xserver-xorg
and pick "openchrome" when asked.
- Test the driver
To test the new driver, go to a console (Ctrl+Alt+F1), log in and start a new X screen:
X :1
If it works, then you can continue restarting your desktop manager. If not, you probably have another problem and need to fix this first.
Finally, restart the X server by logging out and back in, or typing sudo /etc/init.d/gdm restart
.
If Xorg does not start anymore, log in in a console and revert the changes made to the xorg.conf
file. You can use an editor like nano
.
sudo nano /etc/X11/xorg.conf
You can also restore the backup
sudo mv /etc/X11/xorg.conf~ /etc/X11/xorg.conf
openChrome and 3D
Editor's note: I haven't been able to test the openchrome driver with the latest Mesa libraries. Please update the relevant information if you have tested that this procedure works. (10 January 2009)
3D doesn't always work
The openchrome
driver (and previously the via
driver) alone only supports 2D acceleration.
3D acceleration (Direct Rendering Infrastructure) is provided by a companion driver by the Mesa project and it is normally already installed on your system.
However, DRI doesn't always work as expected and it is a known cause of problems and system freezing, specially with OpenGL applications, games, screensavers, and Wine. See Launchpad bugs #43154, and #274340.
There is no good 3D driver because VIA has not released enough chipset specifications to free software developers.
For desktop PC users a definitive solution is to use another graphics card. For laptop users, their options are limited.
Compiling libdrm and drm kernel modules
As with the 2D driver, you may install the latest 3D kernel module from source and see if this fixes your current problem with 3D acceleration.
- Install required packages
Get necessary tools to compile source code, get the kernel headers and the client tool for retreiving source code from a git repository. In a terminal, type:
sudo apt-get install build-essential linux-headers git-core
The metapackage linux-headers
gets the headers for the currently used kernel. If you want to compile against a different kernel, you need to install a different package, such as linux-headers-2.6.24-17-generic
.
- Obtain the sourcecode
git clone git://anongit.freedesktop.org/git/mesa/drm
- Compile and install libdrm
- Change into the newly created directory
cd drm
- Run
autogen.sh
with the prefix option so that the driver is being installed in the correct directory
./autogen.sh --prefix=/usr
- Compile the source code
make
- Install the compiled source code
sudo make install
- Compile and install drm kernel modules
- Change to the correct directory (you have to already be in the
drm
directory)
cd linux-core
- Compile the kernel modules
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via
If you get errors (example from Ubuntu 7.04)
/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/
- Asure all dependency modules are registered
sudo depmod -ae
- Test the modules
- Load the modules to the kernel
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 names to the /etc/modules
file so that they are loaded every time 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.
Problems and solutions
Most problems can be attributed to the use of this driver with 3D acceleration, that is Direct Rendering Infrastructure (DRI).
Therefore most problems are avoided by disabling this option in the X server configuration file /etc/X11/xorg.conf
- After upgrade to the latest OpenChrome revision, the driver stop working. How to get specific OpenChrome revision ?
To find when error occur, you must just to the specific revision. For example to get revision 713, go to checkedout directory and type:
svn update -r713
- My system sometimes freezes with OpenGL applications, games, screensavers, or Wine
This is being caused by a bug in drm
.
Edit /etc/X11/xorg.conf
and disable DRI in the "Module"
section.<
>
Change
Section "Module" ... Load "dri" ... EndSection
to
Section "Module" ... Disable "dri" ... EndSection
In Ubuntu 8.04 and newer, the xorg.conf
file no longer lists all the sections described in the manual page. In this case you can add the "Module"
section to the beginning of the file, and your options will override the defaults.<
><
>
As a result, you won't have 3D acceleration anymore, but your system won't freeze.
Without DRI, all 3D will be software-rendered, which will be very slow, specially for games.<
>
This is a sensible solution for those that don't care about desktop effects or games.
- Ubuntu 8.10 (Intrepid Ibex). My system sometimes freezes after loading the Gnome Desktop Manager.
You can try adding the "XaaNoImageWriteRect"
option to the "Device"
section of /etc/X11/xorg.conf
Section "Device" Driver "openchrome" Option "XaaNoImageWriteRect" EndSection
- Ubuntu 8.10 (Intrepid Ibex). My login prompt is not centralised.
In addition to the above "XaaNoImageWriteRect"
option, in the Section "Screen"
add or modify the SubSection "Display"
to include the Virtual
setting to suit your screen:
SubSection "Display" Virtual 1280 800 EndSubSection
- I found a bug in openchrome. How to enable debug mode?
You must run autogen.sh
with debug options, compile and install, like was described above.
./autogen.sh --prefix=/usr --enable-debug --enable-xv-debug
- My mouse cursor sometimes disappears.<
>
This is known to happen on VN800 and VM800 chipsets, e.g. Axioo Neon TVR 856C / TVR 016C laptops. As a solution, you can try to add "SWCursor"
to the options of the "Device"
section in /etc/X11/xorg.conf
Section "Device" Driver "openchrome" Option "SWCursor" "true" EndSection
- I installed a kernel update. Now 3D does not work anymore.<
>
If you manually installed the drm kernel module, you will have to recompile it with the new kernel headers. 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
- I have redraw mistakes on the desktop and in various applications. Lines, icons, and sliders disappear; sometimes they reappear when I move the mouse over it or when I move a window over it and back.
The redraw-issues can be worked around by trying "True"
, "False"
, "On"
, "Off"
as values of the "EnableAGPDMA"
option of the "Device"
section in /etc/xorg.conf
Section "Device" Driver "openchrome" Option "EnableAGPDMA" "True" EndSection