[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
3 / 7
To page
独醉千年
deepin
2022-07-02 07:12
#41

感谢!NVIDIA GeForce GTX 1060 3GB安装成功。

未看到同步功能。添加 GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"后也没找到。但网页视频正常。

image.pngimage.png

Reply View the author
水木火
deepin
2022-07-02 09:03
#42
独醉千年

感谢!NVIDIA GeForce GTX 1060 3GB安装成功。

未看到同步功能。添加 GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"后也没找到。但网页视频正常。

image.pngimage.png

视频播放正常的话,那也没啥关系的

Reply View the author
虫二
deepin
2022-07-02 20:19
#43

N卡之后发热严重,切换到intel之后就温度降下来了

Reply View the author
重启999
deepin
2022-07-03 17:34
#44

谢谢,照着教程我成功安装了显卡驱动!

Reply View the author
gongyf
deepin
2022-07-04 05:47
#45

显卡驱动太难了,终于找到教程了。。。。

Reply View the author
Mercedes
deepin
2022-07-30 11:03
#46

万分感谢 ,各种方法重装系统,重装驱动,折腾了我一礼拜,就是在 n 卡模式下打不开 steam,差点就要弃坑装 manjaro 去了,从此 deepin 忠实粉丝有我一个!!!!!

Reply View the author
173******39
deepin
2022-08-08 16:27
#47

GT710M安装始终失败

Reply View the author
arrowarcher
deepin
2022-08-09 04:37
#48

其他都成功了,同步打开失败:

方法一二都尝试了,没有用

image.png

首先是没有“Name:”,我是根据xrandr命令看的,有个eDP-1-1(另外显示设置的亮度调节里也是eDP-1-1),敲了方法二的补充步骤并重启,同步还是没打开。

sudo xrandr --output eDP-1-1 --set "PRIME Synchronization" 1

/etc/X11/xorg.conf内容如下:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "DGPU" 0 0
    Option         "AllowNVIDIAGPUScreens"
EndSection

Section "Module"
        Load "modesetting"
EndSection

Section "Device"
    Identifier     "GFX0"
    Driver         "modesetting"
    VendorName     "Intel Corporation"
    BusID          "PCI:"
EndSection

Section "Device"
    Identifier     "PEGP"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "IGPU"
    Device         "GFX0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "DGPU"
    Device         "PEGP"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration"
    SubSection     "Display"
        Depth       24
    EndSubSection
    Option         "Coolbits" "28"
EndSection

Reply View the author
水木火
deepin
2022-08-09 23:42
#49
arrowarcher

其他都成功了,同步打开失败:

方法一二都尝试了,没有用

image.png

首先是没有“Name:”,我是根据xrandr命令看的,有个eDP-1-1(另外显示设置的亮度调节里也是eDP-1-1),敲了方法二的补充步骤并重启,同步还是没打开。

sudo xrandr --output eDP-1-1 --set "PRIME Synchronization" 1

/etc/X11/xorg.conf内容如下:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "DGPU" 0 0
    Option         "AllowNVIDIAGPUScreens"
EndSection

Section "Module"
        Load "modesetting"
EndSection

Section "Device"
    Identifier     "GFX0"
    Driver         "modesetting"
    VendorName     "Intel Corporation"
    BusID          "PCI:"
EndSection

Section "Device"
    Identifier     "PEGP"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "IGPU"
    Device         "GFX0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "DGPU"
    Device         "PEGP"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration"
    SubSection     "Display"
        Depth       24
    EndSubSection
    Option         "Coolbits" "28"
EndSection

你这个是单显卡吧,单显卡不用打开同步功能,只要看视频正常就没事

Reply View the author
水木火
deepin
2022-08-09 23:43
#50
173******39

GT710M安装始终失败

用这个命令安装试试

sudo apt install nvidia-legacy-390xx-driver

Reply View the author
173******34
deepin
2022-08-12 18:47
#51

nvidia mx150装nvidia driver 和390都没用

装好重启后nvidia-smi显示no devices were found

Reply View the author
死肥猫
deepin
2022-08-19 18:07
#52

很棒 学习了 已经搞定 支持红贴 小白友好教程

Reply View the author
158******27
deepin
2022-08-26 04:25
#53

大佬 收下我的膝盖👍

Reply View the author
deepin
2022-08-30 01:39
#54

这不是精华贴??

Reply View the author
150******90
deepin
2022-08-31 05:08
#55

点切换后一般要等多久?

Reply View the author
水木火
deepin
2022-08-31 07:46
#56
150******90

点切换后一般要等多久?

几秒钟

Reply View the author
清风4499
deepin
2022-09-09 22:04
#57

已收藏!谢谢大佬!!!!!

Reply View the author
思念
deepin
2022-09-16 17:36
#58

第二步的第3步安装时没有那个包

deeSiN@deeSiN-PC:~$ pkexec apt install nvidia-detect
正在读取软件包列表... 完成
正在分析软件包的依赖关系树   
正在读取状态信息... 完成   
E: 无法定位软件包 nvidia-detect

Reply View the author
水木火
deepin
2022-09-17 09:30
#59
思念

第二步的第3步安装时没有那个包

deeSiN@deeSiN-PC:~$ pkexec apt install nvidia-detect
正在读取软件包列表... 完成
正在分析软件包的依赖关系树   
正在读取状态信息... 完成   
E: 无法定位软件包 nvidia-detect

刚试了一下,没问题

sabragionla@sabragionla-PC:~​ pkexec apt install nvidia-detect 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 nvidia-detect 已经是最新版 (510.73.08-1)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。 sabragionla@sabragionla-PC:~

Reply View the author
chenalbert88882000
deepin
2022-09-17 18:48
#60

非常感谢 !!!! 有这个驱动就真的可以尝试生产了。 PS AI 中望的CAD和3D 还有BLEND 非常谢谢!

Reply View the author
3 / 7
To page