{"id":43281,"date":"2022-11-03T15:45:46","date_gmt":"2022-11-03T15:45:46","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=43281"},"modified":"2026-04-13T14:05:08","modified_gmt":"2026-04-13T14:05:08","slug":"login-screen-external-monitor-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/11\/login-screen-external-monitor-ubuntu\/","title":{"rendered":"Display Login Screen in External Monitor in Ubuntu 26.04, 24.04, 22.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-34682\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature-250x250.png\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2017\/10\/gnome-logo-feature.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>Have multiple monitors connected into your Ubuntu machine? Here&#8217;s the quick tip shows you how to configure which one to display the login screen.<\/p>\n<p>It&#8217;s quite easy to set primary display in Ubuntu with default GNOME desktop. However, the login screen is always sticking to the built-in display in my laptop. In case you use the external monitor for the most time, you may also <i>set it as primary display for the GDM login screen<\/i> by following this tutorial.<\/p>\n<p><b>NOTE: This tutorial is tested only in Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 26.04 with default GNOME desktop! Though, it may also work in other Linux with GNOME (e.g., Fedora, Debian and Arch) or Linux with GDM display manager.<\/b><\/p>\n<h3>Step 1: Set Primary Display in Gnome Control Center<\/h3>\n<p>First of all, open <b>Settings<\/b> (aka Gnome Control Center) from the top-right corner system tray menu.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-opensettings.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-47615\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-opensettings-300x221.webp\" alt=\"\" width=\"300\" height=\"221\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-opensettings-300x221.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-opensettings.webp 569w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Then, navigate to <b>Displays<\/b> in the left, and choose the monitor in the right you want to use it as primary.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-switchdisplay.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47617\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-switchdisplay-700x465.webp\" alt=\"\" width=\"610\" height=\"405\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-switchdisplay-700x465.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-switchdisplay-300x199.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-switchdisplay-768x510.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/gnome-switchdisplay.webp 1038w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>This step is required to generate a XML config file under user&#8217;s &#8216;<code>.config<\/code>&#8216; folder. Though, you may switch to another display as primary at anytime as you want.<\/p>\n<h3>Step 2: Apply Primary Display for GDM Login Screen<\/h3>\n<p>As mentioned above, the previous step generates a XML config file automatically. By copying the file into GDM&#8217;s config folder will make it also work for the login screen.<\/p>\n<p>To do so, press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal. Then, run command:<\/p>\n<pre>sudo cp ~\/.config\/monitors.xml \/var\/lib\/gdm3\/.config\/<\/pre>\n<p><b>UPDATE: For Ubuntu 26.04 with GNOME 50, run this command instead:<\/b><\/p>\n<pre>sudo cp ~\/.config\/monitors.xml \/var\/lib\/gdm3\/seat0\/config\/<\/pre>\n<p><i>Type user password (no asterisk feedback) when it asks and hit Enter. <b>And, other Linux (e.g., Fedora) may need to replace <code>gdm3<\/code> with <code>gdm<\/code> in last command.<\/b><\/i><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/copy-monitor-config.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43283\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/copy-monitor-config-600x139.webp\" alt=\"\" width=\"600\" height=\"139\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/copy-monitor-config-600x139.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/copy-monitor-config-300x70.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/copy-monitor-config-768x179.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/copy-monitor-config.webp 770w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Now, save your work and log out to see the magic!<\/p>\n<h2>(Optional) Disable the built-in display on startup<\/h2>\n<p>Another annoying thing when using multiple monitor in Ubuntu Linux is that the Grub boot menu screen is always displaying in built-in monitor. I can&#8217;t figure out how to make it work in external screen as it seems to be responsible to BIOS.<\/p>\n<p>However, you can disable the built-in display on startup and use the external screen only by adding a Kernel parameter.<\/p>\n<p><b>NOTE: After this step, Grub boot-menu still shows in built-in display, though it goes always blank after that, even after disconnected the external monitor.<\/b><\/p>\n<p>1. First, boot up and log into your Ubuntu desktop. Open terminal by pressing <b>Ctrl+Alt+T<\/b> shortcut on keyboard.<\/p>\n<p>2. Disconnect the external monitor, and run command to <b>get the device ID<\/b> of built-in display:<\/p>\n<p><code>for p in \/sys\/class\/drm\/*\/status; do con=${p%\/status}; \\<br \/>\necho -n \"${con#*\/card?-}: \"; cat $p; done<\/code><\/p>\n<p>Some said the last command does not work. If so, you may run command below instead. Usually, the first one is the ID of built-in display.<\/p>\n<pre>cat ~\/.config\/monitors.xml |grep connector<\/pre>\n<p>Or, just log out and choose login via &#8216;Ubuntu on Xorg&#8217; via bottom right gear button. And, run <code>xrandr -q<\/code> to see the display device name.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/verify-displayid.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43284\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/verify-displayid-600x242.webp\" alt=\"\" width=\"600\" height=\"242\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/verify-displayid-600x242.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/verify-displayid-300x121.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/verify-displayid-768x310.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/verify-displayid.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>3. Re-connect your external monitor, and run command to edit the configuration file for Grub:<\/p>\n<pre>sudo gedit \/etc\/default\/grub<\/pre>\n<p>Replace <b>gedit<\/b> with <b>gnome-text-editor<\/b> for Ubuntu 24.04 or use <b>nano<\/b> that works in most Linux. When file opens, add <b>video=eDP-1:d<\/b> as value of &#8216;GRUB_CMDLINE_LINUX_DEFAULT&#8217;. So the line will look like:<\/p>\n<p><code>GRUB_CMDLINE_LINUX_DEFAULT=\"quite splash video=eDP-1:d\"<\/code><\/p>\n<p>Here &#8216;<b>d<\/b>&#8216; tells to disable the device. Though, you have to replace <b>eDP-1<\/b> with your device name according to what you got in last step.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/disable-monitor.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43285\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/disable-monitor-600x294.webp\" alt=\"\" width=\"600\" height=\"294\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/disable-monitor-600x294.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/disable-monitor-300x147.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/disable-monitor-768x376.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/disable-monitor.webp 866w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>After saving the change, run <b>sudo update-grub<\/b> to reload the Grub settings and done!<\/p>\n<p>In addition, you may add <b>video=Device-Name:e<\/b> or <b>video=Device-Name:D<\/b> kernel parameter to force enable external monitor on startup if need.<\/p>","protected":false},"excerpt":{"rendered":"<p>Have multiple monitors connected into your Ubuntu machine? Here&#8217;s the quick tip shows you how to configure which one to display the login screen. It&#8217;s quite easy to set primary display in Ubuntu with default GNOME desktop. However, the login screen is always sticking to the built-in display in my laptop. In case you use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34682,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[780],"class_list":["post-43281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-gdm"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=43281"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43281\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34682"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=43281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=43281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=43281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}