You are not logged in.

#1 2025-09-24 06:47:18

zu0107
Member
From: South Korea
Registered: 2017-05-02
Posts: 10
Website

GDM does not respect my monitors.xml file

My primary display is currently in portrait mode, so I need to rotate the display 90 degrees to the left.
According to the ArchWiki, I should be able to copy my existing monitor.xml file:

Some desktop environments store display settings in ~/.config/monitors.xml. xrandr commands are then generated on the base of the file content. GDM has a similar file stored in /var/lib/gdm/.config/monitors.xml.

If you have your monitors setup as you like (resolution, refresh rate, orientation, scaling, primary and so on) in ~/.config/monitors.xml and want GDM to honor those settings:

# cp /home/user/.config/monitors.xml /var/lib/gdm/.config/

I've followed the direction, but I still see that the screen remains in the landscape mode, unlike what my monitors.xml file is configured to.

I've confirmed that:

  • the monitors.xml file works fine on my GNOME desktop

  • GNOME is running under Wayland, and the monitors.xml is based on Wayland GNOME

Is there anything I am missing here?

Offline

#2 2025-09-24 10:02:04

alex1124
Member
Registered: 2025-09-24
Posts: 2

Re: GDM does not respect my monitors.xml file

This seems to be due to the gdm user not being automatically created during the gdm installation, causing GDM to lack permissions to read the /var/lib/gdm directory. The issue appears to be in /usr/lib/sysusers.d/gdm.conf, you should check if this content is present:

 g gdm 120 - 

This indicates that only the gdm user group was created, but not the gdm user.
In theory, you can manually create the gdm user and set its user directory to /var/lib/gdm to solve the problem, but I have not been successful.

Offline

#3 2025-09-25 13:02:02

zu0107
Member
From: South Korea
Registered: 2017-05-02
Posts: 10
Website

Re: GDM does not respect my monitors.xml file

I've added my own entry to /etc/sysusers.d/gdm.conf with the following content to create a gdm user, but the problem still persists.

u! gdm 120 - /var/lib/gdm

I even made the /var/lib/gdm directory owned by the newly-created gdm user but the problem still persists. Not sure where to go from here.

Offline

#4 2025-09-25 14:13:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,177

Re: GDM does not respect my monitors.xml file

ls -ld /var /var/lib /var/lib/gdm /var/lib/gdm /var/lib/gdm/.config /var/lib/gdm/.config/monitors.xml

Offline

#5 2025-09-26 21:01:20

pampar
Member
Registered: 2025-09-25
Posts: 5

Re: GDM does not respect my monitors.xml file

Hi! I came over from a different thread I created about a similar issue,  I won't go into the details about my current setup here again.

Continuing that thread

I set global execution perms on /var/lib/gdm/.config and verified that gdm-greeter had read perms on monitors.xml by running

sudo -u gdm-greeter cat /var/lib/gdm/.config/monitors.xml

Rebooted, the config still wasn't applied.

seth wrote:

For clarification: you've been running on X11 before so this might have been some X11 server config as well?

Honestly I'm not sure. As I said in the original thread, this config works on user sessions that say they are wayland, however, it only worked on the login screen when I disabled wayland for gdm in /etc/gdm/custom.conf (back on gnome 48) so it's confusing.
Here's a sample if it helps:

<monitors version="2">
  <configuration>
    <layoutmode>physical</layoutmode>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <monitor>
        <monitorspec>
          <connector>HDMI-2</connector>
          <vendor>GSM</vendor>
          <product>LG TV</product>
          <serial>0x01010101</serial>
        </monitorspec>
        <mode>
          <width>3840</width>
          <height>2160</height>
          <rate>60.000</rate>
        </mode>
      </monitor>
    </logicalmonitor>
    <logicalmonitor>
      <x>0</x>
      <y>2160</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>HDMI-1</connector>
          <vendor>GSM</vendor>
          <product>LG IPS FULLHD</product>
          <serial>0x01010101</serial>
        </monitorspec>
        <mode>
          <width>1920</width>
          <height>1080</height>
          <rate>60.000</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
  [...]
</monitors>
Some other findings

I checked the env of the greeter's session process (/usr/lib/gdm-wayland-session) as root (formatted and truncated the output a bit):

