Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
笔记本双显卡 intel 、nvidia 的驱动安装
Experiences and Insight
1528
views ·
1
replies ·
To
floor
Go
摇摆哥
deepin
2020-01-08 21:14
Author
本帖最后由 supermew 于 2020-1-8 13:33 编辑
只针对单独使用 nvidia , 因为两个显卡自由的切换, 现在还不会玩。
关于在 archlinux 系统的双显卡的笔记本(inter + nvidia) 安装 nvidia 的驱动, 这是一个相当复杂的过程, 这里有原作者的博客
archlinux 笔记本安装nvidia显卡驱动与intel显卡驱动
现在我将起复制下来, 以免以后找不到了。
>> pacman -S nvidia nvidia-libgl xorg-xrandr
>> nvidia-xconfig #该命令会创建 /etc/X11/xorg.conf
Copy the Code
这个 pacman -S 是 archlinux 包管理器, 跟 apt-get 是一样的功能的, 在 deepin 上, 不能使用上面的命令, 这需要到官方网站上下载 nvidia 的驱动进行安装。安装方法可以参考
这篇文章进行安装
, 完成后需要按照下面进行配置。
编辑之前需要查询一些信息.用 lspci | grep -E "VGA|3D" 来查询 NVIDIA 显卡的 PCI 地址。PCI 地址是提到 NVIDIA 的输出行的前7个字符,看起来像
01:00.0
。在
xorg.conf
中,需转换为 #:#:# 格式;例如 01:00.0 应该写成 1:0:0 。BusID 那里 N 卡一般是 BusID “PCI:1:0:0” 注意格式,00:02.0 这种形式需要转换成 0:2:0 。在 /etc/X11/xorg.conf 最后添加如下内容:
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
Copy the Code
没使用窗框管理器的以下内容添加到 ~/.xinitrc 开头:
~/.xinitrc
Copy the Code
**对于 LightDM **
#!/bin/bash
# /etc/lightdm/display_setup.sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
Copy the Code
赋予脚本可执行权限:
>> chmod +x /etc/lightdm/display_setup.sh
Copy the Code
编辑 /etc/lightdm/lightdm.conf 的 [Seat:*] 部分以配置 lightdm 运行这个脚本:
# nano /etc/lightdm/lightdm.conf
[Seat:*]
display-setup-script=/etc/lightdm/display_setup.sh
Copy the Code
重启,你的 DM 应该启动了。
但是有可能还是启动不了, 单独运行 display_setup.sh 时, 会提示 can't open display, 这时需要增加配置文件将 nvidia 设置成主要显卡。参考文章
nvidia optimus
在
/etc/X11/xorg.conf.d/
下创建
/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
, 其内容如下:
Section "OutputClass"
Identifier "intel"
MatchDriver "i915"
Driver "modesetting"
EndSection
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "PrimaryGPU" "yes"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection
Copy the Code
Reply
Like 0
Favorite
View the author
All Replies
cdercder
deepin
2020-01-09 01:34
#1
太好了,谢谢,收藏了,慢慢读,细细品
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
WiFi Drivers
Popular Events
More
只针对单独使用 nvidia , 因为两个显卡自由的切换, 现在还不会玩。
关于在 archlinux 系统的双显卡的笔记本(inter + nvidia) 安装 nvidia 的驱动, 这是一个相当复杂的过程, 这里有原作者的博客 archlinux 笔记本安装nvidia显卡驱动与intel显卡驱动 现在我将起复制下来, 以免以后找不到了。
这个 pacman -S 是 archlinux 包管理器, 跟 apt-get 是一样的功能的, 在 deepin 上, 不能使用上面的命令, 这需要到官方网站上下载 nvidia 的驱动进行安装。安装方法可以参考 这篇文章进行安装, 完成后需要按照下面进行配置。
在 /etc/X11/xorg.conf.d/ 下创建 /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf , 其内容如下: