Fix wrong login screen resolution on Ubuntu 22.04/24.04

Linux & Unix Intermediate 👁 13 views 📅 Jun 18, 2026

Login screen resolution doesn't match your desktop? The fix is usually a GDM config file. Here's how to fix it and why it happens.

The fix first — no fluff

If your Ubuntu login screen shows at 1024x768 or some stretched resolution while your desktop runs at 1920x1080, you've hit a common display manager vs. desktop session mismatch. Here's the actual fix for GDM (GNOME Display Manager) on Ubuntu 22.04 and 24.04.

  1. Open a terminal — you need root access.
  2. sudo nano /etc/gdm3/monitors.xml
  3. Look for the <monitors version="1"> block. If the file doesn't exist, create it.
  4. Copy the monitors config from your user session: cp ~/.config/monitors.xml /etc/gdm3/monitors.xml
  5. Fix permissions: sudo chown root:root /etc/gdm3/monitors.xml
  6. Reboot: sudo reboot

That's it. Login screen should now match your desktop resolution. If it doesn't, read on.

Why this works

What's actually happening here is that GDM runs as a separate user (gdm) with its own session — it doesn't inherit your desktop's display settings. The display manager starts before your user session, so it needs its own monitor configuration file.

/etc/gdm3/monitors.xml is the system-wide config that GDM reads when starting. Your user's ~/.config/monitors.xml is generated by GNOME Settings when you configure displays in your desktop session. By copying your user's working config to the system location, you're telling GDM to use the same resolution, refresh rate, and scaling that your desktop already uses.

The reason step 3 (checking the file exists) is important: if GDM can't find its monitors.xml, it falls back to EDID data from the monitor, which can be wrong, missing, or report a lower resolution if the cable is loose or the GPU driver isn't fully loaded yet. Some monitors report a default resolution of 1024x768 over HDMI if the EDID block is corrupt — I've seen this with older Dell U2412M monitors.

Variations of the same problem

Wayland vs. Xorg

If you're on Wayland (default for Ubuntu 22.04+), the fix above works. But some NVIDIA users on Wayland have reported that GDM still shows the wrong resolution even after copying monitors.xml. What's happening there is that the NVIDIA proprietary driver's DRM (Direct Rendering Manager) component doesn't fully support Wayland's modesetting — it's a known pain point. The workaround:

sudo nano /etc/gdm3/custom.conf
# Uncomment the line:
# WaylandEnable=false
# Change it to:
WaylandEnable=false

This forces GDM to run under Xorg, which handles resolution switching much more reliably with NVIDIA cards. You'll lose Wayland in your desktop session too, but for many NVIDIA users, the stability tradeoff is worth it.

LightDM (Ubuntu MATE, Xubuntu, Lubuntu)

LightDM stores its resolution config differently. For LightDM:

sudo nano /etc/lightdm/lightdm.conf

[Seat:*]
display-setup-script=/usr/bin/xrandr --output HDMI-1 --mode 1920x1080 --rate 60

You need to know your output name and supported modes. Run xrandr in your desktop session to list them. This script runs before the greeter appears, so the login screen uses whatever you set. Less elegant than monitors.xml, but works.

Fractional scaling

If you use fractional scaling (125%, 150%, 175%), the login screen might look blurry or too small. GDM before Ubuntu 24.04 didn't support fractional scaling on the login screen at all. The fix: set your display to 100% scaling before locking or logging out, then adjust scaling after login. Annoying, I know. Ubuntu 24.04 added basic fractional scaling support in GDM, but it's still experimental — expect occasional blurriness.

Multiple monitors

With two monitors, the login screen might mirror both at the lower resolution or blank one. The monitors.xml fix handles this — it preserves your layout (primary display, position, scale). But if one monitor isn't detected at login, check the cable. DisplayPort cables are picky about bandwidth; a cheap cable can cause the monitor to fall back to 640x480 until the desktop session loads the driver fully.

Prevention — don't let it happen again

Once you've fixed it, the resolution should stick across reboots unless something changes your monitor's EDID or you update the GPU driver. But there are two common scenarios that'll reset it:

  1. Kernel or driver updates — sometimes they regenerate the display configuration during boot. If the login resolution breaks after an update, re-run the cp command above. Check /var/log/gdm3/ for errors if it still fails.
  2. Switching to a different display (like going from a home monitor to a projector) — GDM doesn't re-read monitors.xml on the fly. If you plug in a different display and reboot, the login screen might use the old config. Solution: before rebooting, run sudo cp ~/.config/monitors.xml /etc/gdm3/monitors.xml after you've set up the new display in your desktop session.

One more thing: if you're using a laptop with an external monitor, and the laptop lid is closed, GDM might still try to use the internal display at login. You can disable the internal display in /etc/gdm3/monitors.xml by setting its <enabled> tag to no. I've seen this trip up ThinkPad users docking and undocking — the login screen appears on the blank laptop screen instead of the external monitor.

Final opinion: the whole "separate display manager config" design is a relic from the 1990s when X11 didn't support per-user display settings. It needs to die. But until it does, copying your monitors.xml is the cleanest workaround.

Was this solution helpful?