LightDM 神秘地改变显示器布局

LightDM 神秘地改变显示器布局

更新: 问题似乎源于 LightDM。如果我使用 从 TTY 启动会话startx,屏幕将根据 进行布局xorg.conf。但如果我这样做sudo start lightdm,屏幕在登录之前就变成线性的。


我有一个 GPU(Nvidia NVS 510),上面连接了四个显示器。我试图将它们排列成 2x2 布局。但是,每次启动 X 时,LightDM 似乎都会重置为水平 1x4 布局。

这是安装了专有 Nvidia 驱动程序的 Ubuntu 14.04 系统。我xorg.conf使用以下命令生成了以下内容nvidia-settings

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 331.20  (buildd@roseapple)  Mon Feb  3 15:07:22 UTC 2014

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    [...]
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    [...]
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    [...]
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVS 510"
    BusID          "PCI:4:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "DP-4: nvidia-auto-select +1920+0, DP-5: nvidia-auto-select +0+0, DP-6: nvidia-auto-select +1920+1200, DP-7: nvidia-auto-select +0+1200"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

请注意,所有显示都是单个 X 屏幕的一部分(如所愿),布局在“metamodes”选项中指定。如果我使用startx,一切都会正常工作。

然而,LightDM 似乎在显示登录屏幕之前的某个时间点神秘地重置了布局。

我在早期看到了以下代码片段Xorg.0.log,正确配置了屏幕:

[ 5601.023] (II) NVIDIA(0): 已验证的 MetaModes:[ 5601.023] (II) NVIDIA(0): [ 5601.023] (II) NVIDIA(0):
“DP-4:nvidia-auto-select+1920+0,DP-5:nvidia-auto-select+0+0,DP-6:nvidia-auto-select+1920+1200,DP-7:nvidia-auto-select+0+1200” [ 5601.023] (II) NVIDIA(0): 虚拟屏幕尺寸确定为 3840 x 2400

但是使用 LightDM,我稍后在日志中得到以下内容(带有X -logverbose 6):

[  1022.497] (II) XINPUT: Adding extended input device "HP WMI hotkeys" (type: KEYBOARD, id 12)
[  1022.497] (**) Option "xkb_rules" "evdev"
[  1022.497] (**) Option "xkb_model" "pc105"
[  1022.497] (**) Option "xkb_layout" "us"
[  1022.497] (II) XKB: Reusing cached keymap
[  1023.181] (II) NVIDIA(0): XRRSetCrtcConfig(screen:0 crtc:2 position:0,0 mode:null rotation:0x01 output:null)
[  1023.194] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-5)
[  1023.194] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-4)
[  1023.194] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-7)
[  1023.194] (II) NVIDIA(0): Setting mode "DP-5: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-4: nvidia-auto-select @1920x1200 +1920+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-7: nvidia-auto-select @1920x1200 +0+1200 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}"
[  1023.644] (II) NVIDIA(0): XRRSetCrtcConfig(screen:0 crtc:3 position:0,0 mode:null rotation:0x01 output:null)
[  1023.646] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-5)
[  1023.646] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-4)
[  1023.646] (II) NVIDIA(0): Setting mode "DP-5: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-4: nvidia-auto-select @1920x1200 +1920+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}"
[  1023.970] (II) NVIDIA(0): XRRSetScreenSize(screen:0 size:7680x1200 sizeMM:2032x318)
[  1023.987] (==) NVIDIA(0): Using 8388608 bytes for software rendering cache
[  1024.050] (II) NVIDIA(0): XRRSetCrtcConfig(screen:0 crtc:2 position:3840,0 mode:1920x1200 rotation:0x01 output:DP-6)
[  1024.053] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-5)
[  1024.053] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-4)
[  1024.053] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-6)
[  1024.053] (II) NVIDIA(0): Setting mode "DP-5: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-4: nvidia-auto-select @1920x1200 +1920+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-6: nvidia-auto-select @1920x1200 +3840+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}"
[  1024.394] (II) NVIDIA(0): XRRSetCrtcConfig(screen:0 crtc:3 position:5760,0 mode:1920x1200 rotation:0x01 output:DP-7)
[  1024.397] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-5)
[  1024.397] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-4)
[  1024.397] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-6)
[  1024.397] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-7)
[  1024.397] (II) NVIDIA(0): Setting mode "DP-5: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-4: nvidia-auto-select @1920x1200 +1920+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-6: nvidia-auto-select @1920x1200 +3840+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-7: nvidia-auto-select @1920x1200 +5760+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}"
[  1024.853] (II) NVIDIA(0): XRRSetCrtcConfig(screen:0 crtc:1 position:0,0 mode:1920x1200 rotation:0x01 output:DP-4)
[  1024.856] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-5)
[  1024.856] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-4)
[  1024.856] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-6)
[  1024.856] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-7)
[  1024.856] (II) NVIDIA(0): Setting mode "DP-5: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-4: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-6: nvidia-auto-select @1920x1200 +3840+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-7: nvidia-auto-select @1920x1200 +5760+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}"
[  1024.920] (II) NVIDIA(0): XRRSetCrtcConfig(screen:0 crtc:0 position:1920,0 mode:1920x1200 rotation:0x01 output:DP-5)
[  1024.923] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-5)
[  1024.923] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-4)
[  1024.923] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-6)
[  1024.923] (II) NVIDIA(0): Screen transformation disabled for HP Z24i (DFP-7)
[  1024.923] (II) NVIDIA(0): Setting mode "DP-5: nvidia-auto-select @1920x1200 +1920+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-4: nvidia-auto-select @1920x1200 +0+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-6: nvidia-auto-select @1920x1200 +3840+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}, DP-7: nvidia-auto-select @1920x1200 +5760+0 {ViewPortIn=1920x1200, ViewPortOut=1920x1200+0+0}"