$ cat /proc/7678/environ
HOME=/run/gdm/home/gdm-greeter
PATH=/usr/local/bin:/usr/bin
USER=gdm-greeter
XDG_RUNTIME_DIR=/run/user/60579
DCONF_PROFILE=gdm
GDM_SEAT_ID=seat0
GDM_SUPPORTED_SESSION_TYPES=wayland:x11
GDM_VERSION=49.0.1
GIO_USE_VFS=local
GNOME_SHELL_SESSION_MODE=gdm
PWD=/run/gdm/home/gdm-greeter
RUNNING_UNDER_GDM=true
SHELL=/usr/bin/nologin
USERNAME=gdm-greeter
XDG_CONFIG_HOME=/var/lib/gdm/seat0/config
XDG_CURRENT_DESKTOP=GNOME-Greeter:GNOME
XDG_DATA_DIRS=/usr/share/gdm/greeter:/usr/share:/usr/local/share/:/usr/share/
XDG_MENU_PREFIX=gnome-
XDG_SESSION_CLASS=greeter
XDG_SESSION_TYPE=wayland
XDG_STATE_HOME=/var/lib/gdm/seat0/state

Checked the $HOME dir, there was a .config directory, but no monitors.xml in it.
Checked $XDG_CONFIG_HOME, the correct monitors.xml was there with perms:
-rw-r--r-- 1 gdm-greeter nobody
verified with sudo that gdm-greeter can read it.

For reference here is the env for the same process of a logged in user session (also formatted, truncated):

XDG_SEAT=seat0
LOGNAME=pampar
USER=pampar
USERNAME=pampar
HOME=/home/pampar
PWD=/home/pampar
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin
XDG_SESSION_TYPE=wayland
XDG_VTNR=2
XDG_SESSION_ID=9
XDG_SESSION_CLASS=user
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MOTD_SHOWN=pam
XDG_CURRENT_DESKTOP=GNOME
GDMSESSION=gnome
DESKTOP_SESSION=gnome
XDG_SESSION_DESKTOP=gnome

Offline

#6 2025-09-27 14:09:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,177

Re: GDM does not respect my monitors.xml file

XDG_CONFIG_HOME=/var/lib/gdm/seat0/config

Do you have more luck w/ /var/lib/gdm/seat0/config/monitors.xml then?

Offline

#7 2025-09-27 14:19:10

pampar
Member
Registered: 2025-09-25
Posts: 5

Re: GDM does not respect my monitors.xml file

No, it is there, but it doesn't get applied I guess.

Is it possible, that mutter, or xorg-xwayland does some sort of "translation" that makes it so my user session is actually x on wayland and that's why the config works, while the greeter is on normal wayland without this translation and that's why it doesn't get applied?
Do you have an idea how I could check that?

Thanks!

Offline

#8 2025-09-27 17:22:38

kk75
Member
Registered: 2025-09-27
Posts: 2

Re: GDM does not respect my monitors.xml file

seth wrote:

XDG_CONFIG_HOME=/var/lib/gdm/seat0/config

Do you have more luck w/ /var/lib/gdm/seat0/config/monitors.xml then?

For me it worked.

# cp /home/user/.config/monitors.xml /var/lib/gdm/seat0/config/
# chown gdm:gdm /var/lib/gdm/seat0/config/monitors.xml

Now I have my login in the right monitor with correct resolution in Gnome 49 under Wayland.
Thank you.

Last edited by kk75 (2025-09-27 17:32:16)

Offline

#9 2025-09-27 17:55:48

pampar
Member
Registered: 2025-09-25
Posts: 5

Re: GDM does not respect my monitors.xml file

Also tried it, for me it still doesn't work sadly.

# set perms
chown :gdm /var/lib/gdm/seat0/config
chmod g+x /var/lib/gdm/seat0/config
# verify
sudo -u gdm cat /var/lib/gdm/seat0/config/monitors.xml
# Logged out of user, on lock screen it's still wrong

Afterwards I logged back in to set the perms back, but i found that /var/lib/gdm/seat0/config/ had it's perms reset already to drwx------, the owner userid changed from 60578 to 60579 and the gdm group was changed back to nobody.
I believe this is because gnome 49 uses systemd dynamic users for the greeter:
https://blogs.gnome.org/adrianvovk/2025 … endencies/
https://linuxiac.com/gnome-49-will-requ … tegration/

Offline

#10 2025-09-28 07:25:18

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,177

Re: GDM does not respect my monitors.xml file

