ubuntu安装后显卡驱动等的安装

1. 更新Ubuntu库中的软件包

sudo apt-get update

2. 同步系统时间

sudo apt install ntpdate
sudo ntpdate time .windows.com
sudo hwclock --localtime --systohc

3. 安装NVIDIA驱动

3.1 安装前

  • 安装依赖
sudo apt-get update #更新软件列表
#安装编译依赖
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make
  • 查看显卡型号
lspci | grep -i vga

或者

lspci | grep -Ei '(vga|display)'

或者

lspci | grep -i nvidia

得到序列号xxxx,打开网站查询下载对应驱动
< 驱动选择生产力分支 >

  • 查看NVIDIA显卡驱动安装状态
nvidia-smi

禁用系统显卡驱动

    1. 打开blacklist.conf
sudo gedit /etc/modprobe.d/blacklist.conf
    1. 在blacklist.conf文件最后部分插入以下两行内容
blacklist nouveau
options nouveau modeset=0
    1. 更新系统
sudo update-initramfs -u
    1. 重启
reboot
    1. 验证nouveau是否已禁用
lsmod | grep nouveau

没有显示则说明禁用成功

3.2 安装

手动下载驱动安装

删除以前驱动

sudo apt-get remove --purge nvidia*

驱动下载网站
更改文件权限

sudo chmod a+x NVIDIA-xxx.run
sudo chmod 777 NVIDIA-xxx.run 

安装lightdm,用于关闭图形界面安装驱动

sudo apt install lightdm

然后

sudo update-initramfs -u

关掉BIOS安全启动,进入Ubuntu

Ctrl + Alt + F1

sudo service lightdm stop
sudo ./Nvidia-xxx.run --no-opengl-files --no-x-check --no-nouveau-check
1.The distribution-provided pre-install script failed! Are you sure you want to continue? 

“Yes”
2.Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later?

“No”
3.Nvidia’s 32-bit compatibility libraries?

“No”
4.Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 

“Yes”

挂载NVIDIA显卡驱动

modprobe nvidia

最后

sudo service lightdm start   
reboot                       
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值