个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:OpenChrome”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:OpenChrome”的源代码
来自Ubuntu中文
←
UbuntuHelp:OpenChrome
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/OpenChrome}} {{Languages|UbuntuHelp:OpenChrome}} '''openChrome'''' is a free and open source video driver for the ASROCK/VIA/S3G UniChrome and UniChrome Pro graphics chipsets. (CLE266, KN400, KM400, K8M800, PM800, CN400, CN700, VN800, K8M890, P4VM800) For more information, please visit [http://www.openchrome.org/]. The openchrome driver can be installed by the command <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). 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 ==== * 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) and 7.04 (Feisty), run: <pre><nowiki> sudo apt-get build-dep xserver-xorg-video-via</nowiki></pre> In Ubuntu 6.06.1 (Dapper), Debian and other Debian based distributions, run: <pre><nowiki> sudo apt-get build-dep xserver-xorg-driver-via</nowiki></pre> In both versions you should also run: <pre><nowiki> sudo apt-get install subversion autoconf automake1.9 libtool</nowiki></pre> * '''Start the real fun''' We will now compile the openChrome 2D driver * For chipsets '''different''' from K8M890 get the openChrome sourcecode like this: <pre><nowiki> 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 <pre><nowiki> cd openchrome*</nowiki></pre> * Run autogen.sh with the prefix option so that the driver is being installed in the correct directory <pre><nowiki> ./autogen.sh --prefix=/usr</nowiki></pre> * Compile openChrome <pre><nowiki> make</nowiki></pre> * Install openChrome <pre><nowiki> sudo make install</nowiki></pre> * Now we have to edit /etc/X11/xorg.conf and change the Device Driver to via <pre><nowiki> gksudo gedit /etc/X11/xorg.conf</nowiki></pre> Or in Kubuntu <pre><nowiki> kdesu kate /etx/X11/xorg.conf</nowiki></pre> Go to <pre><nowiki> Section "Device"</nowiki></pre> and change <code><nowiki>Driver "vesa"</nowiki></code> to <code><nowiki>Driver "via"</nowiki></code> Save the file. Finally, we have to restart our X server. You can do this by logging out and pressing ''Ctrl-Alt-Backspace'' from the login screen. If Xorg does not start anymore, log in in a console and change the Driver in the Device section back with an editor like nano. (Write the following on a piece of paper.) <pre><nowiki> sudo nano /etc/X11/xorg.conf</nowiki></pre> ==== openChrome and 3D ==== 3D should work out of the box in Edgy. If it does not do the following: * '''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> sudo apt-get install git-core linux-headers-generic</nowiki></pre> * '''Obtain the sourcecode''' <pre><nowiki> git clone git://anongit.freedesktop.org/git/mesa/drm</nowiki></pre> * '''Compile libdrm and drm kernel modules''' * '''libdrm'''<br> Change to the directory where the drm sourcecode is stored <pre><nowiki> cd drm</nowiki></pre> Run the autogen script <pre><nowiki> ./autogen.sh --prefix=/usr</nowiki></pre> Compile the source code <pre><nowiki> make</nowiki></pre> Install the compiled source code <pre><nowiki> sudo make install</nowiki></pre> * '''drm kernel modules'''<br> Change to the correct directory (you have to already be in the directory drm) <pre><nowiki> cd linux-core</nowiki></pre> Compile the kernel modules <pre><nowiki> make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via</nowiki></pre> 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 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</nowiki></pre> ...this topic: http://ubuntuforums.org/showthread.php?t=419094 could be helpful. Copy the kernel modules to the correct location <pre><nowiki> sudo cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/</nowiki></pre> Run depmod <pre><nowiki>sudo depmod -ae </nowiki></pre> Launch the modules <pre><nowiki>sudo modprobe drm sudo modprobe via</nowiki></pre> Test with the following command <pre><nowiki>glxinfo | grep render </nowiki></pre> You should obtain a line saying "direct rendering: Yes" If it works, add the modules so that they are launched at start up <pre><nowiki>echo "drm" | sudo tee -a /etc/modules echo "via" | sudo tee -a /etc/modules </nowiki></pre> 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 <pre><nowiki> sudo dpkg -i [package_name.deb] </nowiki></pre> 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'''<br> This is being caused by a bug in drm. To solve this, you have to uncomment <pre><nowiki> Load "dri" </nowiki></pre> 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> 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] * '''My mouse cursor sometimes disappears'''<br> This is known to happen on VN800 and VM800 chipsets. As a solution, you can try to add <pre><nowiki> Option "SWCursor" "true" </nowiki></pre> To the device section in your xorg.conf. * '''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. * '''When running autogen.sh 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 <pre><nowiki> sudo update-alternatives --config automake </nowiki></pre> and choose automake-1.9. [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:OpenChrome
。