[Tutorials] deepin安装N卡驱动教程(真的超级简单)
Tofloor
poster avatar
水木火
deepin
2022-06-11 00:35
Author

本教程分为五部分

一、前言

二、安装N卡驱动

三、双显卡切换

四、检查是否启用独立显卡

五、其它问题


一、前言

deepin20.6仓库内的N卡驱动已经更新到了510版本

对于大部分用户而言,已经不需要用run文件来安装驱动

(如有需要可以看我之前的教程)

https://bbs.deepin.org/zh/post/232923?offset=0&postId=1317417

通过apt安装会更加简单

(不需要手动禁用nouveau、不需要更改配置文件、不需要显卡驱动管理器)


二、安装N卡驱动

跟着下面的步骤来就行

tips:下面的指令都可以用ctrl c复制,然后在终端里面用ctrl alt v进行粘贴(可以在终端右上角菜单里自定义修改快捷键),回车执行

1、卸载原有驱动

pkexec apt autoremove nvidia-*

2、添加32位架构并刷新源

pkexec dpkg --add-architecture i386
pkexec apt update

image.png

3、安装nvidia-detect

pkexec apt install nvidia-detect

4、执行nvidia-detect

nvidia-detect

image.png

5、安装nvidia驱动

如果上图绿色部分是nvidia-driver

那就终端输入

pkexec apt install nvidia-driver nvidia-settings nvidia-smi

如果是其它内容(比如nvidia-legacy-390xx-driver)

那就终端输入

pkexec apt install nvidia-legacy-390xx-driver

安装驱动过程中有提示直接回车就行

安装完之后记得重启


三、双显卡切换

(对于双显卡而言,装上驱动并不意味着启用独立显卡,往往需要进行显卡切换,方法如下)

1、deepin-prime(由deepin官方维护,目前在deepin20.8、v23 alpha2、uos22上面通过测试,还没遇到bug,理论上a+n组合也可用)

但是该软件包只上架了deepin20.8

v23 alpha2和uos需要自行下载

deepin-prime_1.0.3_amd64.zip

下载解压后双击安装)

终端输入(deepin20.8)

pkexec apt install deepin-prime

回车确认安装

切换n卡就输入

pkexec prime-select nvidia

回车确认,出现done之后重启电脑即可

微信截图_20230209105423.png

打马赛克是因为内容违规

切换intel就输入

pkexec prime-select intel

切换amd就输入

pkexec prime-select amd

切换后记得重启电脑


四、检查是否启用独立显卡

1、nvtop

终端输入

pkexec apt install nvtop

回车确认安装

终端输入

nvtop回车

image.png

有kwin_x11这个进程就说明N卡成功启用

a卡可以把上述指令中的nvtop替换成radeontop

通过radeontop来查看gpu进程信息

2、nvidia-smi

终端输入

nvidia-smi回车

image.png

如图所示的两处有内容就说明N卡已启用

3、自带浏览器(chrome也行)

如果是比较老的显卡驱动(比如390系列),可能没有nvidia-smi

可以打开自带浏览器输入

chrome://gpu回车

往下翻

image.png

如果Driver vendor那一栏后面是nvidia就说明正在使用N卡


五、其它问题

一、nvidia-detect可能会给部分老显卡推荐nvidia-driver,但是实际安装不可用

解决办法

1、卸载以前的驱动

pkexec apt autoremove nvidia-*

2、安装390驱动再重启

pkexec apt install nvidia-legacy-390xx-driver

二、deepin-prime切换之后开机黑屏

可以尝试如下方法

1、按住ctrl alt fn f2进入超级终端输入帐号密码登录

2、删除配置文件

sudo rm /etc/X11/xorg.conf

然后重启看可不可以进入系统

如果仍旧黑屏的话

1、重新进入超级终端

2、卸载显卡驱动

sudo apt autoremove nvidia-*

3、再删除配置文件

sudo rm /etc/X11/xorg.conf

再重启应该就可以进入桌面了

然后根据上面的步骤重新装一下驱动就行

Reply Favorite View the author
Comments
poster avatar
smzlinux
2023-05-23 04:02
再加上些命令行操作解释,可以纳入官方文档
All Replies
4 / 7
To page
haoduoyu
deepin
2022-10-31 18:24
#61

升级到20.7.1后显卡效果不好,按这个方法装好了

Reply View the author
wowo
deepin
2022-11-11 19:39
#62

我的是这个,咋办???😪
image.png

Reply View the author
wowo
deepin
2022-11-11 19:40
#63
wowo

我的是这个,咋办???😪
image.png

可能我的是v23的缘故

Reply View the author
子木
deepin
2022-11-19 19:59
#64

hello 我在执行 pkexec apt install nvidia-driver nvidia-settings nvidia-smi

弹出了下面这个画面:

image.png

我选择 yes 显示如下:

image.png

WARNING: The '--no-runlevel-check' option is deprecated:  nvidia-installer will ignore this option.


