Ubuntu Invida显卡驱动安装

作者: dopami | 来源:发表于2018-03-23 12:01 被阅读38次

    说明:

    机器说明,显卡P5000,内存16G,

    1)在登录页面按Ctrl+Alt+F1进入tty, 关闭lightdm。

    sudo service lightdm stop

    2)添加驱动源

    sudo add-apt-repository ppa:xorg-edgers/ppa

    sudo apt-getupdate

    3)安装驱动

    去http://www.nvidia.com/download/根据显卡型号下载驱动

    离线版:sudo sh NVIDIA*.run --no-opengl-files

             --no-opengl-files很重要,不然会导致安装完成后进不去图形界面

      安装过程中按提示操作就可以了,一般选择yes或ok就好。

    sudo service lightdm start

    sudo apt install nvidia-prime

    sudo prime-select query  #这里应该是显示Nvidia才对

    nvidia-smi    #出现下图界面,证明安装成功

    4)这时进入系统后,可能分辨率不对,执行下列命令查看现在采用的驱动

    prime-select query

    如果显示采用的是Nvidia,则进行下一步;否则执行以下命令来配置驱动:

    sudo update-alternatives --config i386-linux-gnu_gl_conf

    在显示的显卡列表中选择安装的Nvidia:

    sudo prime-select nvidia

    使用以下命令更新系统驱动

    sudo ldconfig -n

    sudo update-initramfs -u

    重新启动电脑,桌面显示正常了,可以通过prime-select query来查看当前使用的显卡是否是Nvidia。

    5) 安装过程中出现了error

    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

          fromthe one used to build the target kernel, orifa driver suchas      rivafb/nvidiafbispresent and prevents the NVIDIA kernel modulefrom      obtaining ownership of the NVIDIA graphics device(s), or NVIDIA GPU

          installed inthissystemisnot supported bythis NVIDIA Linux graphics

          driver release.

    找到老外的解决办法

    1) Download Newest Nvidia drivers from their website

    2) Open module blacklist as admin: (i use gedit for text file editing)

    Code:

    sudo gedit /etc/modprobe.d/blacklist.conf

    3) Add these lines and save: 

    Code:

    blacklist vga16fb

    blacklist nouveau

    blacklist rivafb

    blacklist nvidiafb

    blacklist rivatv

    4) Uninstall any previously installed Nvidia drivers: 

    Code:

    sudo apt-get --purge remove nvidia-*

    5) Reboot your computer

    6) When an error message pops up saying that Ubuntu cannot load Nvidia drivers, choose Exit to terminal (Exit to console)

    7) Login and cd to the directory where you saved your file

    8) Install drivers

    Code:

    sudo service lightdm stop

    sudo sh NVIDIA*.run --no-opengl-files

    9) Start GDM

    Code:

    sudo service lightdm start

    相关文章

      网友评论

        本文标题:Ubuntu Invida显卡驱动安装

        本文链接:https://www.haomeiwen.com/subject/ryotcftx.html