![使用 prime-select 切换 GPU 时出现问题(nvidia 和 intel)](https://linux22.com/image/1015127/%E4%BD%BF%E7%94%A8%20prime-select%20%E5%88%87%E6%8D%A2%20GPU%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%EF%BC%88nvidia%20%E5%92%8C%20intel%EF%BC%89.png)
我对 Linux 还很陌生,我想在我的戴尔 XPS 9570 中使用 prime-select 程序来运行集成的英特尔和专用的 Nvidia (1050 Ti) GPU,但遇到了麻烦。
如果我不触及使用以下命令生成的 xorg.conf nvidia-xconfig
:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 430.50
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
我的英特尔显卡运行良好,但使用 nvidia 显卡时屏幕却变黑。
如果我使用这个 xorg.conf (我在 nvidia 论坛上获取的):
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0@0:2:0"
Option "AccelMethod" "None"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
Section "Device"
Identifier "nvidia"
BusID "PCI:1@0:0:0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "ConstrainCursor" "off"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "on"
Option "IgnoreDisplayDevices" "CRT"
EndSection
nvidia gpu 可以工作,但是英特尔的 gpu 在启动时会出现黑屏。
有什么办法可以解决这个问题?我多次清除并重新安装 nvidia(像往常一样的管道),但错误仍然存在。
谢谢。
编辑:
使用这个 xorg.conf:
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
enter code here
我能够使用两个 GPU 启动而不出现黑屏,但 nvidia 的看起来不行。我的意思是,nvidia-smi
没有显示任何类型的已用内存,也没有显示正在运行的任务。有什么想法吗?