84

On Ubuntu 18.04, I have connected my laptop to an external display and I am able to set the external display as primary and external display only mode. But when I turn on my laptop or log out from my session the display login screen is displayed only on my(internal) laptop screen. But once I login the display switches to external only and my laptop screen turns off as expected.

Is there a way I can make the login screen appear only on the external screen on bootup or on logout as in 16.04? Also the login screen does not follow my cursor as in 16.04.

1
  • 1
    To anyone affected by this bug: please comment on or upvote the upstream bug report against GDM3, so that the developers know this issue is important
    – ntc2
    Jan 18, 2019 at 17:03

3 Answers 3

105

This is a known and reported bug with gdm3. The current workaround appears to be:

  1. Go into Settings > Devices > Displays and configure your monitors the way you want for your login screen (in your case, internal laptop display disabled). Click the "Save" button when done.
    (Note: Changing this setting with an alternate desktop environment—such as Cinnamon—may not propagate the intended change.)
  2. Copy your user's monitors.xml file into the home folder for gdm user.

To copy the monitors.xml file, open a terminal and perform the following:

sudo cp ~/.config/monitors.xml ~gdm/.config/monitors.xml
sudo chown gdm:gdm ~gdm/.config/monitors.xml

Then, reboot and see if your changes persist. If this doesn't work, try going through the whole process again. It took me two times in order to get it to stick. I was also able to reboot with my external display disconnected and it switched back to my internal laptop display. I rebooted again and reconnected it and it switches back to my external monitor.

Hope this helps!

10
  • Thank you for your suggestion. For some reason it’s not sticking to the external display on boot up, tried about 4 times. Will wait for the bug to be resolved.
    – Aravind
    Jun 5, 2018 at 1:27
  • It works for me.
    – jdthood
    Oct 17, 2018 at 7:24
  • To me the terminal statements were enough to fix the issue. This means that I didn't executed the second part from the Aravind answer. Thanks Damian. Still I don't get WHY this isn't resolved by Ubuntu itself after so many years.
    – José Cabo
    Mar 13, 2020 at 17:01
  • 3
    +1 Thank you - with Ubuntu 20.04 I found this solution to work. This and the currently accepted answer ( askubuntu.com/a/1048966/7072 ) are almost the same steps. In my situation I have three monitors, one of them is connected via a StarTech USB3 to HDMI running with DisplayLink driver. Initially the screen I wanted for login was the case but strangely for a reason I don't know, the login was displayed on one of the other screens. Doing your solution appears to have fixed the issue in my case. I rebooted and the screen I wanted the login to appear is still as required. May 26, 2020 at 2:40
  • 1
    This solution worked on my Ubuntu 20.04 computer, with 3 DisplayPort screens. Jul 11, 2020 at 18:37
39

This Solved my Isuue:

Go into Settings > Devices > Displays and configure your monitors the way you want for your login screen (in your case, internal laptop display disabled). Click the "Save" button when done.

Copy your user's monitors.xml file into the home folder for gdm user.

To copy the monitors.xml file, open a terminal and perform the following:

sudo cp ~/.config/monitors.xml ~gdm/.config/monitors.xml
sudo chown gdm:gdm ~gdm/.config/monitors.xml

And in the /etc/gdm3/custom.conf uncomment WaylandEnable=false

8
  • 15
    How is this answer different from Damian T.'s answer? Oct 29, 2018 at 15:40
  • 2
    This is the only answer that made the login screen appear on my external monitor. However, when I actually logged in, I only got a black screen and had to recovery-mode to undo the WaylandEndable=false.
    – drhagen
    Feb 20, 2019 at 13:44
  • 1
    DO NOT DO THIS!!! you will loose ability to login (blank screen and kick back to login) until you undo changes in /etc/gdm3/custom.conf Jun 28, 2020 at 20:10
  • 1
    In my case (Ubuntu 20.04) that really helped. I had to uncomment WaylandEnable=false. Jul 9, 2020 at 19:18
  • 1
    @TechEmperor95, had the same trouble and found out that you have to configure monitors specifically in x11 session before coping monitors.xml - Waylang and X-server has different settings
    – Leonid
    Jun 15, 2022 at 19:18
37

I too have an external monitor. This worked for me:

  • Set your display mode as desired using Settings > Devices > Displays

  • Open a terminal window by pressing CtrlAltT and then type:

    sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config

  • Hit Enter

  • Reboot the computer

9
  • 2
    This was the only answer that worked for me on Ubuntu 18... this folder actually exists unlike /home/gdm
    – finsbury
    Oct 20, 2018 at 15:05
  • 6
    /var/lib/gdm3 is ~gdm , its gdm's home directory. Services user accounts don't usually get home directories in /home .
    – Amias
    Jan 5, 2019 at 15:41
  • 1
    cp: cannot create regular file '/var/lib/gdm/.config': No such file or directory; cp: cannot create regular file '/var/lib/gdm3/.config': No such file or directory; cp: cannot create regular file '~gdm/.config': No such file or directory; Great. Where has the folder moved in Ubuntu 18.04.1 LTS? Does it matter I'm using Gnome 3.28.2 and Wayland?
    – Ayelis
    Feb 6, 2019 at 18:56
  • This solution worked for me, the accepted one did not. Ubuntu 18.04 with gnome-flashback. My display configuration now even works with a multi-computer KVM switch. May 4, 2020 at 7:27
  • 2
    Worked for Ubuntu 20.04 Focal.
    – dess
    Aug 13, 2020 at 14:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .