根据Arch wiki 安装NVIDIA Optimus后黑屏,麻烦大家帮忙看看,...
Tofloor
poster avatar
leonardo520
deepin
2017-12-06 10:26
Author
本帖最后由 leonardo520 于 2017-12-6 17:37 编辑

折腾到了大半夜,最后还是黑屏解决不了。在这里把我的操作全过程贴出来,麻烦各位朋友帮忙看看是不是我哪一步做错了,谢谢。

安装NVIDIA Optimus的系统要求如下:

X.Org X server version 1.13 or higher.

A Linux kernel, version 3.13 or higher, with CONFIG_DRM enabled.

Version 1.4.0 of the xrandr command-line utility.

我看deepin的系统全部能满足以上三个要求,所以我才安装的,如果不对麻烦指正
http://us.download.nvidia.com/XFree86/Linux-x86_64/370.23/README/randr14.html


具体操作过程如下:
https://wiki.archlinux.org/index.php/NVIDIA_Optimus_(简体中文)#.E5.8F.AF.E9.80.89.E9.85.8D.E7.BD.AE
第一步:安装官方源的驱动包 nvidia 375.26和软件包 xorg-xrandr.  (这个xorg-xrandr好像deepin系统就自带了,我就没有安装,因为我运行xrandr可以出相关信息如下图所示)

sudo apt-get install nvidia-driver nvidia-settings


第二步:创建一个 xorg.conf
通过下面这个命令得到的NVIDIA 显卡的 PCI 地址4:0:0,填到BusID "CI:4:0:0"里面了。如图下图所示:
$ lspci | grep -E "VGA|3D"

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "<4:0:0>"
    Option "AllowEmptyInitialConfiguration"
EndSection
我的电脑/etc/X11下没有xorg.conf,我自己在桌面创建了个记事本,然后改名为xorg.conf,再把下面的一段话填入xorg.conf里,最后移动文件到/etc/X11里

第三步:在/etc/lightdm/下创建display_setup.sh并写入如下内容:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


和上面一样,本身/etc/lightdm里没有display_setup.sh,我也是创建了一个记事本并改名为display_setup.sh,然后把上面两句命令写入这个文件里

赋予脚本可执行权限:# chmod +x /etc/lightdm/display_setup.sh (赋予权限我是在terminal里直接输入 sudo chmod +x /etc/lightdm/display_setup.sh 来完成的

第四步: 编辑 /etc/lightdm/lightdm.conf 的 [Seat:*] 部分以配置 lightdm 运行这个脚本:
我把这句命令display-setup-script=/etc/lightdm/display_setup.sh粘贴到lightdm.conf文件里找到的[Seat:*]下面 如下图所示,这条命令前面没有放#号

至此完成所有操作,重启后无法进入桌面。 这是我严格安装Arch wiki教程上说的来做的,不知道是不是我做错了哪一步导致无法进入桌面,还是本身教程有偏差。希望有经验的朋友能指教一下,再次感谢。晚安




Reply Favorite View the author
All Replies
2 / 2
To page
avatar
justforlxz
deepin
2017-12-08 00:20
#21
https://bbs.deepin.org/post/149670
奇怪了,刚按照昨天的方法重新弄了一次,这次尽然可以启动图像界面了。我晕了,请问如何查看是否成功使用 ...

可能哪步误操作了吧,安装mesa-utils,执行glxinfo | grep OpenGL,如果输出是NVIDIA那些信息,可以贴上来我看看。
Reply View the author
avatar
leonardo520
deepin
2017-12-08 00:27
#22
https://bbs.deepin.org/post/149670
可能哪步误操作了吧,安装mesa-utils,执行glxinfo | grep OpenGL,如果输出是NVIDIA那些信息,可以贴上 ...



你好,图片在这里,请问这说明我现在已经成功开启NVIDIA optimus了吗? 我现在使用的是NVIDIA显卡吗?
Reply View the author
avatar
justforlxz
deepin
2017-12-08 01:06
#23
https://bbs.deepin.org/post/149670
你好,图片在这里,请问这说明我现在已经成功开启NVIDIA optimus了吗? 我现在使用的是NVIDIA显卡吗?
...

