个人工具

“UbuntuHelp:OpenChrome”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的5个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/OpenChrome}}
 
{{From|https://help.ubuntu.com/community/OpenChrome}}
 
{{Languages|UbuntuHelp:OpenChrome}}
 
{{Languages|UbuntuHelp:OpenChrome}}
'''openChrome'''' is a free and open source video driver for the ASROCK/VIA/S3G [[UbuntuHelp:UniChrome|UniChrome]] and [[UbuntuHelp:UniChrome|UniChrome]] Pro graphics chipsets. (CLE266, KN400, KM400, K8M800, PM800, CN400, CN700, VN800, K8M890, P4VM800)
+
''Revised: 7 May 2010''
For more information, please visit [http://www.openchrome.org/].
+
== Description ==
The openchrome driver can be installed by the command
+
'''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/CN896, VX800, VX855.
<code><nowiki> sudo apt-get install xserver-xorg-video-openchrome </nowiki></code>
+
For more information, please visit [http://www.openchrome.org/]
This replaces your current via driver with the openchrome one. That driver module is still called via, so via is what you need to select or write into your /etc/X11/xorg.conf file (for details see below).
+
=== Ubuntu 8.04 , Debian 5.0 and newer releases ===
Read on if this doesn't work for you.
+
Since Ubuntu 8.04 (Hardy Heron) and Debian 5.0 the <code><nowiki>openchrome</nowiki></code> driver is installed by default, provided by the <code><nowiki>xserver-xorg-video-openchrome</nowiki></code> package. If this driver works correctly for your needs, '''there is no need to compile the driver yourself'''.
=== Manual Installation ===
+
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) and later releases.
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.
+
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>.
==== Before You Start  ====
+
The <code><nowiki>xorg.conf</nowiki></code> manual page explains the structure of this file.
* 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.
+
==== openChrome 2D driver compilation ====
+
* '''Install needed packages'''
+
In Ubuntu 6.10 (Edgy),7.04 (Feisty) & 7.10(Gutsy) run:
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get build-dep xserver-xorg-video-via</nowiki></pre>
+
man xorg.conf
In Ubuntu 6.06.1 (Dapper), Debian and other Debian based distributions, run:
+
man openchrome
 +
</nowiki></pre>
 +
=== 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>
 
<pre><nowiki>
sudo apt-get build-dep xserver-xorg-driver-via</nowiki></pre>
+
sudo apt-get install xserver-xorg-video-openchrome
In both versions you should also run:
+
</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.
 +
== Manual Installation ==
 +
These instructions will help you compile and install the openChrome driver in Ubuntu 6.06 (Dapper) and up. It should also work on Debian and other Debian-based distributions.
 +
=== Before you start  ===
 +
* Make sure you have enabled the [[UbuntuHelp:Repositories/Ubuntu#what|Universe and Multiverse repositories]]. See [[UbuntuHelp:Repositories/Ubuntu|Managing Repositories in Ubuntu]] or [[UbuntuHelp:Repositories/Kubuntu|Kubuntu]] for help with this.
 +
* Use <code><nowiki>sudo</nowiki></code> to obtain [[UbuntuHelp:RootSudo|administrative privileges]], in order to edit, move or install system files.
 +
* Commands for checking out source code, patching files, or compiling don't need <code><nowiki>sudo</nowiki></code>.
 +
=== openChrome 2D driver compilation ===
 +
<ol><li>'''Install needed dependencies'''</li></ol>
 +
 
 +
* Get necessary tools to compile source code:
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install subversion autoconf automake1.9 libtool</nowiki></pre>
+
sudo apt-get install build-essential
* '''Start the real fun'''
+
sudo apt-get install subversion
We will now compile the openChrome 2D driver
+
sudo apt-get install autoconf automake1.9 libtool
* Get the openChrome sourcecode like this: (experimental_branch is now obsolete, use trunk even for K8M890 chipset)
+
  </nowiki></pre>
 +
* Get all the dependency packages needed to build the driver.
 +
In 8.04 (Hardy) and later releases run:
 
<pre><nowiki>
 
<pre><nowiki>
svn checkout http://svn.openchrome.org/svn/trunk openchrome</nowiki></pre>
+
sudo apt-get build-dep xserver-xorg-video-openchrome
* Change into the newly created directory
+
  </nowiki></pre>
 +
In Ubuntu 7.10 (Gutsy), 7.04 (Feisty), and 6.10 (Edgy) run:
 
<pre><nowiki>
 
<pre><nowiki>
cd openchrome*</nowiki></pre>
+
sudo apt-get build-dep xserver-xorg-video-via
* Run autogen.sh with the prefix option so that the driver is being installed in the correct directory
+
  </nowiki></pre>
 +
In Ubuntu 6.06 (Dapper), and older Debian-based distributions, run:
 
<pre><nowiki>
 
<pre><nowiki>
./autogen.sh --prefix=/usr</nowiki></pre>
+
sudo apt-get build-dep xserver-xorg-driver-via
* Compile openChrome
+
  </nowiki></pre>
 +
<ol><li>'''Compile and install the 2D driver'''</li></ol>
 +
 
 +
* Get the openChrome source code from the subversion repository:
 
<pre><nowiki>
 
<pre><nowiki>
make</nowiki></pre>
+
svn checkout http://svn.openchrome.org/svn/trunk openchrome
* Install openChrome
+
  </nowiki></pre>
 +
* Change into the newly created directory:
 
<pre><nowiki>
 
<pre><nowiki>
sudo make install</nowiki></pre>
+
cd openchrome*
*
+
  </nowiki></pre>
Now we have to edit /etc/X11/xorg.conf and change the Device Driver to via
+
* Run <code><nowiki>autogen.sh</nowiki></code> with the prefix option so that the driver is installed to the correct directory. You may enable debug options to troubleshoot the driver in case it doesn't work:
 
<pre><nowiki>
 
<pre><nowiki>
gksudo gedit /etc/X11/xorg.conf</nowiki></pre>
+
./autogen.sh --prefix=/usr --enable-debug --enable-xv-debug
Or in Kubuntu
+
  </nowiki></pre>
 +
* Compile openChrome:
 
<pre><nowiki>
 
<pre><nowiki>
kdesu kate /etx/X11/xorg.conf</nowiki></pre>
+
make
Go to
+
  </nowiki></pre>
 +
* Install openChrome:
 
<pre><nowiki>
 
<pre><nowiki>
Section "Device"</nowiki></pre>
+
sudo make install
and change
+
  </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>
Driver "vesa"</nowiki></pre>
+
gksudo gedit /etc/X11/xorg.conf
to
+
  </nowiki></pre>
 +
or in Kubuntu
 
<pre><nowiki>
 
<pre><nowiki>
Driver "openchrome"</nowiki></pre>
+
kdesu kate /etc/X11/xorg.conf
Save the file.
+
  </nowiki></pre>
Alternatively, you can also:
+
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 the terminal.
 +
* The <code><nowiki>"Device"</nowiki></code> section should include the <code><nowiki>"openchrome"</nowiki></code> driver:
 
<pre><nowiki>
 
<pre><nowiki>
sudo dpkg-reconfigure -phigh xserver-xorg</nowiki></pre>
+
Section "Device"
And pick "openchrome" when asked.
+
        Identifier      "Configured Video Device"
To test the new driver, go to a console (Ctrl+Alt+F1), login and start a new X screen:
+
        Driver          "openchrome"
 +
EndSection
 +
  </nowiki></pre>
 +
* Save the file.
 +
* In older Ubuntu releases, the driver could be chosen by running the following command, and picking "openchrome" when asked.:
 
<pre><nowiki>
 
<pre><nowiki>
X :1</nowiki></pre>
+
sudo dpkg-reconfigure -phigh xserver-xorg
If it works, then you can continue restarting your GDM/GNOME. If not, you probably need to fix this first.
+
  </nowiki></pre>
Finally, we have to restart our X server. You can do this by logging out and pressing ''Ctrl-Alt-Backspace'' from the login screen.
+
In newer Ubuntu releases, in which the X Server configures itself automatically, the previous command does not work, and <code><nowiki>xorg.conf</nowiki></code> needs to be edited manually.
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.)
+
<ol><li>'''Test the driver'''</li></ol>
 +
 
 +
Restart your desktop manager by logging out and back in, or restarting your computer.
 +
<ol><li>'''If it doesn't work'''</li></ol>
 +
 
 +
If the X Server does not start any more, that is, you have a black screen, revert the changes made to the <code><nowiki>xorg.conf</nowiki></code> file and use the <code><nowiki>vesa</nowiki></code> generic driver in order to boot and find another solution for your problem.
 +
Log into a terminal (Ctrl+Alt+1), and 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
==== openChrome and 3D ====
+
</nowiki></pre>
3D should work out of the box in Edgy. If it does not do the following:
+
Set the appropriate <code><nowiki>Driver</nowiki></code> to <code><nowiki>"vesa"</nowiki></code>:
* '''Install required packages'''<<BR>>
+
Get the kernel headers package and the client tool for retreiving source code from a git source code repository.  In a terminal, type:
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install git-core linux-headers-generic</nowiki></pre>
+
Section "Device"
* '''Obtain the sourcecode'''
+
        Identifier      "Configured Video Device"
 +
        Driver          "vesa"
 +
EndSection
 +
</nowiki></pre>
 +
You may also rewrite the file with the backup:
 
<pre><nowiki>
 
<pre><nowiki>
git clone git://anongit.freedesktop.org/git/mesa/drm</nowiki></pre>
+
sudo mv /etc/X11/xorg.conf~ /etc/X11/xorg.conf
* '''Compile libdrm and drm kernel modules'''
+
</nowiki></pre>
* '''libdrm'''<<BR>>
+
=== 3D doesn't always work ===
Change to the directory where the drm sourcecode is stored
+
The <code><nowiki>openchrome</nowiki></code> driver (and previously the <code><nowiki>via</nowiki></code> driver) only supports 2D acceleration, and most of the time it will always work.
 +
3D acceleration (Direct Rendering Infrastructure or DRI) is provided by a companion driver by the Mesa project and it is normally already installed on your system.
 +
To avoid immediate crash of the X Server, from openChrome revision 749, DRI was disabled by default for Chrome9, thus making 3D applications run in Software Rasterizer mode. This solution helps prevent the system freezing, specially with OpenGL applications, games, screensavers, and [[UbuntuHelp:Wine|Wine]] (see Launchpad bug #274340). With this solution you won't have 3D acceleration (3D applications will be slow), but your system won't freeze.
 +
Keep in mind that:
 +
* 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 to the lack of 3D features is to use another graphics card, either PCI, AGP, PCI-Express, etc. Laptop users may have to avoid 3D applications altogether.
 +
== VIA proprietary graphics driver for Chrome9 ==
 +
''Note from the editor:'' Help clean up this section. It is not evident what exactly is being installed, or why the instructions ask to use some files for Ubuntu 8.10, and other files for Ubuntu 9.04.
 +
There is a VIA proprietary driver for Chrome9 chipsets that should support most of the features missing with the openChrome driver, like video decoding acceleration and 3D hardware acceleration.
 +
These installing instructions are for Ubuntu 9.04 and Chrome9 graphic series chipsets: CX700M/VX700/CN700/CN896/VN896/VX800/VX855.
 +
1. Install some packages in order to be able to compile a kernel module
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
cd drm</nowiki></pre>
+
sudo apt-get install build-essential
Run the autogen script
+
sudo apt-get install subversion
 +
sudo apt-get install autoconf automake1.9 libtool
 +
sudo apt-get install linux-headers-generic xorg-dev
 +
</nowiki></pre>
 +
The driver can be found at the following website:
 +
http://linux.via.com.tw/support/downloadFiles.action
 +
Choose "OS: Ubuntu 8.10" and "Platform: VX800" and download the "Unified GFX driver Ver 85a-44597 for Ubuntu 8.10".
 +
Install the <code><nowiki>libGL.so.1.2.via_chrome9</nowiki></code> library:
 
<pre><nowiki>
 
<pre><nowiki>
./autogen.sh --prefix=/usr</nowiki></pre>
+
tar xzvf 5.74.33.85a-44597.tar.gz
Compile the source code
+
cd 5.74.33.85a-44597
 +
sudo ./vinstall
 +
</nowiki></pre>
 +
The previous step installs the libGL library for Ubuntu 8.10, and not Ubuntu 9.04; this seems to work to some extent. The other option would be to not install it, but then GL would not be available.
 +
Choose "OS: Ubuntu 9.04" and "Platform: VX800" and download the "Unified 2D/DRM driver source version 86a-50283".
 +
Install the <code><nowiki>via_chrome9</nowiki></code> kernel module and the <code><nowiki>via</nowiki></code> xorg driver:
 
<pre><nowiki>
 
<pre><nowiki>
make</nowiki></pre>
+
tar xjvf /root/via-xserver-86a-50283_src.tgz
Install the compiled source code
+
cd via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28
 +
make
 +
sudo make install
 +
sudo depmod -a
 +
cd ../../XServer
 +
chmod a+x autogen.sh
 +
./autogen.sh
 +
make
 +
sudo make install
 +
cd Misc
 +
chmod a+x vinstall_ubuntu
 +
sudo ./vinstall_ubuntu
 +
</nowiki></pre>
 +
At this point, edit <code><nowiki>/etc/X11/xorg.conf</nowiki></code> to include the <code><nowiki>"via"</nowiki></code> driver in the <code><nowiki>"Device"</nowiki></code> section:
 
<pre><nowiki>
 
<pre><nowiki>
sudo make install</nowiki></pre>
+
Section "ServerLayout"
* '''drm kernel modules'''<<BR>>
+
        Identifier    "X.org Configured"
Change to the correct directory (you have to already be in the directory drm)
+
        Option        "RandR"  "false"
 +
EndSection
 +
 
 +
Section "Device"
 +
        Identifier      "Configured Video Device"
 +
        Driver          "via"
 +
EndSection
 +
</nowiki></pre>
 +
Mixing the latest 2D VIA open source driver (v86a) with the previous GFX driver (v85a) will crash your system when starting an OpenGL program that uses textures. So refrain from doing so until VIA comes with an updated version of the GFX driver.
 +
== Problems and solutions ==
 +
=== General ===
 +
* '''After compiling and upgrading to the latest openChrome revision, a bug appeared. What should I do?'''
 +
First find in which revision the bug was introduced. You should get intermediate revisions of the openChrome driver between the last working revision, and the current one. Then, you should compile and install some revisions to determine in which revision the bug appeared.
 +
For example, to get revision 713, check out from the subversion tree:
 
<pre><nowiki>
 
<pre><nowiki>
cd linux-core</nowiki></pre>
+
svn checkout http://svn.openchrome.org/svn/trunk openchrome
Compile the kernel modules
+
</nowiki></pre>
 +
Then, enter the created directory and type:
 
<pre><nowiki>
 
<pre><nowiki>
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via</nowiki></pre>
+
svn update -r713
If you get errors like that in Ubuntu 7.04 (Feisty)...
+
</nowiki></pre>
 +
Then, compile, install, and test this revision as described above. If you can confirm that a bug was introduced in this revision, submit a bug report at:
 +
http://www.openchrome.org/trac/newticket
 +
For the developers' convenience, attach the X Server log <code><nowiki>/var/log/Xorg.0.log</nowiki></code>, and the X Server configuration file <code><nowiki>/etc/X11/xorg.conf</nowiki></code>.
 +
* '''I found a bug in openChrome. How do I enable debug mode?'''
 +
After obtaining the source code, run <code><nowiki>autogen.sh</nowiki></code> with debug options:
 
<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
+
./autogen.sh --prefix=/usr --enable-debug --enable-xv-debug
include/linux/mm.h:1126: error: previous declaration of ‘vm_insert_pfn’ was here
+
</nowiki></pre>
make[2]: *** [/home/shad/stuff/drm/linux-core/drm_compat.o] Error 1
+
Then you may compile, install, and test the driver as was described above.
make[1]: *** [_module_/home/shad/stuff/drm/linux-core] Error 2
+
* '''When running <code><nowiki>autogen.sh</nowiki></code> for the openchrome 2D driver, I get errors like:'''
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
+
make: *** [modules] Error 2</nowiki></pre>
+
...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>
+
configure.ac: 30: required file `./[config.h].in' not found
Run depmod
+
unichrome/Makefile.am:33: via_drv_la_SOURCES defined both conditionally and unconditionally
 +
</nowiki></pre>
 +
This is due to having multiple versions of the <code><nowiki>automake</nowiki></code> tool installed, with the wrong version as the default. Make sure you use <code><nowiki>automake-1.9</nowiki></code>:
 
<pre><nowiki>
 
<pre><nowiki>
sudo depmod -ae
+
sudo apt-get install automake1.9
</nowiki></pre>
+
</nowiki></pre>
Launch the modules
+
If you have different versions installed, you can choose the default one with:
 
<pre><nowiki>
 
<pre><nowiki>
sudo modprobe drm
+
sudo update-alternatives --config automake
sudo modprobe via</nowiki></pre>
+
</nowiki></pre>
Test with the following command
+
* '''How do I apply a patch to the openChrome driver'''
 +
Go into openChrome source code directory and type:
 
<pre><nowiki>
 
<pre><nowiki>
glxinfo | grep render
+
patch -p0 < patch-file-name-here
</nowiki></pre>
+
</nowiki></pre>
You should obtain a line saying "direct rendering: Yes"
+
* '''I installed a kernel update, now 3D does not work any more.'''
If it works, add the modules so that they are launched at start up
+
If you manually compiled and installed the VIA kernel module, you will have to recompile it with the new kernel headers, as described above.
 +
=== Disabling 3D ===
 +
* '''My system sometimes freezes with OpenGL applications, games, screensavers, or [[UbuntuHelp:Wine|Wine]]. How do I disable DRI?'''
 +
Edit <code><nowiki>/etc/X11/xorg.conf</nowiki></code> and disable DRI in the <code><nowiki>"Module"</nowiki></code> section.
 +
In Ubuntu 8.04 (Hardy) and newer, the X Server configures itself and 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 X Server's defaults.
 +
Add:
 
<pre><nowiki>
 
<pre><nowiki>
echo "drm" | sudo tee -a /etc/modules
+
Section "Module"
echo "via" | sudo tee -a /etc/modules
+
        Disable    "dri"
</nowiki></pre>
+
EndSection
That should be it. Reboot and see how it goes.
+
</nowiki></pre>
==== Deb packages repository ====
+
Without DRI, 3D effects will be software-rendered, which will be slow. This is a sensible solution for those that don't care about desktop effects or games.
SVN will have the lastest fixes on the openchrome, but if you prefer a .deb binary package you will find it at:
+
=== Ubuntu 8.10 ===
http://wiki.openchrome.org/tikiwiki/tiki-index.php?page=Collection+of+contributed+binary+packages
+
* '''My system sometimes freezes after loading the Gnome Desktop Manager.'''
so, download the .deb for your Ubuntu version an then
+
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>
 
<pre><nowiki>
      sudo  dpkg -i [package_name.deb]
+
Section "Device"
</nowiki></pre>
+
        Driver    "openchrome"
this will install the driver for you, after that edit your xorg configuration.
+
        Option    "XaaNoImageWriteRect"
(see  '''Change the Xorg driver to via''')
+
EndSection
==== Problems and solutions ====
+
</nowiki></pre>
* '''My system sometimes freezes'''<<BR>>
+
* '''My login prompt is not centered on the screen.'''
This is being caused by a bug in drm. To solve this, you have to uncomment
+
In the <code><nowiki>"Screen"</nowiki></code> section of <code><nowiki>/etc/X11/xorg.conf</nowiki></code>, try adding a <code><nowiki>"Display"</nowiki></code> subsection to include the <code><nowiki>Virtual</nowiki></code> resolution matching your screen size:
 
<pre><nowiki>
 
<pre><nowiki>
         Load    "dri"
+
Section "Screen"
</nowiki></pre>
+
         Identifier      "Default Screen"
in your xorg.conf. As a result, you won't have 3D acceleration anymore, but your system won't freeze.
+
        Monitor        "Configured Monitor"
* '''I do not have any picture when playing videos'''<<BR>>
+
        Device          "Configured Video Device"
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: [http://www.openchrome.org/trac/ticket/40]
+
        SubSection "Display"
'''This has been fixed in Trunk! Yay'''
+
                Virtual    1280    1024
* '''My mouse cursor sometimes disappears'''<<BR>>
+
        EndSubSection
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
+
EndSection
 +
</nowiki></pre>
 +
* '''My mouse cursor sometimes disappears or is invisible.'''
 +
This is known to happen on VIA's K8M800, VN800 and VM800 chipsets, e.g. Axioo Neon TVR 856C / TVR 016C laptops. As a solution, try using a software-rendered cursor. For this, add the <code><nowiki>"SWCursor"</nowiki></code> option to the <code><nowiki>"Device"</nowiki></code> section of <code><nowiki>/etc/X11/xorg.conf</nowiki></code>:
 
<pre><nowiki>
 
<pre><nowiki>
         Option         "SWCursor" "true"
+
Section "Device"
</nowiki></pre>
+
        Driver    "openchrome"
To the device section in your xorg.conf.
+
         Option   "SWCursor"   "true"
* '''I installed a kernel update. Now 3D does not work anymore'''<<BR>>
+
EndSection
You have to recompile the drm kernel module. The procedure is described above.
+
</nowiki></pre>
* '''When running autogen.sh for the openchrome 2D driver, I get errors like
+
* '''I have redrawing errors on the desktop and in various applications. Lines, icons, and sliders disappear.'''
 +
The redrawing issues can be worked around by trying <code><nowiki>"True"</nowiki></code> or <code><nowiki>"False"</nowiki></code> as values for the <code><nowiki>"EnableAGPDMA"</nowiki></code> option of the <code><nowiki>"Device"</nowiki></code> section of <code><nowiki>/etc/X11/xorg.conf</nowiki></code>:
 
<pre><nowiki>
 
<pre><nowiki>
   configure.ac: 30: required file `./[config.h].in' not found
+
Section "Device"
   unichrome/Makefile.am:33: via_drv_la_SOURCES defined both conditionally and unconditionally
+
        Driver   "openchrome"
</nowiki></pre>
+
        Option   "EnableAGPDMA"    "True"
This is due to having multiple versions of automake installed with the wrong version as the default. Run
+
EndSection
 +
</nowiki></pre>
 +
=== Ubuntu 10.04 ===
 +
* '''My Monitor does not display anything with the PM800 chip'''
 +
Revision 818 of openChrome introduced new mode switching code for the PM800 chip, which may cause problems on some setups. You can try to use the <code><nowiki>"legacy"</nowiki></code> mode-switching method in the <code><nowiki>"Device"</nowiki></code> section of <code><nowiki>/etc/xorg.conf</nowiki></code>:
 
<pre><nowiki>
 
<pre><nowiki>
   sudo update-alternatives --config automake
+
Section "Device"
</nowiki></pre>
+
        Driver   "openchrome"
and choose automake-1.9.
+
        Option    "ModeSwitchMethod" "legacy"
==== OpenChrome with Feisty (7.04) ====
+
EndSection
Use this script to build and install the openchrome driver to feisty.
+
</nowiki></pre>
<pre><nowiki>
+
#!/bin/bash
+
dget http://archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-openchrome/xserver-xorg-video-openchrome_0.2.6+svn357-0ubuntu1~feisty1.dsc
+
dpkg-source -x xserver-xorg-video-openchrome_0.2.6+svn357-0ubuntu1~feisty1.dsc
+
 
+
#build dependencies for Feisty 7.04 (part 1 base)
+
apt-get -y install cdbs fdupes intltool libdrm-dev libpixman1 libpixman1-dev x11proto-fonts-dev x11proto-gl-dev x11proto-xf86dri-dev xserver-xorg-dev
+
 
+
#build dependencies for Feisty 7.04 (part 2 base)
+
apt-get -y install libxvmc-dev libxrandr-dev libxrender-dev
+
 
+
#build dependencies for Feisty 7.04 (part 3 mesa bibs)
+
apt-get -y install libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
+
 
+
#now you can compile and build a deb package
+
 
+
cd xserver-xorg-video-openchrome-0.2.6+svn357
+
debian/rules binary
+
cd ..
+
 
+
# Install it with:
+
 
+
# If you are using unichrome remove it!
+
# apt-get -y remove xserver-xorg-video-unichrome
+
 
+
dpkg -i libviaxvmc1_0.2.6+svn357-0ubuntu1~feisty1_i386.deb
+
dpkg -i libviaxvmcpro1_0.2.6+svn357-0ubuntu1~feisty1_i386.deb
+
dpkg -i xserver-xorg-video-openchrome_0.2.6+svn357-0ubuntu1~feisty1_i386.deb
+
 
+
</nowiki></pre>
+
User comment: "Because compiling didn't work for me with this script I downloaded the packages at [http://www.gtlib.gatech.edu/pub/ubuntu/pool/main/x/xserver-xorg-video-openchrome/]. That worked!"
+
User comment: the openchrome driver was working fine in kubuntu 7.10 but now on 8.04 I have redraw-mistakes on the desktop and in various applications. Lines, icons , sliders disappear, sometimes reappear when I move the mouse over it or when move a window over it and back. what can I do ? my hardware:  [[UbuntuHelp:UniChrome|UniChrome]] Pro IGP (rev 01) 1106:3344
+
Is a bug in drm that has been fixed but obviously Ubuntu ships with an older drm. You'd report a bug. The redraw-issues can be worked around by using EnableAGPDMA True / False / On / Off in xorg.conf. Just experiment.
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:47的最新版本

Revised: 7 May 2010

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/CN896, VX800, VX855. For more information, please visit [1]

Ubuntu 8.04 , Debian 5.0 and newer releases

Since Ubuntu 8.04 (Hardy Heron) and Debian 5.0 the openchrome driver is installed by default, provided by the xserver-xorg-video-openchrome package. If this driver works correctly for your needs, there is no need to compile the driver yourself. The via driver and the xserver-xorg-video-via package are no longer available in Ubuntu 8.10 (Intrepid Ibex) and later releases. 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

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.

Manual Installation

These instructions will help you compile and install the openChrome driver in Ubuntu 6.06 (Dapper) and up. It should also work on Debian and other Debian-based distributions.

Before you start

openChrome 2D driver compilation

  1. Install needed dependencies
  • Get necessary tools to compile source code:
sudo apt-get install build-essential
sudo apt-get install subversion
sudo apt-get install 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 (Dapper), and older Debian-based distributions, run:

sudo apt-get build-dep xserver-xorg-driver-via
  
  1. Compile and install the 2D driver
  • Get the openChrome source code from the subversion repository:
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 installed to the correct directory. You may enable debug options to troubleshoot the driver in case it doesn't work:
./autogen.sh --prefix=/usr --enable-debug --enable-xv-debug
  
  • Compile openChrome:
make
  
  • Install openChrome:
sudo make install
  
  1. Edit the X server configuration file
  • Edit /etc/X11/xorg.conf and change the device driver to openchrome:
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 the terminal.

  • The "Device" section should include the "openchrome" driver:
Section "Device"
        Identifier      "Configured Video Device"
        Driver          "openchrome"
EndSection
  
  • Save the file.
  • In older Ubuntu releases, the driver could be chosen by running the following command, and picking "openchrome" when asked.:
sudo dpkg-reconfigure -phigh xserver-xorg
  

In newer Ubuntu releases, in which the X Server configures itself automatically, the previous command does not work, and xorg.conf needs to be edited manually.

  1. Test the driver

Restart your desktop manager by logging out and back in, or restarting your computer.

  1. If it doesn't work

If the X Server does not start any more, that is, you have a black screen, revert the changes made to the xorg.conf file and use the vesa generic driver in order to boot and find another solution for your problem. Log into a terminal (Ctrl+Alt+1), and use an editor like nano:

sudo nano /etc/X11/xorg.conf
 

Set the appropriate Driver to "vesa":

Section "Device"
        Identifier      "Configured Video Device"
        Driver          "vesa"
EndSection
 

You may also rewrite the file with the backup:

sudo mv /etc/X11/xorg.conf~ /etc/X11/xorg.conf
 

3D doesn't always work

The openchrome driver (and previously the via driver) only supports 2D acceleration, and most of the time it will always work. 3D acceleration (Direct Rendering Infrastructure or DRI) is provided by a companion driver by the Mesa project and it is normally already installed on your system. To avoid immediate crash of the X Server, from openChrome revision 749, DRI was disabled by default for Chrome9, thus making 3D applications run in Software Rasterizer mode. This solution helps prevent the system freezing, specially with OpenGL applications, games, screensavers, and Wine (see Launchpad bug #274340). With this solution you won't have 3D acceleration (3D applications will be slow), but your system won't freeze. Keep in mind that:

  • 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 to the lack of 3D features is to use another graphics card, either PCI, AGP, PCI-Express, etc. Laptop users may have to avoid 3D applications altogether.

VIA proprietary graphics driver for Chrome9

Note from the editor: Help clean up this section. It is not evident what exactly is being installed, or why the instructions ask to use some files for Ubuntu 8.10, and other files for Ubuntu 9.04. There is a VIA proprietary driver for Chrome9 chipsets that should support most of the features missing with the openChrome driver, like video decoding acceleration and 3D hardware acceleration. These installing instructions are for Ubuntu 9.04 and Chrome9 graphic series chipsets: CX700M/VX700/CN700/CN896/VN896/VX800/VX855. 1. Install some packages in order to be able to compile a kernel module

sudo apt-get install build-essential
sudo apt-get install subversion
sudo apt-get install autoconf automake1.9 libtool
sudo apt-get install linux-headers-generic xorg-dev

The driver can be found at the following website: http://linux.via.com.tw/support/downloadFiles.action Choose "OS: Ubuntu 8.10" and "Platform: VX800" and download the "Unified GFX driver Ver 85a-44597 for Ubuntu 8.10". Install the libGL.so.1.2.via_chrome9 library:

tar xzvf 5.74.33.85a-44597.tar.gz
cd 5.74.33.85a-44597
sudo ./vinstall

The previous step installs the libGL library for Ubuntu 8.10, and not Ubuntu 9.04; this seems to work to some extent. The other option would be to not install it, but then GL would not be available. Choose "OS: Ubuntu 9.04" and "Platform: VX800" and download the "Unified 2D/DRM driver source version 86a-50283". Install the via_chrome9 kernel module and the via xorg driver:

tar xjvf /root/via-xserver-86a-50283_src.tgz
cd via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28
make
sudo make install
sudo depmod -a
cd ../../XServer
chmod a+x autogen.sh
./autogen.sh
make
sudo make install
cd Misc
chmod a+x vinstall_ubuntu
sudo ./vinstall_ubuntu

At this point, edit /etc/X11/xorg.conf to include the "via" driver in the "Device" section:

Section "ServerLayout"
        Identifier     "X.org Configured"
        Option         "RandR"  "false"
EndSection

Section "Device"
        Identifier      "Configured Video Device"
        Driver          "via"
EndSection

Mixing the latest 2D VIA open source driver (v86a) with the previous GFX driver (v85a) will crash your system when starting an OpenGL program that uses textures. So refrain from doing so until VIA comes with an updated version of the GFX driver.

Problems and solutions

General

  • After compiling and upgrading to the latest openChrome revision, a bug appeared. What should I do?

First find in which revision the bug was introduced. You should get intermediate revisions of the openChrome driver between the last working revision, and the current one. Then, you should compile and install some revisions to determine in which revision the bug appeared. For example, to get revision 713, check out from the subversion tree:

svn checkout http://svn.openchrome.org/svn/trunk openchrome
 

Then, enter the created directory and type:

svn update -r713
 

Then, compile, install, and test this revision as described above. If you can confirm that a bug was introduced in this revision, submit a bug report at: http://www.openchrome.org/trac/newticket For the developers' convenience, attach the X Server log /var/log/Xorg.0.log, and the X Server configuration file /etc/X11/xorg.conf.

  • I found a bug in openChrome. How do I enable debug mode?

After obtaining the source code, run autogen.sh with debug options:

./autogen.sh --prefix=/usr  --enable-debug --enable-xv-debug
 

Then you may compile, install, and test the driver as was 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 the automake tool installed, with the wrong version as the default. Make sure you use automake-1.9:

sudo apt-get install automake1.9
 

If you have different versions installed, you can choose the default one with:

sudo update-alternatives --config automake
 
  • How do I apply a patch to the openChrome driver

Go into openChrome source code directory and type:

patch -p0 < patch-file-name-here
 
  • I installed a kernel update, now 3D does not work any more.

If you manually compiled and installed the VIA kernel module, you will have to recompile it with the new kernel headers, as described above.

Disabling 3D

  • My system sometimes freezes with OpenGL applications, games, screensavers, or Wine. How do I disable DRI?

Edit /etc/X11/xorg.conf and disable DRI in the "Module" section. In Ubuntu 8.04 (Hardy) and newer, the X Server configures itself and 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 X Server's defaults. Add:

Section "Module"
        Disable    "dri"
EndSection
 

Without DRI, 3D effects will be software-rendered, which will be slow. This is a sensible solution for those that don't care about desktop effects or games.

Ubuntu 8.10

  • My system sometimes freezes after loading the Gnome Desktop Manager.

Try adding the "XaaNoImageWriteRect" option to the "Device" section of /etc/X11/xorg.conf:

Section "Device"
        Driver    "openchrome"
        Option    "XaaNoImageWriteRect"
EndSection
 
  • My login prompt is not centered on the screen.

In the "Screen" section of /etc/X11/xorg.conf, try adding a "Display" subsection to include the Virtual resolution matching your screen size:

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        SubSection "Display"
                Virtual    1280    1024
        EndSubSection
EndSection
 
  • My mouse cursor sometimes disappears or is invisible.

This is known to happen on VIA's K8M800, VN800 and VM800 chipsets, e.g. Axioo Neon TVR 856C / TVR 016C laptops. As a solution, try using a software-rendered cursor. For this, add the "SWCursor" option to the "Device" section of /etc/X11/xorg.conf:

Section "Device"
        Driver    "openchrome"
        Option    "SWCursor"    "true"
EndSection
 
  • I have redrawing errors on the desktop and in various applications. Lines, icons, and sliders disappear.

The redrawing issues can be worked around by trying "True" or "False" as values for the "EnableAGPDMA" option of the "Device" section of /etc/X11/xorg.conf:

Section "Device"
        Driver    "openchrome"
        Option    "EnableAGPDMA"    "True"
EndSection
 

Ubuntu 10.04

  • My Monitor does not display anything with the PM800 chip

Revision 818 of openChrome introduced new mode switching code for the PM800 chip, which may cause problems on some setups. You can try to use the "legacy" mode-switching method in the "Device" section of /etc/xorg.conf:

Section "Device"
        Driver    "openchrome"
        Option    "ModeSwitchMethod" "legacy"
EndSection