到底怎样才能装上NVIDIA专有驱动
Tofloor
poster avatar
heisen
deepin
2020-03-22 06:19
Author
小米笔记本air 13.3
试过好多办法了,都无法安装nvidia专有驱动(闭原)

显卡管理器中只有开源和大黄蜂方案

没有prime方案啊
为什么  

命令也装不上,官方bin也不行,我快疯了。
希望得到大神的指点,感激涕零

如果有时间请两位元老帮忙指点一哈!! 拜谢
手动 https://bbs.deepin.org/user/101846    @jingle
Reply Favorite View the author
All Replies
avatar
deepinuser17
deepin
2020-03-22 07:26
#1
Reply View the author
avatar
heisen
deepin
2020-03-22 15:36
#2
https://bbs.deepin.org/post/189901
见这个链接https://bbs.deepin.org/post/185547#

试过这个方法了,还是不行啊,非常感谢你在百忙中抽空回复,谢谢
Reply View the author
avatar
aloginka
deepin
2020-03-22 18:54
#3
我的查看是装好了驱动,就是分辨率不对,看着实在难受
Reply View the author
avatar
ancing
deepin
2020-03-22 20:01
#4
本帖最后由 anxing 于 2020-3-22 12:08 编辑

1.从www.nvidia.com下载你的显卡对应的驱动

下载下来的文件应该是
  1. sudo chmod a+x NVIDIA-Linux-*.run
Copy the Code

的样子
2.禁用开源驱动
.创建文件 /etc/modprobe.d/blacklist.conf
  1. sudo dedit /etc/modprobe.d/blacklist.conf
Copy the Code
文件内容为:
  1. blacklist nouveau
  2. options nouveau modeset=0
Copy the Code
.更新配置
  1. sudo update-initramfs -u
Copy the Code
3.安装驱动
.同时按下 cttl+alt+f2 进入tty2,输入用户名 和 密码登陆
.关闭桌面环境
  1. sudo systemctl stop lightdm.service
Copy the Code
.切换到你下载的驱动所在的目录
  1. cd 你下载的驱动所在的目录
Copy the Code
.给安装文件添加可执行权限
  1. sudo chmod a+x NVIDIA-Linux-*.run
Copy the Code
.运行安装文件
  1. sudo ./NVIDIA-Linux-*.run
Copy the Code
注意安装的时候提示是否需要安装lib库记得选是,然后选择安装并覆盖,其他的你自己看着看着办,一般情况下默认选项就行了
安装完成后就可以启动桌面环境了
  1. sudo systemctl start lightdm.service
Copy the Code
这个时候你应该可以看到你的启动器里有N卡设置程序了,不过现在你点了也不会有反应,因为你只是装上了驱动,并没有启用

4.启用n卡
.创建文件 /etc/lightdm/display_setup.sh
  1. sudo dedit /etc/lightdm/display_setup.sh
Copy the Code
内容为
  1. #!/bin/sh
  2. xrandr --setprovideroutputsource modesetting NVIDIA-0
  3. xrandr --auto
  4. xrandr --dpi 96
Copy the Code
.给/etc/lightdm/display_setup.sh添加可执行权限
  1. sudo chmod +x /etc/lightdm/display_setup.sh
Copy the Code
.创建文件 .xinitrc
  1. sudo dedit ~/.xinitrc
Copy the Code
内容为
  1. xrandr --setprovideroutputsource modesetting NVIDIA-0
  2. xrandr --auto
  3. xrandr --dpi 96
Copy the Code
.配置x服务
执行命令
  1. lspci | egrep 'VGA|3D'
Copy the Code
结果中找到N卡(结果应该类似 01:00.0 VGA compatible controller: NVIDIA Corporation ........),记住开头的数字
创建文件 /etc/X11/xorg.conf
  1. sudo dedit  /etc/X11/xorg.conf
Copy the Code
内容为:(注意BusID后面的内容根据你的刚才查询过的结果填,例如01:00.0填"CI:1:0:0")
  1. Section "Module
  2.     Load "modesetting"
  3. EndSection
  4. Section "Device"
  5.     Identifier "nvidia"
  6.     Driver "nvidia"
  7.     BusID "PCI:1:0:0"      
  8.     Option "AllowEmptyInitialConfiguration"
  9. EndSection
Copy the Code
编辑文件 /etc/lightdm/lightdm.conf 在[Seat:*]行下添加
  1. display-setup-script=/etc/lightdm/display_setup.sh
Copy the Code
5.重启桌面环境
  1. sudo systemctl restart lightdm.service
Copy the Code
完事收工,你可以执行 nvidia-smi 查看显存使用状态,此时应该已经有显存被使用了,说明n卡已经启用了
:参考自https://blog.csdn.net/lewif/article/details/101150113







Reply View the author
avatar
heisen
deepin
2020-03-22 20:55
#5
https://bbs.deepin.org/post/189901
1.从www.nvidia.com下载你的显卡对应的驱动

下载下来的文件应该是

非常感谢你的帮助,我会仔细阅读并尝试,希望能安装成功
万分感谢您的帮助
Reply View the author
avatar
qgmzzn
deepin
2020-03-22 21:05
#6
aloginka 发表于 2020-3-22 10:54
我的查看是装好了驱动,就是分辨率不对,看着实在难受

升级内核,我就是这样解决分辨率问题的
Reply View the author