LightDM refuses to read monitor configuration in .config folder (monitors.xml)

I’m the proud owner of an Eluktronics RP-15 Laptop featuring an AMD Ryzen CPU with an integrated Radeon GPU and an NVIDIA RTX 2060 discrete GPU. The display outputs seem to be married to the discrete GPU and, even in Windows, fail to work until the NVIDIA drivers have been installed. My home setup consists of the laptop monitor and 2 external AOC monitors, connected through the DisplayPort and HDMI ports. All 3 monitors are aligned horizontally (one next to the other) instead of one above/bellow the other.

After spending a lot of time trying to setup reverse PRIME offload to work, I gave up and configured XOrg to use the dGPU at all times. The XOrg configuration I am using is as follows:

Section "Module"
    Load "modesetting"
    Load "nvidia"
    Load "amdgpu"
EndSection

Section "Files"
EndSection


#################
#   LAYOUT      #
#################

Section "Screen"
    Identifier          "Screen0"
    Device              "dGPU"
    Monitor             "eDP-1-1"
EndSection

Section "ServerLayout"
    Identifier          "Layout0"
    Screen              0 "Screen0" 0 0
    Option              "Xinerama" "0"
EndSection

However, this presents me with a problem: The layout displayed by LightDM is all crooked. The viewport seems to have twice the height of the monitors themselves, which causes the X cursor to be quite large, the wallpaper to stretch and the whole login screen to be scrolled just like a web page.

An apparent workaround suggested for similar issues is to copy the .config/monitors.xml file to /var/lib/lightdm/.config. Since I’m running an XFCE session, I did not have the file. However, by accident, I started a GNOME session and I noticed that the same layout corruption occurs in GNOME, which leads me to believe that it has something to do with GTK. I fixed the layout very quickly using GNOME’s display settings, which generated the appropriate monitors.xml file, which I then copied to /var/lib/lightdm/.config/monitors.xml in the hope that the issues regarding LightDM will be fixed as well.

However, due to reasons I don’t understand, that proved not to be the case. I have checked file ownership and permissions, and they seem to be ok:

-rw-r--r-- 1 lightdm lightdm 1.5K Jan 30 14:32 monitors.xml

I have tried copying the monitors.xml file to various subfolders, also without success.

Since I’m using openSUSE Tumbleweed, I only have access to greeters which are GTK-based, which does make it harder to pinpoint the issue, but it seems to be related to GTK. Weirdly enough, gdm (which is also based on GTK AFAIK) does not exhibit this behavior and displays the screen without any glitches.

So my question is: how do I get lightdm’s greeters to read the .config folder, especially the monitors.xml file? I’m reluctant to fall back to manual xrandr configuration, because it’s a dirty workaround unsuitable for a laptop (which might or might not have the external monitors attached to it).

Package versions:

  • gtk3: 3.24.24
  • gdm: 3.38.2
  • lightdm: 1.30.0
  • lightdm-gtk-greeter: 2.0.8

Answer

Attribution
Source : Link , Question Author : Vlad , Answer Author : Community

Leave a Comment