Centos7 安装独立显卡驱动

参考:

https://blog.csdn.net/u013378306/article/details/69229919

安装基础依赖环境

Yum install gcc kernel-delve -y

注意事项,保证内核版本和源码版本一样,否则,安装报错误6:

  • 查看内核版本:

    ls /boot | grep vmlinu

  • 查看源码包版本

    rpm -aq | grep kernel-devel

从上面的输出中可以看出内核版本号和内核源码版本。为了解决这个错误,需要从FC官方网站上下载与内核版本对应的源码包进行安装。
可以在以下网站下载并安装:
http://rpmfind.net/linux/rpm2html/search.php?query=kernel-devel

源码安装

1 在英伟达官网下载相应驱动

搜索出相应的驱动后,不要直接点,而是右健,Save Link as...

否则,会出现下载半天没动静的情况。

存放的路径上最好不要有中文。

我存放的路径是 ~/Downloads/NVIDIA-Linux-x86_64-346.47.run

2 屏蔽默认带有的nouveau

使用su命令切换到root用户下: su root

打开/lib/modprobe.d/dist-blacklist.conf

将nvidiafb注释掉。

#blacklist nvidiafb 

然后添加以下语句:

blacklist nouveauoptions nouveau modeset=0

3 重建initramfs image步骤

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bakdracut /boot/initramfs-$(uname -r).img $(uname -r) 

4 修改运行级别为文本模式

systemctl set-default multi-user.target 

5 重新启动, 使用root用户登陆

reboot

6 查看nouveau是否已经禁用

ls mod | grep nouveau

如果没有显示相关的内容,说明已禁用。

7 进入下载的驱动所在目录

chmod +x NVIDIA-Linux-x86_64-346.47.run./NVIDIA-Linux-x86_64-346.47.run

安装过程中,选择accept

如果提示要修改xorg.conf,选择yes

8 修改运行级别回图形模式

systemctl set-default graphical.target 

9 重新启动,OK

在Applications--Other可以看见NVIDIA X Server Settings菜单。

问题:

错误1:

ERROR: The Nouveau kernel driver is currently in use by your system.  This driver is incompatible with the NVIDIA driver, and must be disabled 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.

解释:如果没有执行屏蔽nouveau操作,报以上错误。

错误2:

unable to find the development too 'cc' in you path; please make sure that you have the package 'gcc

解决办法:

yum install gcc

错误3:

错误4:

 ERROR: Unable to find the kernel source tree for the currently running kernel.  Please make sure you have installed the kernel source files for yourkernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the  'kernel-source' or 'kernel-devel' RPM installed.  If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.

解决办法:

yum install kernel-delve

错误5:

 ERROR: Unable to find the kernel source tree for the currently running kernel.  Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the         'kernel-source' or 'kernel-devel' RPM installed.  If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.

解决方法:

./NVIDIA-Linux-x86_64-390.67.run --kernel-source-path=/usr/src/kernels/3.10.0-862.3.2.el7.x86_64/ 