我的 LightDM 配置文件都是标准的,除了90-nvidia.conf可能由专有 Nvidia 驱动程序安装的:

# ls /usr/share/lightdm/lightdm.conf.d/
50-greeter-wrapper.conf
50-guest-wrapper.conf
50-ubuntu.conf
50-unity-greeter.conf 
50-xserver-command.conf
90-nvidia.conf
# ls /etc/lightdm/
users.conf

另外,我尝试过删除,90-nvidia.conf但是并没有改变行为。

答案1

事实证明unity-greeter,默认的 LightDM 欢迎程序在启动后会应用该 Unity 显示设置。除了 之外,我还在 Unity 显示设置中配置了显示器布局xorg.conf,但这没有帮助

由于我使用的是不同的窗口管理器(i3),因此unity-settings-daemon没有运行,这似乎导致欢迎程序回退到水平布局,替换xorg.conf请求的内容并忽略 Unity 显示设置。

答案2

我认为这是错误的当前的X-org 或与当前的 NVidia 驱动程序和软件有关,或者是关于 64 位版本。

我在 64 位 Debian 7 上使用 NVidia Quadro NVS140M 时遇到了类似的问题(无法读取设置?)。

默认视频设置出了问题。我的色调偏移非常严重(蓝色面孔、红色树木或类似的东西)。我能够使用 nvidia-settings 应用程序纠正它们,但重启后颜色很乱,直到我再次启动 nvidia-settings。当我启动它时 - 看起来配置文件已被读取,并且颜色再次配置,没有任何变化,就在启动 nvidia-settings 之后。

几年前,我使用相同的硬件,但使用的是较旧的驱动程序、较旧的 Linux(我认为是 SuSE),而且是 32 位版本。也许可以尝试卸载 xorg 或视频驱动程序,然后尝试一些较旧的版本。我想这个解决方案也不可取,但是...我没有其他想法。

还有一条关于未来的建议 - 下次考虑使用更“严肃”的 Linux 发行版,比如 SuSE Enterprise 或者 Debian 6。

答案3

我发现此列表故障排除,并可能解决您的问题。我也有同样的问题,LigthDM 会交换显示器的顺序。

相关内容