个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{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)
 
'''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)
For more information, please visit [http://www.openchrome.org/].
+
For more information, please visit [[http://www.openchrome.org/]].
 
The openchrome driver can be installed by the command
 
The openchrome driver can be installed by the command
 
<code><nowiki> sudo apt-get install xserver-xorg-video-openchrome </nowiki></code>
 
<code><nowiki> sudo apt-get install xserver-xorg-video-openchrome </nowiki></code>
第11行: 第11行:
 
==== Before You Start  ====
 
==== 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 ====
 
==== openChrome 2D driver compilation ====
 
* '''Install needed packages'''
 
* '''Install needed packages'''
第71行: 第71行:
 
==== openChrome and 3D ====
 
==== openChrome and 3D ====
 
3D should work out of the box in Edgy. If it does not do the following:
 
3D should work out of the box in Edgy. If it does not do the following:
* '''Install required packages'''<br>
+
* '''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:
 
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>
第79行: 第79行:
 
git clone git://anongit.freedesktop.org/git/mesa/drm</nowiki></pre>
 
git clone git://anongit.freedesktop.org/git/mesa/drm</nowiki></pre>
 
* '''Compile libdrm and drm kernel modules'''
 
* '''Compile libdrm and drm kernel modules'''
* '''libdrm'''<br>
+
* '''libdrm'''<<BR>>
 
Change to the directory where the drm sourcecode is stored
 
Change to the directory where the drm sourcecode is stored
 
<pre><nowiki>
 
<pre><nowiki>
第92行: 第92行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo make install</nowiki></pre>
 
sudo make install</nowiki></pre>
* '''drm kernel modules'''<br>
+
* '''drm kernel modules'''<<BR>>
 
Change to the correct directory (you have to already be in the directory drm)
 
Change to the correct directory (you have to already be in the directory drm)
 
<pre><nowiki>
 
<pre><nowiki>
第100行: 第100行:
 
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via</nowiki></pre>
 
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via</nowiki></pre>
 
If you get errors like that in Ubuntu 7.04 (Feisty)...
 
If you get errors like that in Ubuntu 7.04 (Feisty)...
<pre><nowiki>/home/shad/stuff/drm/linux-core/drm_compat.c:190: error: static declaration of ‘vm_insert_pfn’ follows non-static declaration
+
<pre><nowiki>
 +
/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
 
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[2]: *** [/home/shad/stuff/drm/linux-core/drm_compat.o] Error 1
第111行: 第112行:
 
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>
 
Run depmod
 
Run depmod
<pre><nowiki>sudo depmod -ae
+
<pre><nowiki>
 +
sudo depmod -ae
 
</nowiki></pre>
 
</nowiki></pre>
 
Launch the modules
 
Launch the modules
<pre><nowiki>sudo modprobe drm
+
<pre><nowiki>
 +
sudo modprobe drm
 
sudo modprobe via</nowiki></pre>
 
sudo modprobe via</nowiki></pre>
 
Test with the following command
 
Test with the following command
<pre><nowiki>glxinfo | grep render
+
<pre><nowiki>
 +
glxinfo | grep render
 
</nowiki></pre>
 
</nowiki></pre>
 
You should obtain a line saying "direct rendering: Yes"
 
You should obtain a line saying "direct rendering: Yes"
 
If it works, add the modules so that they are launched at start up
 
If it works, add the modules so that they are launched at start up
<pre><nowiki>echo "drm" | sudo tee -a /etc/modules
+
<pre><nowiki>
 +
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>
第135行: 第140行:
 
(see  '''Change the Xorg driver to via''')
 
(see  '''Change the Xorg driver to via''')
 
==== Problems and solutions ====
 
==== Problems and solutions ====
* '''My system sometimes freezes'''<br>
+
* '''My system sometimes freezes'''<<BR>>
 
This is being caused by a bug in drm. To solve this, you have to uncomment
 
This is being caused by a bug in drm. To solve this, you have to uncomment
 
<pre><nowiki>
 
<pre><nowiki>
第141行: 第146行:
 
</nowiki></pre>
 
</nowiki></pre>
 
in your xorg.conf. As a result, you won't have 3D acceleration anymore, but your system won't freeze.
 
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'''<br>
+
* '''I do not have any picture when playing videos'''<<BR>>
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 [[UbuntuHelp:OpenChrome|OpenChrome]] ticket for that is located here: [http://www.openchrome.org/trac/ticket/40]
+
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 [[UbuntuHelp:OpenChrome|OpenChrome]] ticket for that is located here: [[http://www.openchrome.org/trac/ticket/40]]
 
'''This has been fixed in Trunk! Yay'''
 
'''This has been fixed in Trunk! Yay'''
* '''My mouse cursor sometimes disappears'''<br>
+
* '''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
 
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
 
<pre><nowiki>
 
<pre><nowiki>
第150行: 第155行:
 
</nowiki></pre>
 
</nowiki></pre>
 
To the device section in your xorg.conf.
 
To the device section in your xorg.conf.
* '''I installed a kernel update. Now 3D does not work anymore'''<br>
+
* '''I installed a kernel update. Now 3D does not work anymore'''<<BR>>
 
You have to recompile the drm kernel module. The procedure is described above.
 
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
 
* '''When running autogen.sh for the openchrome 2D driver, I get errors like
第194行: 第199行:
  
 
</nowiki></pre>
 
</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: "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]]

2008年10月19日 (日) 16:41的版本

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]]. The openchrome driver can be installed by the command sudo apt-get install xserver-xorg-video-openchrome 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). Read on if this doesn't work for you.

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

openChrome 2D driver compilation

  • Install needed packages

In Ubuntu 6.10 (Edgy),7.04 (Feisty) & 7.10(Gutsy) 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

  • Get the openChrome sourcecode like this: (experimental_branch is now obsolete, use trunk even for K8M890 chipset)
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

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		"openchrome"

Save the file. Alternatively, you can also:

sudo dpkg-reconfigure -phigh xserver-xorg

And pick "openchrome" when asked. To test the new driver, go to a console (Ctrl+Alt+F1), login and start a new X screen:

X :1

If it works, then you can continue restarting your GDM/GNOME. If not, you probably need to fix this first. 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]] This has been fixed in Trunk! Yay

  • 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

        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.

OpenChrome with Feisty (7.04)

Use this script to build and install the openchrome driver to feisty.

#!/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

User comment: "Because compiling didn't work for me with this script I downloaded the packages at [[3]]. 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: 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.