免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1035 | 回复: 0
打印 上一主题 下一主题

Nvidia Install [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-24 09:47 |只看该作者 |倒序浏览

You've got that nice NVIDIA video card and want to use it's 3D functions in linux. This will explain how to do it on Mandriva Linux, other distro's may differ.
You may want to print this because most of the procedure requires you to be out of the X environment and working from the command line.
This how-to assumes you have online sources setup from
Urpmi-Addmedia
for Main, Main Updates, Contrib, Contrib Updates, PLF-Free and PLF-NonFree(You don't have to pay for PLF-NonFree). Visit the site mentioned above and follow the three very easy steps on the site to accomplish this. If you don't do this, then it's possible you can NOT get the matching kernel-source for your running kernel. There is also a how-to I've written about getting a matching kernel and kernel-source. It can be viewed here:
Kernel-Source How-To

The first thing you need to do is to install the kernel-source that matches the running kernel that you are using. You can find your version of your running kernel with:
uname -r
For purposes of this howto, I'll be talking about Mandriva 2007 versions. The running kernel is kernel-2.6.17.6mdv-1-1mdv2007.0 which means that I would need the kernel-source-2.6.17.6mdv-1-1mdv2007.0 package. To install that package:
urpmi kernel-source-2.6.17.6mdv-1-1mdv2007.0
The above command may say it's already installed if you had installed it previously. The key thing here is that the output of the following two commands show the EXACT same versions.
uname -r
ll /usr/src/linux
Now get the nvidia driver from nvidia.com
Nvidia Site

In most cases it's the driver for the IA32 architecture...if your machines architecture was different then that, you'd know it. :)
The actual installation of the NVIDIA drivers must be done while you are out of the X environment, so log out of your window manager. We need to get to the command line, so if you are now sitting at the graphical login screen, hit the CTRL+ALT+F1 keys combination to get there and login as root.
Once you are at the command line you shut down the X environment with one of the following:
telinit 3
or
service dm stop
or
init 3
Now change directories to wherever you had downloaded the NVIDIA driver to and run the following command:
sh NVIDIA-Linux-.run
The installation begins after issueing the above command. Accept the license agreement, and answer YES to the questions it asks. The drivers will install and tell you at the end that it was successful.
Now you need to edit the xorg.conf file, as root user, to use the nvidia driver. You can use any command line editor you want, I'll be using the vi editor:
vi /etc/X11/xorg.conf
Hit the i or insert key to get into edit mode. Find the Section Device section in the config and change Driver "nv" to Driver "nvidia" as shown here:

Now go up in the file and find the Section Module section and add the line Load glx if it isn't there. If it is there, be sure it is not commented out.

If you have either of these two lines then remove them:
Load "dri"
Load "GLCore"
Save and exit the file by hitting the Esc key to get to vi's command mode and enter the following command:
:wq
Now we'll edit one more file to tell the system to load the nvidia module when the machine boots:
vi /etc/modprobe.preload
Again, hit the i key to get into insert mode and add the word nvidia to the bottom of the file:

Save and exit the file by hitting the Esc key to get to vi's command mode and enter the following command:
:wq
The configuration is done and now all you need to do is restart the X environment and login to your window manager:
telinit 5
or
service dm start
or
init 5
Once back in your window manager, you can verify the installation by running the following command and looking for direct rendering: Yes
glxinfo | grep render



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7893/showart_308367.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP