Xorg 多卡模式设置配置分段错误

Xorg 多卡模式设置配置分段错误

使用 xorg-x11-server 1.20.1-5.2.el7_6 ,我想知道我是否犯了一个简单的配置错误?

以下段错误:

Section "ServerLayout" 
    Identifier "Example" 
    Screen 0 "A" 
    Screen 1 "B" 
EndSection 

Section "Device" 
    Identifier "A Card" 
    Driver "modesetting" 
    Screen 0 
    BusID "PCI:16@0:0:0" 
    Option "kmsdev" "/dev/dri/card1" 
    Option "Monitor-DVI-D-1" 
EndSection 

Section "Monitor" 
    Identifier "A Monitor" 
EndSection 

Section "Screen" 
    Identifier "A" 
    Device "A Card" 
    Monitor "A Monitor" 
EndSection 

Section "Device" 
    Identifier "B Card" 
    Driver "modesetting" 
    Screen 1 
    BusID "PCI:56@0:0:0" 
    Option "kmsdev" "/dev/dri/card0" 
    Option "Monitor-HDMI-1" 
EndSection 

Section "Monitor" 
    Identifier "B Monitor" 
EndSection 

Section "Screen" 
    Identifier "B" 
    Device "B Card" 
    Monitor "B Monitor" 
EndSection 
sudo cat /var/log/Xorg.0.log | grep -E '(EE)|(WW)'
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 70484.038] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[ 70484.038] (WW) xf86OpenConsole: setsid failed: Operation not permitted
[ 70484.038] (EE) 
[ 70484.038] (EE) Backtrace:
[ 70484.038] (EE) 0: /usr/bin/X (xorg_backtrace+0x55) [0x5571eeac9185]
[ 70484.039] (EE) 1: /usr/bin/X (0x5571ee918000+0x1b4e09) [0x5571eeacce09]
[ 70484.039] (EE) 2: /lib64/libpthread.so.0 (0x7f1aecfb9000+0xf5d0) [0x7f1aecfc85d0]
[ 70484.039] (EE) 3: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (0x7f1ae91b8000+0xa144) [0x7f1ae91c2144]
[ 70484.039] (EE) 4: /usr/bin/X (0x5571ee918000+0xb0049) [0x5571ee9c8049]
[ 70484.039] (EE) 5: /usr/bin/X (xf86CallDriverProbe+0x4b) [0x5571ee9a700b]
[ 70484.039] (EE) 6: /usr/bin/X (xf86BusConfig+0x46) [0x5571ee9a7966]
[ 70484.039] (EE) 7: /usr/bin/X (InitOutput+0x8ac) [0x5571ee9b4f0c]
[ 70484.039] (EE) 8: /usr/bin/X (0x5571ee918000+0x601b0) [0x5571ee9781b0]
[ 70484.039] (EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7f1aecc0e3d5]
[ 70484.039] (EE) 10: /usr/bin/X (0x5571ee918000+0x4a4ce) [0x5571ee9624ce]
[ 70484.039] (EE) 
[ 70484.039] (EE) Segmentation fault at address 0x2ba
[ 70484.039] (EE) 
[ 70484.039] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 70484.039] (EE) 
[ 70484.039] (EE) 
[ 70484.039] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 70484.039] (EE) 
[ 70484.039] (EE) Server terminated with error (1). Closing log file.

但是,每个单独的部分都没问题。以下两个都有效:

Section "ServerLayout"
    Identifier "Example"
    Screen 0 "A"
EndSection

Section "Device"
    Identifier "A Card"
    Driver "modesetting"
    Screen 0
    BusID "PCI:16@0:0:0"
    Option "kmsdev" "/dev/dri/card1"
    Option "Monitor-DVI-D-1"
EndSection

Section "Monitor"
    Identifier "A Monitor"
EndSection

Section "Screen"
    Identifier "A"
    Device "A Card"
    Monitor "A Monitor"
EndSection

Section "ServerLayout"
    Identifier "Example"
    Screen 0 "B"
EndSection

Section "Device"
    Identifier "B Card"
    Driver "modesetting"
    Screen 0
    BusID "PCI:56@0:0:0"
    Option "kmsdev" "/dev/dri/card0"
    Option "Monitor-HDMI-1"
EndSection

Section "Monitor"
    Identifier "B Monitor"
EndSection

Section "Screen"
    Identifier "B"
    Device "B Card"
    Monitor "B Monitor"
EndSection

是否需要添加其他配置才能使用modesetting驱动程序中的多张卡?如果有所不同,我打算使用 ZaphodHeads,并且我不需要加速其中一张卡。我只是删除了多余的配置以更清楚地说明问题。

答案1

如果给定的 BusID 没有“Screen 0”,则会发生分段错误。核心误解是 ServerLayout 部分中的屏幕编号是不是与设备部分中的屏幕编号相关。

对于任何尝试使用 ZaphodHeads 配置有多张卡的人,这里有一个可运行的示例:

Section "ServerLayout"
    Identifier "Example"
    Screen 0 "A"
    Screen 1 "B"
    Screen 2 "C"
EndSection

Section "Device"
    Identifier "A Card"
    Driver "modesetting"
    BusID "PCI:16@0:0:0"
    Option "kmsdev" "/dev/dri/card1"
    Option "Monitor-DVI-D-1"
EndSection

Section "Monitor"
    Identifier "A Monitor"
EndSection

Section "Screen"
    Identifier "A"
    Device "A Card"
    Monitor "A Monitor"
EndSection

Section "Device"
    Identifier "B Card"
    Driver "modesetting"
    Screen 0
    BusID "PCI:56@0:0:0"
    Option "kmsdev" "/dev/dri/card0"
    Option "Monitor-HDMI-1"
    Option "ZaphodHeads" "HDMI-1"
EndSection

Section "Monitor"
    Identifier "B Monitor"
EndSection

Section "Screen"
    Identifier "B"
    Device "B Card"
    Monitor "B Monitor"
EndSection

Section "Device"
    Identifier "C Card"
    Driver "modesetting"
    Screen 1
    BusID "PCI:56@0:0:0"
    Option "kmsdev" "/dev/dri/card0"
    Option "Monitor-HDMI-2"
    Option "ZaphodHeads" "HDMI-2"
EndSection

Section "Monitor"
    Identifier "C Monitor"
EndSection

Section "Screen"
    Identifier "C"
    Device "C Card"
    Monitor "C Monitor"
EndSection

相关内容