错误6:

ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if another driver, such as nouveau, is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA GPU(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file '/var/log/nvidia-installer.log' for more information.

解决办法:

  • 可以通过以下方式查看内核版本和源码包版本:

    ls /boot | grep vmlinuz

  • 如果上面的命令输出中有多个内核,则按grub.conf中指定的文件为准。

    rpm -aq | grep kernel-devel
    kernel-devel-2.6.35.13-92.fc14.i686

  • 从上面的输出中可以看出内核版本号和内核源码版本。为了解决这个错误,需要从FC官方网站上下载与内核版本对应的源码包进行安装。

         可以在以下网站下载并安装:
        http://rpmfind.net/linux/rpm2html/search.php?query=kernel-devel

备注:执行更新内核操作好需要重新执行屏蔽nouveau,及重建initramfs image步骤。

警告:

WARNING: nvidia-installer was forced to guess the X library path '/usr/lib64' and X module path '/usr/lib64/xorg/modules'; these paths were not queryable from the system.  If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and theX.Org SDK/development package for your distribution and reinstall the driver.

字符模式安装警告信息,可忽略。

安装cuda

参考:https://blog.csdn.net/claroja/article/details/81034147

  1. 错误:

    Installing the CUDA Toolkit in /usr/local/cuda-6.5 ...
    Missing recommended library: libGLU.so
    Missing recommended library: libXmu.so

    解决:安装第三方软件

    yum install freeglut-devel libX11-devel libXi-devel libXmu-devel  \make mesa-libGLU-devel

  2. 测试CUDA

    [root@fengyun6 ~]# find / -name deviceQuery/root/NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery/usr/local/cuda-9.0/extras/demo_suite/deviceQuery/usr/local/cuda-9.0/samples/1_Utilities/deviceQuery

    若出现以下信息,则表示安装成功

    [root@fengyun6 ~]# /usr/local/cuda-9.0/extras/demo_suite/deviceQuery/usr/local/cuda-9.0/extras/demo_suite/deviceQuery Starting...CUDA Device Query (Runtime API) version (CUDART static linking)Detected 1 CUDA Capable device(s)Device 0: "GeForce GTX 1080 Ti"CUDA Driver Version / Runtime Version          9.1 / 9.0CUDA Capability Major/Minor version number:    6.1Total amount of global memory:                 11178 MBytes (11721113600 bytes)(28) Multiprocessors, (128) CUDA Cores/MP:     3584 CUDA CoresGPU Max Clock rate:                            1645 MHz (1.64 GHz)Memory Clock rate:                             5505 MhzMemory Bus Width:                              352-bitL2 Cache Size:                                 2883584 bytesMaximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layersMaximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layersTotal amount of constant memory:               65536 bytesTotal amount of shared memory per block:       49152 bytesTotal number of registers available per block: 65536Warp size:                                     32Maximum number of threads per multiprocessor:  2048Maximum number of threads per block:           1024Max dimension size of a thread block (x,y,z): (1024, 1024, 64)Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)Maximum memory pitch:                          2147483647 bytesTexture alignment:                             512 bytesConcurrent copy and kernel execution:          Yes with 2 copy engine(s)Run time limit on kernels:                     NoIntegrated GPU sharing Host Memory:            NoSupport host page-locked memory mapping:       YesAlignment requirement for Surfaces:            YesDevice has ECC support:                        DisabledDevice supports Unified Addressing (UVA):      YesDevice PCI Domain ID / Bus ID / location ID:   0 / 1 / 0Compute Mode:< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 9.0, NumDevs = 1, Device0 = GeForce GTX 1080 TiResult = PASS

安装cudnn

参考:https://www.cnblogs.com/mar-q/p/7482720.html

下载:https://developer.nvidia.com/rdp/cudnn-archive

安装cudnn

tar -xvf cudnn-8.0-linux-x64-v6.0.tgz -C /usr/local/

Centos7 安装独立显卡驱动相关推荐

  1. centos7安装1080显卡驱动常见问题解决方法

    centos7安装1080显卡驱动常见问题解决方法 1.安装显卡时,出现以下错误 ERROR: The Nouveau kernel driver is currently in use by you ...

  2. nvidia显卡linux 7.2,Centos7 安装 Nvidia 显卡驱动

    系统环境1 2CentOS Linux release 7.6.1810 (Core) Linux centos7.6 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb ...

  3. 解决双显卡笔记本安装XP系统后独立显卡无法驱动的问题!Win7双显卡笔记本换XP系统如何安装独立显卡驱动!

     今天帮朋友在批发商那里拿了台电脑,自带的系统是linux的,所以我就自己帮忙做第一个系统,但是解压的时候总是蓝屏,所以我以为是机子有问题,拿去换工作人员说限制了这个功能,只能装win 7,且只有用w ...

  4. CentOS7安装Nvidia显卡驱动后桌面起不来

    环境:CentOS7.5  1080Ti 驱动:390.67 官网下载 原尝试: 系统更新->头文件升级->禁用拉黑nouveau->备份->安装驱动->崩盘 崩盘后: ...

  5. centos7安装nvida显卡驱动

    1.获取驱动文件 从英伟达官网下载对应显卡的驱动文件 http://www.nvidia.com 2.编辑Grub2将nouveau列入黑名单 编辑/etc/default/grub并将以下内容添加到 ...

  6. centos7安装AMD显卡驱动和AMD opencl SDK的过程

    第一次写博客,不太会使用MarkDown编辑器,写这篇文章主要是给自己以后提个醒,不至于忘了没有地方找.是要测试Intel的显卡的性能但找的程序是只可以在Linux上运行的,这个程序只有opencl环 ...

  7. 如何在Linux系统下安装英特尔® Arc™系列独立显卡驱动以及进行AI推理性能测试...

    点击蓝字 关注我们,让开发变得更有趣 作者 | 周兆靖 排版 | 李擎 如何在Linux系统下安装英特尔® Arc™系列 独立显卡驱动以及进行AI推理性能测试 目录 1.本文目的 2.Linux 系统 ...

  8. 机械革命重装Win10系统后独立显卡驱动故障问题解决

    2019独角兽企业重金招聘Python工程师标准>>> 问题 机械革命X1,重装win10系统后,NVIDIA独立显卡驱动不能正常安装,如下: 原因和解决方式 这是Win10兼容性问 ...

  9. ubuntu14.4安装gtx970显卡驱动的艰辛历程

    1 说明: 本人机器说明,显卡gtx970,内存4G,原来系统是win7 64的.最近要学习机器学习的一些算法,需要安装ubuntu.不过安装环境这一条道路真的很曲折,来来回回弄了好久.以下说一下配置 ...

  10. CentOS7(64位)安装NVIDIA显卡驱动和CUDA8.0

    硬件环境: 显卡驱动下载:http://www.geforce.cn/drivers点击打开链接 CUDA下载:https://developer.nvidia.com/cuda-downloads点 ...

最新文章

  1. Android 4.0的图形硬件加速及绘制技巧
  2. 斜杠的意思是或还是和_开启你的斜杠人生
  3. macosx jdk_MacOSX环境上的多个Java JDK
  4. php asp写法,asp/php常用的库连接文件代码写法大全
  5. CentOS7下搭建yum仓库
  6. MySQL笔记(八)存储过程procedure
  7. mysql 开源订阅模式_Canal(增量数据订阅与消费 )快速配置
  8. 【Tool】 深度学习常用工具
  9. 【概念的辨异】—— ISO C 与 POSIX C(C standard library 与 C POSIX library)
  10. hadoop安装(超详细)
  11. 十大编程语言的优劣对比简述
  12. pycharm文件名颜色含义
  13. 日紫白飞星算法_年月日时紫白飞星法——紫白(入中)计算办法
  14. HTML标签、认识浏览器
  15. 电脑睡眠后启动 耳机没有声音 手动启动 -已解决
  16. 什么是sku转载网上,备忘一个业务知识
  17. 「带队伍」的关键是什么?
  18. 【Python】Python中pip命令的使用(超级详细,命令大全)
  19. 折腾BIOS(三),刷NVMe失败
  20. matlab 图形绘制,MatLab图形绘制功能

热门文章

  1. Python爬虫之小说信息爬取与数据可视化分析
  2. 使用css、jquery实现一个云音乐播放器
  3. IOS 中json解析异常Domain=NSCocoaErrorDomain Code=3840之诡异事件
  4. Photoshop CS6 32位64位破解补丁
  5. python cad按范围裁剪
  6. php写出个人所得税,PHP如何计算个人所得税
  7. Java个人所得税计算
  8. 【热门主题】蓝色妖姬电脑桌面主题
  9. 如何恢复按下Shift + DELETE键永久删除的文件和资料夹?
  10. Ribbon的基本应用