The dynamic UID should™ not systematically lead to an inaccessible /var/lib/gdm/*/* ?
Have you tried to own /var/lib/gdm/seat0/config/monitors.xml to the GDM user/group?

Offline

#11 2025-09-28 12:16:59

pampar
Member
Registered: 2025-09-25
Posts: 5

Re: GDM does not respect my monitors.xml file

Tried it right now, as soon as the greeter comes on, the owner gets reset to gdm-greeter:nobody. (I'm using an ssh session from a different computer to check this.)
Running id on gdm-greeter I see that it's group is gdm, so I'd think that instead of nobody, this automatic chown should set the owner group to gdm as well? Altough that wouldn't help with /var/lib/gdm/seat0/config getting it's perms reset to drwx------ automatically...
Can someone with a working gnome 49 install confirm for me what the owners should be on /var/lib/gdm/seat0/config/* please?
For me:

$ ls -ld /var/lib/gdm/ /var/lib/gdm/seat0/ /var/lib/gdm/seat0/config/ /var/lib/gdm/seat0/config/*
drwxr-xr-x 1 root        root    230 Sep 24 18:40 /var/lib/gdm/
drwxr-xr-x 1 root        root     22 Sep 24 18:40 /var/lib/gdm/seat0/
drwx------ 1 gdm-greeter nobody  196 Sep 24 18:40 /var/lib/gdm/seat0/config/
drwxr-xr-x 1 gdm-greeter nobody    8 Sep 24 18:40 /var/lib/gdm/seat0/config/dconf
drwxr-xr-x 1 gdm-greeter nobody   26 Sep 24 18:40 /var/lib/gdm/seat0/config/gnome-session
drwxr-xr-x 1 gdm-greeter nobody    6 Sep 24 18:40 /var/lib/gdm/seat0/config/ibus
-rw-r--r-- 1 gdm-greeter nobody 6132 Sep 22 01:03 /var/lib/gdm/seat0/config/monitors.xml
drwxr-xr-x 1 gdm-greeter nobody   12 Sep 24 18:40 /var/lib/gdm/seat0/config/pulse
-rw------- 1 gdm-greeter nobody  633 Feb  5  2025 /var/lib/gdm/seat0/config/user-dirs.dirs
-rw-r--r-- 1 gdm-greeter nobody    1 Feb  5  2025 /var/lib/gdm/seat0/config/user-dirs.locale

Last edited by pampar (2025-09-28 12:19:12)

Offline

#12 2025-09-28 15:45:08

kk75
Member
Registered: 2025-09-27
Posts: 2

Re: GDM does not respect my monitors.xml file

This is my result:

# ls -ld /var/lib/gdm/ /var/lib/gdm/seat0/ /var/lib/gdm/seat0/config/ /var/lib/gdm/seat0/config/*
drwxr-xr-x 15 root  root   4096 Sep 23 22:53 /var/lib/gdm/
drwxr-xr-x  4 root  root   4096 Sep 23 22:53 /var/lib/gdm/seat0/
drwx------  6 60578 nobody 4096 Sep 23 23:33 /var/lib/gdm/seat0/config/
drwxr-xr-x  2 60578 nobody 4096 Sep 23 22:53 /var/lib/gdm/seat0/config/dconf
drwxr-xr-x  3 60578 nobody 4096 Sep 23 22:53 /var/lib/gdm/seat0/config/gnome-session
drwxr-xr-x  3 60578 nobody 4096 Sep 23 22:53 /var/lib/gdm/seat0/config/ibus
-rw-r--r--  1 60578 nobody 1027 Sep 27 18:44 /var/lib/gdm/seat0/config/monitors.xml
-rw-r--r--  1 60578 nobody  989 Dec 17  2023 /var/lib/gdm/seat0/config/monitors.xml~
drwx------  2 60578 gdm    4096 Sep 23 23:33 /var/lib/gdm/seat0/config/pulse
-rw-------  1 60578 nobody  633 Apr 30  2023 /var/lib/gdm/seat0/config/user-dirs.dirs
-rw-r--r--  1 60578 nobody    5 Apr 30  2023 /var/lib/gdm/seat0/config/user-dirs.locale

When I copied my /home/user/.config/monitors.xml to /var/lib/gdm/seat0/config/, I changed owner to gdm:gdm.
After a reboot it was automatically changed to 60578:nobody, but it works.

Offline

#13 2025-10-06 09:20:57

cbrnr
Member
Registered: 2016-11-15
Posts: 18

Re: GDM does not respect my monitors.xml file

I think the old mechanism of copying a custom monitors.xml to /var/lib/gdm/.config/ does not work anymore with GNOME 49, because they removed the static gdm user (https://gitlab.archlinux.org/archlinux/ … 58f577140c). However, I have no idea how to use a custom monitor configuration now. It doesn't make sense to me to still put the config into /var/lib/gdm, so I'm hoping that there is a new recommended way to do that.

Last edited by cbrnr (2025-10-06 09:22:13)

Offline

#14 2025-10-06 12:54:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,177

Offline

Board footer

Powered by FluxBB