{"id":67,"date":"2025-04-17T15:49:42","date_gmt":"2025-04-17T13:49:42","guid":{"rendered":"https:\/\/linuxundich.de\/en\/?p=67"},"modified":"2026-10-03T21:49:47","modified_gmt":"2026-10-03T19:49:47","slug":"gdm-login-screen-showing-up-on-the-wrong-monitor","status":"publish","type":"post","link":"https:\/\/linuxundich.de\/en\/gnu-linux\/gdm-login-screen-showing-up-on-the-wrong-monitor\/","title":{"rendered":"GDM login screen showing up on the wrong monitor?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When I connect my laptop to an external monitor and set it as the primary display, this usually works without a hitch under GNOME. The desktop remembers the monitor selection, and the next time I boot, everything is set up the way I want it. What has bugged me for a long time, though: the login screen regularly shows up on the wrong monitor, so not where I would expect it. Even when I have defined the external screen as the main display in the display settings, GDM completely ignores that.<\/p>\n\n\n\n<div><figure data-wp-context='{\"imageId\":\"6ac183cfd6d97\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6ac183cfd6d97\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/04\/gdm-beispiel-1280x790.webp\" alt=\"GDM is functional but plain, and unfortunately not very flexible. Without configuration, the login screen likes to show up on the wrong monitor.\" class=\"wp-image-44372\" style=\"width:100%\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">GDM is functional but plain, and unfortunately not very flexible. Without configuration, the login screen likes to show up on the wrong monitor.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">It gets especially annoying when the monitor GDM uses for the login isn\u2019t even turned on. Then the screen stays black and I\u2019m fumbling around in the dark until I open the laptop lid or figure out which monitor is the right one. Apparently GDM uses its own configuration, which has nothing to do with the display settings of the GNOME session. In the <a href=\"https:\/\/wiki.archlinux.org\/title\/GDM#Setup_default_monitor_settings\">Arch Linux wiki<\/a> I came across a solution that fixes this behavior reliably, and it works on other distributions as well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why GDM uses the wrong monitor<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The problem typically shows up on systems with multiple screens, especially when proprietary graphics drivers such as Nvidia\u2019s are in use. GNOME stores the screen layout per user in a file called <code>monitors.xml<\/code> in the directory <code>~\/.config<\/code>. GDM, on the other hand, uses its own configuration in the context of the <code>gdm<\/code> user. Since this file is not automatically synced with the one of your main user when the system is set up, the login screen can end up on the wrong screen, and stay there.<\/p>\n\n\n\n<div><figure data-wp-context='{\"imageId\":\"6ac183cfd8970\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6ac183cfd8970\" class=\"wp-block-image size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/04\/meld-monitors.webp\" alt=\"GNOME and GDM manage the screen configuration separately. GDM uses its own monitors.xml and completely ignores user settings.\" class=\"wp-image-44375\" style=\"width:100%\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">GNOME and GDM manage the screen configuration separately. GDM uses its own monitors.xml and completely ignores user settings.<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Manual solution: copy your display settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The easiest way to teach GDM the right monitor configuration is to copy the <code>monitors.xml<\/code> file from your home directory to the GDM configuration directory.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>First, set up the screen configuration you want in GNOME.<\/strong> Open the display settings via:<\/li>\n\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;gnome-control-center display&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pick your preferred main screen and arrange the monitors as you like. The changes are saved automatically in your home directory under <code>~\/.config\/monitors.xml<\/code>.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n\n<li><strong>Copy the file to the GDM home directory:<\/strong><\/li>\n\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;sudo install -o root -m 644 ~\/.config\/monitors.xml ~gdm\/.config\/&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The system correctly interprets the home directory of the GDM user <code>~gdm<\/code> here.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n\n<li><strong>Restart GDM<\/strong> so the new configuration is picked up. Careful: this ends your current GNOME session without warning:<\/li>\n\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;sudo systemctl restart gdm&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After the restart, the login screen should show up on the monitor you want.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Automated solution: with a systemd service<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you often work with different monitor setups or simply prefer a permanent solution, you can automate copying the file at boot.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>Create the directory for the systemd override:<\/strong><\/li>\n\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;sudo mkdir -p \/etc\/systemd\/system\/gdm.service.d&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n\n<li><strong>Create a new configuration file <code>override.conf<\/code> with the following content:<\/strong><\/li>\n\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;#91;Service]\nExecStartPre=\/bin\/sh -c 'install -o root -m 644 \/home\/EUER_NUTZER\/.config\/monitors.xml ~gdm\/.config\/monitors.xml || true'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>EUER_NUTZER<\/code> with your actual user name.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n\n<li><strong>Reload the systemd configuration:<\/strong><\/li>\n\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ &lt;strong&gt;sudo systemctl daemon-reexec&lt;\/strong&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The next time GDM starts, the file is picked up automatically.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Even easier: with the graphical GDM Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Last but not least, there is a graphical alternative. With the app <a href=\"https:\/\/gdm-settings.github.io\">GDM Settings<\/a> you can configure many details of the login manager, including applying your display settings. Simply with a mouse click and without the command line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The app is not an official GNOME tool and usually isn\u2019t in the repositories either. You can install it without trouble via <a href=\"https:\/\/flathub.org\/apps\/io.github.realmazharhussain.GdmSettings\">Flathub<\/a>, though. Pay attention to the warning on first launch: use at your own risk. Many options change system files, which can cause problems in individual cases, but as a rule everything works as intended.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the screen configuration of the currently logged-in user, open Display in the sidebar and click Apply Current Display Settings [CHECK: exact English label]. There is no automatic transfer for changing setups here, though. If you use your laptop regularly between the office and a home office, each with a different monitor configuration, the systemd variant described above is possibly the better choice.<\/p>\n\n\n\n<div><figure data-wp-context='{\"imageId\":\"6ac183cfdba61\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6ac183cfdba61\" class=\"wp-block-image size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/04\/gdm-settings-erscheinungsbild.webp\" alt=\"With GDM Settings you can configure many details, for example theme, wallpaper, or automatic login.\" class=\"wp-image-44374\" style=\"width:100%\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">With GDM Settings you can configure many details, for example theme, wallpaper, or automatic login.<\/figcaption><\/figure><\/div>\n\n\n\n<div><figure data-wp-context='{\"imageId\":\"6ac183d02f40c\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6ac183d02f40c\" class=\"wp-block-image size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2025\/04\/gdm-settings-anzeige.webp\" alt=\"In the Display section, one click transfers your user's current screen configuration to GDM.\" class=\"wp-image-44373\" style=\"width:100%\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">\nIn the Display section, one click transfers your user\u2019s current screen configuration to GDM.<\/figcaption><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If the GDM login screen shows up on the wrong monitor, copying the display settings from your GNOME session usually fixes it. You can do that by hand, automatically with systemd, or conveniently via GUI.<\/p>\n","protected":false},"author":2,"featured_media":66,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"lui_source_id":44371,"lui_source_hash":"bea05757f0c68be00b2f44ccf8513f1a1bb572b52854e2c9a0afd9803c33a8ef","lui_source_translated":"2026-10-03","lui_source_reviewed":true,"lui_via_url":"","lui_via_label":"","lui_source_url":"","lui_source_label":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gnu-linux"],"_links":{"self":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":1,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/67\/revisions\/77"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media\/66"}],"wp:attachment":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}