Correctly set resolution, scale, orientation, and display placement at login with GNOME

Correctly set resolution, scale, orientation, and display placement at login with GNOME

If you have a multi display setup, make use of scaling, or have a display that defaults to its non-native resolution, you might have run into the situation where your GNOME login screen is not showing up the way you want it to.

While there is no built-in GUI option to do this, the solution is fortunately quite simple. You just need to copy a single configuration file.

💡
Mazhar Hussain has developed a very nice looking application called GDM Settings that lets you customize a whole bunch of settings, including applying your current user's display settings system-wide (Display > Apply current display settings). It's available as an AppImage through its website and as a Flatpak via Flathub.

Before you copy this file, make sure you set up your display(s) exactly how you want them by logging in to your account and opening up the Displays section in Settings. Configure everything the way you want it to be now before proceeding.

Screenshot of the GNOME Settings app, showing the Displays panel with two monitors aligned horizontally.

One note for those of you who might frequently connect and disconnect additional monitor(s); be sure configure everything the way you like at every stage, ensuring your resolution, scaling, and placement is correct both when no additional displays are connected, as-well as when they are. All these individual states are preserved in your monitor configuration, so it'll be good to do this now.


💡
A reader wrote in to let me know that the GDM configuration path may vary depending on your distribution. I've updated my guide to reflect this.

The default path for the GDM configuration directory is /var/lib/gdm/.config, but some distributions may use /var/lib/gdm3/.config instead. Please check what your distribution/configuration uses by checking if your system has the /var/lib/gdm or /var/lib/gdm3 directory.

Once you've established which path your particular system uses, you can now proceed with the command relevant to your particular system.

If your system uses the /var/lib/gdm directory

❯ sudo mkdir -p /var/lib/gdm/.config && sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/monitors.xml

If your system uses the /var/lib/gdm3 directory

❯ sudo mkdir -p /var/lib/gdm3/.config && sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/monitors.xml

What this does: The first part creates the .config folder if it doesn't already exist. Then the second part copies your user's monitors.xml configuration file over to where your system looks for the system-wide default.

From now on your system will use whatever resolution(s), orientation, scaling, and display placement you have configured at the login screen, too. Nice, right?


While I'm not sure why this isn't something that's handled more gracefully out of the box, at least it's pretty easy to configure by yourself.

Enjoy!