|
用smplayer看电影时,打开,关闭、前进时,屏幕闪的厉害,还有就是在windows下屏幕移位,于是
决定装驱动。在网上搜了一下
首先glxinfo | grep render
如果显示
direct rendering: Yes
则表示驱动已安装
1 安装内核源代码
uname -r查看内核版本。
我的是 2.6.27.5-desktop-2mnb
输入urpmi kernel-source-2.6.27.5安装源码
ll /usr/src/linux 查看源码是否安装成功
2 下载nvidia驱动
最好将其改名为nvidia.run,放在你自己的主目录下
3 安装
CTRL+ALT+F1 进入字符界面
以root登录
然后执行 init 3
再 sh /home/yourusrname/nvidia.run
出现安装界面 一步一步选择
询问是否上网下载,选no
如果提示将要修改Xorg.conf,询问是否允许,选Yes;
其它的要么选ok 要么选accept
4 下面的实在网上抄的
vi /etc/X11/xorg.conf
找到
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7300 GT"
EndSection
看第3行 Driver "nvidia"
如果 Driver "nv"
将nv改为nvidia
找到
Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection
如果有
Load "dri"
Load "GLCore"
上面两行 则删除这两行
然后在命令行模式下输入:wq
vi /etc/modprobe.preload
在最下面加上 nvidia
按Esc进入命令行模式
输入:wq
退出
5最后 init 5 即可
附原文
Nvidia Install
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-<version-here>.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 |
|