Linux 双显示器设置,分别连接到英特尔和 nvidia gpu

Linux 双显示器设置,分别连接到英特尔和 nvidia gpu

我的电脑是 intel 9600k + 垂直显示器 + z390 芯片组 + nvidia rtx 2060 + 水平显示器 + Gentoo linux + Xorg server 1.20.6 + gnome 3.32.2

在 UEFI 中,我将英特尔 iGPU 设置为主 GPU。

gnome settings -> Devices -> Display不会报告连接到 nvidia GPU 的显示器。因此我尝试手动配置Xorg.conf

Section "ServerLayout"
 Identifier "layout"
 Screen      0  "iGPU" Absolute 0 0
 Screen      1  "dGPU" Absolute 900 0
 Option         "Xinerama" "1"
# Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
      Identifier "iGPU"
      BusID  "PCI:00:02.0"
      Screen 0
EndSection

Section "Monitor"
    # This identifier would be the same as the name
    # of the connector printed by xrander.
    Identifier  "DP-3"
    Option      "Rotate"    "right"

    Option  "PreferredMode" "1600x900"
    # A line such as this ^ may be necesary if you
    # are not getting your prefered resolution.
    # These numbers need not be reversed with tallscreen orientation.
EndSection

Section "Monitor"
    # This identifier would be the same as the name
    # of the connector printed by xrander.
    Identifier  "DP-4"

    Option  "PreferredMode" "1360x768"
    # A line such as this ^ may be necesary if you
    # are not getting your prefered resolution.
    # These numbers need not be reversed with tallscreen orientation.
EndSection

Section "Device"
      Identifier "dGPU"
      Driver "nvidia"
      BusID  "PCI:01:00.0"
      Screen 1
EndSection

Section "Screen"
     Identifier "iGPU"
     Device "iGPU"
     Monitor "DP-3"
EndSection

Section "Screen"
     Identifier "dGPU"
     Device "dGPU"
     Monitor "DP-4"
EndSection

但是在主显示器上启动 grub 加载程序后,两个屏幕都变为空白。

/var/log/xorg.0.log尽管specify BusID我已经指定了。

答案1

尝试BusID像这样格式化你的行:

BusID  "PCI:0:2:0"
BusID  "PCI:1:0:0"

我最近一直在搜索类似的设置。我不记得在哪里看到过,但有一个解释说这些数字是十进制的,而不是 打印的十六进制lspci。并且,所有内容都应该用冒号分隔,并且没有多余的(即前导)零。

我无法权威地评论在固件中将英特尔作为主要 GPU 是否正确,不过,我怀疑这是正确的设置。

编辑:找到了我关于十进制的评论的来源: https://askubuntu.com/a/1102560

相关内容