如何安装nvidianvidia geforce显卡forlinux显卡驱程

用户名:ylw6006
文章数:232
评论数:749
访问量:1939944
注册日期:
阅读量:1297
阅读量:3317
阅读量:445550
阅读量:1131056
51CTO推荐博文
一:下载nvidia显卡驱动,从nvidia的官方网站根据显卡的型号下载相应的驱动文件
二:在字符界面下(运行级3)运行驱动安装程序,在RHEL6上因为Nouveau的关系会出现下面的错误,因此需要将该模块禁用掉
[root@rhel6 ~]# sh NVIDIA-Linux-x86_64-275.09.07.run
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 275.09.07....................................................................................................................
Please read the following LICENSE and then select either &Accept& to accept the license and continue with the installation, or select &Do Not Accept& to abort the installation.
&& Accept&&&&&&&&&&&&&&&&&&&& Do Not Accept&
ERROR: The Nouveau kernel driver is currently in use by your system.& This driver is incompatible with the NVIDIA driver, and must bedisabled before proceeding.& Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
[root@rhel6 ~]# lsmod& |grep nouveau
nouveau&&&&&&&&&&&&&&
ttm&&&&&&&&&&&&&&&&&&& 46942& 1 nouveau
drm_kms_helper&&&&&&&& 32113& 1 nouveau
drm&&&&&&&&&&&&&&&&&&
nouveau,ttm,drm_kms_helper
i2c_algo_bit&&&&&&&&&&& 5664& 1 nouveau
video&&&&&&&&&&&&&&&&& 20966& 1 nouveau
i2c_core&&&&&&&&&&&&&& 3c_nforce2,nouveau,drm_kms_helper,drm,i2c_algo_bit
将该模块加入黑名单:
[root@rhel6 ~]# tail -1 /etc/modprobe.d/blacklist.conf
blacklist nouveau
备份原先的初始化内存文件系统
[root@rhel6 ~]# mv /boot/initramfs-2.6.32-71.el6.x86_64.img& /boot/initramfs-2.6.32-71.el6.x86_64.img.orig
使用dracut命令重新生成initramfs文件,并重启
[root@rhel6 ~]# dracut -v /boot/initramfs-2.6.32-71.el6.x86_64.img& 2.6.32-71.el6.x86_64
[root@rhel6 ~]# reboot
重启后发现该模块依然被加载
[root@rhel6 ~]# lsmod |grep nouveau
nouveau&&&&&&&&&&&&&&
ttm&&&&&&&&&&&&&&&&&&& 46942& 1 nouveau
drm_kms_helper&&&&&&&& 32113& 1 nouveau
drm&&&&&&&&&&&&&&&&&&
nouveau,ttm,drm_kms_helper
i2c_algo_bit&&&&&&&&&&& 5664& 1 nouveau
video&&&&&&&&&&&&&&&&& 20966& 1 nouveau
powernow_k8&&&&&&&&&&& 16298& 0
freq_table&&&&&&&&&&&&& 4847& 2 cpufreq_ondemand,powernow_k8
i2c_core&&&&&&&&&&&&&& 31274& 5 nouveau,drm_kms_helper,drm,i2c_algo_bit,i2c_nforce2
在grub.conf文件中将改模块加入黑名单
[root@rhel6 ~]# grep -1 default& /etc/grub.conf
rdblacklist=nouveau
将nouveau.ko内核对象文件移除
[root@rhel6 ~]# mv /lib/modules/2.6.32-71.el6.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko& /tmp
重启后发现该模块以及没有被加载了
[root@rhel6 ~]# reboot
[root@rhel6 ~]# lsmod |grep no
powernow_k8&&&&&&&&&&& 16298& 0
freq_table&&&&&&&&&&&&& 4847& 2 cpufreq_ondemand,powernow_k8
接下来就可以在字符界面一路回车将显卡驱动装好了,但移除nouveau.ko文件后,RHEL6启动界面将会变成进度条形式,原来的光圈启动将会消失!
&本文出自 “” 博客,谢绝转载!
了这篇文章
类别:┆阅读(0)┆评论(0)
07:43:01 09:00:05 10:21:14 10:31:39 11:07:07 12:54:24 14:20:20 15:34:59 15:38:54 16:03:19 &&1&
&&页数 ( 1/2 ) &温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(7032)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_087066',
blogTitle:'\t\t在linux下安装NVIDIA驱动',
blogAbstract:'Nvidia最新的驱动已经支持8系列的显卡了,由于装系统时候还没有支持因此一直没有考虑装驱动的事情(呵呵,虽然没驱动也没啥问题),前一段下 了最新的驱动,但是由于本人是个菜鸟一直没学习怎么装,今天花了一个晚上把官方那个安装说明读了一遍,第一次安装遇到了一个问题,google一番之后终 于成功了。官方提供的安装流程大概说的如下:1. 当然是下载好驱动了,我用的是 NVIDIA-Linux-x86-100.14.11-pkg1.run2. 安装之前关闭 X server,3. 运行sh 进行安装4. 自动安装Kernel Interface (很多人这里出问题,我也是,稍后再说)5. 配置nvidia-config 文件并更新配置啥地............ 搞定通 常俺们这种菜鸟有几个问题搞不定,其一是安装之前要关闭X',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:9,
publishTime:4,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}Linux(Fedora25, 64bit)台式机配备了NVIDIA显卡GTX950,但是仅仅使用开源驱动nouveau,无法发挥NVIDIA显卡的性能,所以可以考虑使用官方提供的显卡驱动。
# 先安装显卡驱动所需的库
sudo yum/dnf groupinstall ”Development Tools”
sudo yum/dnf install kernel-devel kernel-headers dkms
# 从官网()下载适合硬件和系统的显卡驱动,可以用这个命令来检查自己机器的显卡型号
lspci -nn | grep VGA
# 禁用开源驱动nouveau
sudo vi /etc/modprobe.d/blacklist.conf
# 在文本中添加
blacklist nouveau
# 创建新的initramfs文件
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut -v /boot/initramfs-$(uname -r ).img $(uname -r)
# 重启电脑并进入命令行模式(ctrl alter F6),禁用x server
# 运行下载好的驱动安装文件
bash NVIDIA***.run
# 如出现“error with missing linux kernel-devel or kernel-header”,使用如下命令
sudo dnf/yum install ”kernel-devel-uname-r == $(uname -r)”
# 再按安装程序的提示操作即可完成驱动的安装
如果需要更新显卡驱动,需要先卸载NVIDIA显卡驱动,可以这样
nvidia-installer --uninstall
这个过程使用了NVIDIA显卡驱动自带的工具,基本上依照这个过程就可以完整地卸载了。
遇到错误:"unable to build NVIDIA kernel module..."
基本上是下载的驱动程序版本不太合适,可以通过更换安装程序的版本解决。
以我的机器为例:
Failed: NVIDIA-Linux-x86_64-358.16.run
Success: NVIDIA-Linux_x86_64-375.26.run
存在的一些问题:
安装官网显卡之后,显卡风扇噪音突然变得很大的问题始终得不到解决,在办公室几乎成了千夫所指的声音污染源,大家都调侃像进了机房一样吵,所以决定偷偷把这个驱动卸载掉,重新用回NOUVEAU开源驱动。
# uninstall NVIDIA驱动
nvidia-installer --uninstall
cd /etc/modprobe.d
sudo rm nvidia-installer-disable-nouveau.conf
sudo rm blacklist.conf
sudo reinstall xorg-x11*
经过这样的操作之后,问题并没有解决,进入的图形界面既没有NVIDIA显卡支持,也没有NOUVEAU显卡的支持。在网上查了很多资料也没有找到合适解决方案,还差点把机器弄崩溃。最终,答案还是来自内心,仔细想了一下NVIDIA显卡的安装过程,其中有一步操作:
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
这分明是用mv命令进行了备份操作,于是把目录切换到boot下查看了里面的文件:
# 里面有如下的三个文件引人注意
initramfs-0-rescue-b9b0de6e8bbf6.img
initramfs-4.8.6-300.fc25.x86_64.img
initramfs-4.8.6-300.fc25.x86_64.img.bak
# 其中的.bak文件应该就是上一步操作安装NIVIDIA驱动时备份的NOUVEAU驱动加载配置,如此便可以这样操作
mv initramfs-4.8.6-300.fc25.x86_64.img initramfs-4.8.6-300.fc25.x86_64.img.bak.NVIDIA
cp initramfs-4.8.6-300.fc25.x86_64.img.bak initramfs-4.8.6-300.fc25.x86_64.img
哈哈,重启之后果然回到了NOUVEAU驱动加载的Fedora桌面,整个世界也安静了下来。
I am so good!
进一步的优化,如果必须用NVIDIA驱动,可以参考这篇博文里的设置,修改/etc/X11/xorg.conf配置文件[1]。
Section "Device"
Identifier
"Device 0"
VendorName
"NVIDIA Corporation"
"GeForce GTX 470"
"Coolbits" "12"
"RegistryDwords" "PowerMizerEnable=0x1; PowerMizerDefaultAC=0x3;"
EndSection
应该可以降低NVIDIA驱动默认的风扇转速,从而降低噪音。
基本来源于Stackoverflow,linux社区和NVIDIA官网,参考比较杂乱,不及一一细述。
阅读(...) 评论()}

我要回帖

更多关于 linux nvidia显卡驱动 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信