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

Screenshot of the GNOME login screen

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 GUI option to fix this, the solution is fortunately very simple, you just need to copy a single file over.

This quick tip works for any Linux flavor that uses the GNOME desktop environment with the GNOME Display Manager (GDM), including Fedora (Workstation and Silverblue), Ubuntu, Arch, EndeavourOS, et cetera.

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.

Once you've done that, open up a Terminal window, and run the following command:

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

What this does: The first part creates the destination folder if it doesn't already exist, and 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.