Welcome to the NVIDIA Software Installer for Unix/Linux

Detected 6 CPUs online; setting concurrency level to 6.

If you plan to no longer use the NVIDIA driver, you should make sure that no X screens are configured to use
the NVIDIA X driver in your X configuration file. If you used nvidia-xconfig to configure X, it may have
created a backup of your original configuration. Would you like to run `nvidia-xconfig
--restore-original-backup` to attempt restoration of the original X configuration file?
  [default: (N)o]: 

我应该输入什么? 我尝试输入 yes, N 。不知道如何才能继续下去

image.png

Reply View the author
子木
deepin
2022-11-19 20:16
#65
子木

hello 我在执行 pkexec apt install nvidia-driver nvidia-settings nvidia-smi

弹出了下面这个画面:

image.png

我选择 yes 显示如下:

image.png

WARNING: The '--no-runlevel-check' option is deprecated:  nvidia-installer will ignore this option.


Welcome to the NVIDIA Software Installer for Unix/Linux

Detected 6 CPUs online; setting concurrency level to 6.

If you plan to no longer use the NVIDIA driver, you should make sure that no X screens are configured to use
the NVIDIA X driver in your X configuration file. If you used nvidia-xconfig to configure X, it may have
created a backup of your original configuration. Would you like to run `nvidia-xconfig
--restore-original-backup` to attempt restoration of the original X configuration file?
  [default: (N)o]: 

我应该输入什么? 我尝试输入 yes, N 。不知道如何才能继续下去

image.png

ctrl c 结束当前页面 , 输入一下命令:

sudo nvidia-installer --uninstall

再次执行 ,按照作者操作,完成

pkexec apt install nvidia-driver nvidia-settings nvidia-smi

Reply View the author
水木火
deepin
2022-11-19 23:22
#66
子木

ctrl c 结束当前页面 , 输入一下命令:

sudo nvidia-installer --uninstall

再次执行 ,按照作者操作,完成

pkexec apt install nvidia-driver nvidia-settings nvidia-smi

你之前用run文件装过驱动吧

Reply View the author
子木
deepin
2022-11-20 07:08
#67
水木火

你之前用run文件装过驱动吧

是的

Reply View the author
水木火
deepin
2022-11-20 07:59
#68
子木

是的

重启一下电脑,可能会出现依赖问题,进入终端输入这个指令修复一下

pkexec dpkg --configure -a

然后再输入

sudo /usr/bin/nvidia-uninstall

卸载run文件装的驱动,有提问直接回车

然后按按照教程的步骤走一遍就好

Reply View the author
子木
deepin
2022-11-20 08:05
#69
水木火

重启一下电脑,可能会出现依赖问题,进入终端输入这个指令修复一下

pkexec dpkg --configure -a

然后再输入

sudo /usr/bin/nvidia-uninstall

卸载run文件装的驱动,有提问直接回车

然后按按照教程的步骤走一遍就好

好的 驱动我已经装好了,解决了连接显示屏不亮的问题。但是引发了一个新问题,可以看我发的帖子。我电脑的提示语变成了英文

Reply View the author
水木火
deepin
2022-11-20 08:07
#70
wowo

可能我的是v23的缘故

v23装N卡驱动比较麻烦,主要是不知道源里面有没有适合这个显卡的包

其次,需要用户手动创建xorg.conf文件,总体来说很麻烦。

Reply View the author
心声向往啊
deepin
2022-12-01 00:02
#71
It has been deleted!
我只是来看看
deepin
2022-12-03 05:09
#72

这个是安装了闭源还是开源驱动啊,大佬

Reply View the author
水木火
deepin
2022-12-04 03:52
#73
我只是来看看

这个是安装了闭源还是开源驱动啊,大佬

这个是闭源驱动

Reply View the author
挨踢螺
deepin
2023-01-10 06:33
#74

好用!

ThinkPad T450已经安装好驱动,显示效果已经非常不错了。

Reply View the author
你好勇啊林克
deepin
2023-01-15 21:50
#75

非常感谢,我的steam打不开解决了

Reply View the author
lmjwcx
deepin
2023-02-07 18:11
#76

非常好的教程,标记一下,非常感谢

Reply View the author
水木火
deepin
2023-02-10 00:13
#77
It has been deleted!
widon1104
deepin
2023-02-24 01:30
#78

magic_fragment_server git:(master) ✗ pkexec prime-select intel
Error: no integrated GPU detected.

Reply View the author
水木火
deepin
2023-02-24 07:36
#79
widon1104

magic_fragment_server git:(master) ✗ pkexec prime-select intel
Error: no integrated GPU detected.

这个提示系统没有检测到intel核显

Reply View the author
我们还要等几个四年
deepin
2023-03-01 07:26
#80

老哥看看这是成了对吧
截图_org.deepin.browser_20230228232246.png

Reply View the author
4 / 7
To page