禁用“假”X11 会话中的额外监视器

禁用“假”X11 会话中的额外监视器

我的系统中有 3 个 NVIDIA GPU。一个用于显示,两个用于计算。我想调整两个计算 GPU 的风扇曲线,据我所知,所有当前方法都需要运行 X 服务器才能使风扇控制发挥作用(有人说他们可以打开 X,调整风扇速度并将其关闭但那些对我来说永远不起作用)。

没关系,我打开了 X,但没有使用以下命令将显示器连接到它们sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration并且它可以工作。问题是它还引入了新的“显示器”或“X Screen”,它们以某种方式成为我工作空间的一部分。这是真的很烦人,因为我的鼠标经常会超出边界进入“假屏幕”。

我考虑使用鼠标捕获脚本 - 一个连续监视鼠标并将鼠标发送回有效工作空间的程序。不过我真的不想浪费我的 CPU 时间。

我检查了所有设置,nvidia-settings但找不到禁用它们的方法。

这是我的Xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 440.95.01

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    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 "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option "ignore" "true"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    Option "ignore" "true"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2080 Ti"
    BusID          "PCI:9:0:0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
    BusID          "PCI:66:0:0"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2080 Ti"
    BusID          "PCI:67:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

如何禁用额外的屏幕?

答案1

绝对欢迎更好的答案。我很长时间以来一直在尝试解决这个问题,这是我拥有的最好的技巧。当我随机尝试 nvidia-setting 中的每一个设置时,我得到了洞察。一个警告说“绝对位置只能为屏幕 0 设置,否则某些屏幕可能无法访问”。不能达到!这正是我想要的!

无论如何,我将额外的屏幕“移动”到远处的绝对位置,一切正常,只有以下内容需要更改。

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" Absolute 1000 0
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

相关内容