是的啊
Reply View the author
avatar
leonardo520
deepin
2017-12-08 01:19
#24

哈哈,忙了几天终于成功了,非常感谢你的指教等下把全过程做个详细的教程分享给大家,哈哈
Reply View the author
avatar
leonardo520
deepin
2017-12-08 01:21
#25

最后想问下这个xorg-xrandr如何安装的?因为deepin默认安装了,我想在教程里写如何安装这个,万一别的朋友系统里没有这个软件呢, 哈哈
Reply View the author
avatar
justforlxz
deepin
2017-12-08 01:50
#26
https://bbs.deepin.org/post/149670
最后想问下这个xorg-xrandr如何安装的?因为deepin默认安装了,我想在教程里写如何安装这个,万一别的朋 ...

X现在把工具都单独拆出来了,arch上已经是拆出来的xorg-xrandr,deepin这边还没有做升级处理,不过xrandr是deepin的依赖,所以没啥问题的。
Reply View the author
avatar
leonardo520
deepin
2017-12-08 02:22
#27
https://bbs.deepin.org/post/149670
X现在把工具都单独拆出来了,arch上已经是拆出来的xorg-xrandr,deepin这边还没有做升级处理,不过xrandr ...

好的,了解谢谢
Reply View the author
avatar
leonardo520
deepin
2017-12-08 05:15
#28
https://bbs.deepin.org/post/149670
X现在把工具都单独拆出来了,arch上已经是拆出来的xorg-xrandr,deepin这边还没有做升级处理,不过xrandr ...

你好,想再请教你一下关于开启PRIME Synchronization,我查看了NVIDIA论坛里的内容,只要满足如下条件就可以自动开启PRIME Synchronization,deepin系统和我安装的NVIDIA 375.26驱动是可以满足那开启PRIME Synchronization的条件的,但是我安装玩NVIDIA optimus后并未自动开启PRIME Synchronization。在terminal里输入这个命令xrandr –output --set “PRIME Synchronization” 1提示:bash: output: 没有那个文件或目录。可以请教下怎么回事吗?谢谢

这是NVIDIA论坛的关于PRIME Synchronization的帖子
https://devtalk.nvidia.com/defau ... me-synchronization/

To support PRIME Synchronization, the system needs:

Linux kernel 4.5 or higher
An X server with ABI 23 or higher (as yet officially unreleased, use commit 2a79be9)
Compatible drivers
Reply View the author
avatar
tmacy
deepin
2017-12-08 05:59
#29
https://bbs.deepin.org/post/149670
你好,想再请教你一下关于开启PRIME Synchronization,我查看了NVIDIA论坛里的内容,只要满足如下条件就 ...

man xrandr :

       --output output
              Selects an output to reconfigure. Use either the name of the output or  the
              XID.

EXAMPLES
       Sets an output called LVDS to its preferred mode, and on its right put  an  output
       called  VGA to preferred mode of a screen which has been physically rotated clock‐
       wise:
              xrandr --output LVDS --auto --rotate normal --pos 0x0 --output  VGA  --auto
              --rotate left --right-of LVDS

--output 参数后面跟的是设备名称

具体名称你可以xrandr看一下
Reply View the author
avatar
leonardo520
deepin
2017-12-08 06:45
#30
https://bbs.deepin.org/post/149670
man xrandr :

       --output output

请问那个设备名称 具体要填什么呢?要填NVIDIA吗?
Reply View the author
avatar
leonardo520
deepin
2017-12-08 06:50
#31
https://bbs.deepin.org/post/149670
man xrandr :

       --output output

这是xrandr后的结果,麻烦帮看下设备名称应该填什么,谢谢
Reply View the author
avatar
leonardo520
deepin
2017-12-08 07:05
#32
https://bbs.deepin.org/post/149670
man xrandr :

       --output output

谢谢指教,搞定了 哈哈
Reply View the author
2 / 2
To page