个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
第5行: 第5行:
 
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>
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).  
+
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.
 
Read on if this doesn't work for you.
 
=== Manual Installation ===
 
=== Manual Installation ===
第14行: 第14行:
 
==== openChrome 2D driver compilation ====
 
==== openChrome 2D driver compilation ====
 
* '''Install needed packages'''
 
* '''Install needed packages'''
In Ubuntu 6.10 (Edgy) and 7.04 (Feisty), run:
+
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>
 
sudo apt-get build-dep xserver-xorg-video-via</nowiki></pre>
第25行: 第25行:
 
* '''Start the real fun'''
 
* '''Start the real fun'''
 
We will now compile the openChrome 2D driver
 
We will now compile the openChrome 2D driver
* For chipsets '''different''' from K8M890 get the openChrome sourcecode like this:
+
* Get the openChrome sourcecode like this: (experimental_branch is now obsolete, use trunk even for K8M890 chipset)
 
<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>
* For K8M890 chipset, alternatively run :
 
<pre><nowiki>
 
svn co http://svn.openchrome.org/svn/branches/experimental_branch openchrome-vt3336</nowiki></pre>
 
 
* Change into the newly created directory
 
* Change into the newly created directory
 
<pre><nowiki>
 
<pre><nowiki>
第43行: 第40行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo make install</nowiki></pre>
 
sudo make install</nowiki></pre>
*  
+
*
 
Now we have to edit /etc/X11/xorg.conf and change the Device Driver to via
 
Now we have to edit /etc/X11/xorg.conf and change the Device Driver to via
 
<pre><nowiki>
 
<pre><nowiki>
第50行: 第47行:
 
<pre><nowiki>
 
<pre><nowiki>
 
kdesu kate /etx/X11/xorg.conf</nowiki></pre>
 
kdesu kate /etx/X11/xorg.conf</nowiki></pre>
Go to  
+
Go to
 
<pre><nowiki>
 
<pre><nowiki>
 
Section "Device"</nowiki></pre>
 
Section "Device"</nowiki></pre>
 
and change
 
and change
<code><nowiki>Driver "vesa"</nowiki></code>
+
<pre><nowiki>
 +
Driver "vesa"</nowiki></pre>
 
to
 
to
<code><nowiki>Driver "via"</nowiki></code>
+
<pre><nowiki>
 +
Driver "openchrome"</nowiki></pre>
 
Save the file.
 
Save the file.
 +
Alternatively, you can also:
 +
<pre><nowiki>
 +
sudo dpkg-reconfigure -phigh xserver-xorg</nowiki></pre>
 +
And pick "openchrome" when asked.
 +
To test the new driver, go to a console (Ctrl+Alt+F1), login and start a new X screen:
 +
<pre><nowiki>
 +
X :1</nowiki></pre>
 +
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.
 
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.)
 
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.)
第121行: 第128行:
 
SVN will have the lastest fixes on the openchrome, but if you prefer a .deb binary package you will find it at:
 
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
 
http://wiki.openchrome.org/tikiwiki/tiki-index.php?page=Collection+of+contributed+binary+packages
so, download the .deb for your Ubuntu version an then  
+
so, download the .deb for your Ubuntu version an then
 
<pre><nowiki>
 
<pre><nowiki>
 
       sudo  dpkg -i [package_name.deb]
 
       sudo  dpkg -i [package_name.deb]
第136行: 第143行:
 
* '''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'''
 
* '''My mouse cursor sometimes disappears'''<br>
 
* '''My mouse cursor sometimes disappears'''<br>
This is known to happen on VN800 and VM800 chipsets. 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>
 
         Option          "SWCursor" "true"
 
         Option          "SWCursor" "true"
第144行: 第152行:
 
* '''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
 
<pre><nowiki>
 
<pre><nowiki>
 
   configure.ac: 30: required file `./[config.h].in' not found
 
   configure.ac: 30: required file `./[config.h].in' not found
第154行: 第162行:
 
</nowiki></pre>
 
</nowiki></pre>
 
and choose automake-1.9.
 
and choose automake-1.9.
 +
==== [[UbuntuHelp:OpenChrome|OpenChrome]] with Feisty (7.04) ====
 +
Use this script to build and install the openchrome driver to feisty.
 +
<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!"
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年4月23日 (三) 11:52的版本

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