GDM: How do I configure which monitor the login window should be on?

In Ubuntu 24.04 with the Gnome version installed by default, how do I configure the monitor that GDM should use for the login window?

The default is currently the least convenient monitor in my system. I also dual boot with windows, and I want the same monitor to have the login prompt so switching where monitors are plugged in gets more confusing.

Changing which monitor gets the menus after login doesn’t change which monitor gets the login window.

I looked around and found where many configurations are set, but not this particular one.

You could try copying ~/.config/monitors.xml to /etc/xdg/monitors.xml.

Thanks for pointing to those two files. I’ll see if any change there can change the login monitor.

The login screen will show up on the primary monitor, i.e. the monitor configured to show the panel in a regular session.

Sebastian,

The file ~/.config/monitors.xml is written AFTER logging in as is apparent when looking at the creation time. It also contains no information about which monitor to use for the login window.

On Windows, it is true that setting a choice for the primary monitor also sets where the login window appears. However on Linux, those two choices are separate.

More info about my setup. The graphics board/GPU is an Nvidia Quadro M2000, which is a few years old. The computer is a repurposed Lenovo that was taken out of data center service.

The panel on the board is labeled with number 0-3, with the monitor on hardware port 0 getting any Bios boot up messages. I want that port to be the primary monitor for loging. I have 3 monitors connected and the other two stay black during boot.

The Nvidia driver, the 580 version on both Win 11 and on Ubuntu, generates monitor numbers in the reverse order from the hardware port numbers. On Ubuntu, the gdm login window is showing up on driver mapped port 1, which is hardware port 2.

Once past the login window on Ubuntu, I do have the hardware port 0 monitor set as the primary display, but that selection doesn’t change where the login window appears. The two functions are controlled separately.

~/.config/monitors.xml is the per-user one, it can’t affect things like the login screen, that’s why you need to copy it to the system-wide location in /etc/xdg/.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.