After upgrading to Ubuntu 18.04, my laptop has been unable to detect/use an external monitor attached via HDMI. Even when plugged in, the "detect displays" button within the default settings app doesn't do anything.

Here is the output from xrandr:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.01*+  60.01    59.97    59.96    59.93  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)

My main concern is the final line: HDMI-1-1 disconnected. There is a monitor plugged in and ready for use, and nothing I do seems to cause it to be detected.

I have an nvidia graphics card, and before the update I was using proprietary drivers. When the external display problem first arose, my initial attempt was to switch back to the open source Xorg drivers. However, upon reboot, Ubuntu displayed my driver settings as using a "manually installed driver", and won't let me change it:

enter image description here

Any recommendations?

  • What do you call open source Xorg driver ? is it the nouveau driver ? – solsTiCe May 8 '18 at 22:07
  • Yes. Sorry for not being specific. – PullJosh May 8 '18 at 22:40
  • 1
    This problem seemingly fixed itself. For any future readers experiencing the same issue: I launched an i3 session (as opposed to gnome) and then rebooted and the problem was solved. I don't expect that the two things are correlated, but if you're really stuck, it could be worth a shot. – PullJosh May 8 '18 at 23:27
  • 14
    For me, no "detect displays" button in displays settings. :( – angelcervera May 13 '18 at 10:32
  • 2
    @angelcervera's answer solved it for me. For reference, here are two very detailed threads outlining some other potential solutions: devtalk.nvidia.com/default/topic/1035768/linux/…, devtalk.nvidia.com/default/topic/1032482/… – dskrvk Sep 13 '18 at 1:36

26 Answers 26


I solved it by purging, then reinstalling the nvidia drivers

sudo apt-get purge 'nvidia*'
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update

Then using the Software & Updates tool's Additional Drivers tab and installing the latest nvidia drivers

  • 11
    I did this followed by sudo ubuntu-drivers autoinstall as recommended by @Kasuyakema and it worked. – jaycode Jan 20 '20 at 13:25
  • 1
    Worked like a charm!!! – Lazar Nikolic Jan 24 '20 at 14:12
  • 1
    Got some strange responses from the shell on following these steps, but worked in the end after a reboot. – ijuneja Mar 22 '20 at 6:34
  • The best solution! – camino May 25 '20 at 13:54
  • I worked for me as well, thank you! – wawka Jul 23 '20 at 6:45

I solved the problem installing lightdm and set it as the default display manager.

In the process, something changes because is starting to detect external displays again even if you go back to GDM3.

You can follow the instructions here on how to make these changes:

  • sudo dpkg-reconfigure gdm
  • select the display manager (LightDM, MDM, KDM, Slim, GDM) you want to use by default and hit enter
  • restart your computer
  • 2
    This worked for my MSI GS65 on Ubuntu 18.04. I also have to sudo prime-select nvidia and restart my computer -- doesn't work unless nvidia drivers are being used, it seems. – Russell Richie Sep 2 '18 at 20:08
  • 1
    Note that it is the combination of gdm3 AND modesetting which causes this problem. Ubuntu 18.10 swapped to modesetting by default, this was later backported to 18.04. Nvidia modesetting stops tearing on the laptop panel because it enables 'prime synchronisation', a type of vsync for nvidia prime. But gdm3 gets very confused for some reason. lightdm is the best of both worlds: working external monitors and tear-free nvidia graphics on the laptop's display. – Tim Richardson Mar 13 '19 at 11:13
  • 1
    This doesn't solve the problem for me. GS65 and Ubuntu 18.04. – Thierry J. Mar 18 '19 at 14:52
  • 2
    This worked for my MSI GS65 Stealth Thin 8RE laptop using Ubuntu 19.10. However, there's an extra information I'd add. Changing to lightdm using dpkg-reconfigure isn't possible if you haven't installed lightdm. If you face this issue, you might have to install it by running sudo apt-get install lightdm – xarlymg89 Nov 19 '19 at 14:06
  • 1
    sudo dpkg-reconfigure gdm3 and then choosing gdm3 solved it for me indeed (gdm3 was already my display manager before, I think). – talz Jun 29 at 6:15

Solved for me by updating to recommended Nvidea card drivers how-to.
To install all recommended Drivers:
sudo ubuntu-drivers autoinstall

  • 1
    Yep, this solved my issue as well. I tried to connect my DELL Inspiron G3 i7 32GB 480+1TB GTXTi to LED IIYAMA 28" with Ubuntu 18.04 LTS. – wawka Mar 10 '19 at 9:40
  • this suggestion solved my issue as well. Thanks – Pototo Jun 11 '19 at 13:10
  • I did ``` sudo apt-get purge 'nvidia*' sudo add-apt-repository ppa:graphics-drivers sudo apt-get update ``` as recommended by @Attila Szeremi followed by this and it worked. – jaycode Jan 20 '20 at 13:26
  • This one scre**d up my linux mint, impossible to restart untill I did like @Attila Szeremi mentionned – GLAND_PROPRE Jan 27 '20 at 11:36

Sweet Merciful Crap! There is a solution without installing lightdm!


It's apparently a better solution to run X11 as root. The one-line fix is to add this to this to /etc/X11/Xwrapper.config:

needs_root_rights = yes

It's a one line fix in /lib/systemd/system/gdm3.service






ExecStartPre=/usr/bin/xinit /usr/share/gdm/generate-config

Found Here:


All my external displays are now detected and working on gdm3

My System:

Ubuntu 18.04.3 LTS

Lenovo T480

Intel® Core™ i7-8650U CPU @ 1.90GHz × 8

GeForce GTX 1070 Ti/PCIe/SSE2 via Razer Core X over Thunderbolt 3

GNOME 3.28.2

  • 3
    This should be the accepted answer. The one with most up votes suggests going back to older lightdm and is more steps. THis simple one line step fixes the issue for me. – user92240 Nov 25 '19 at 15:10
  • Xwrapper root rights worked for me too but I didn't have to change the gdm3.service setting. – Zoltán Süle Feb 22 '20 at 20:40
  • @nhorning I added needs_root_rights = yes to the file /etc/X11/Xwrapper.config and now the boot up of the device gets stuck between the decryption of the hard drive and the ubuntu login screen. – jrenk May 7 '20 at 9:50
  • The first part of this answer is the answer. Not sure what everything below the line is, but those parts are confusing. You should be alright with just adding needs_root_right = yes to /etc/X11/Xwrapper.config – Mr_Spock Aug 30 '20 at 22:00
  • 1
    I went into my etc/X11/Xwrapper.config and the line "needs_root_right = yes" was already sitting there. I have a lenovo extreme gen2, and working with pop_os. – Eren Mehmet Kiral Sep 18 '20 at 14:30

My external monitor plugged into my Lenovo L380 HDMI stopped working on Ubuntu 18.04. I succeeded to fix this issue by opening the BIOS setup and changing the display priority option from the USB Type-C to the HDMI.

  • My lenovo E14 is not having disply priority, it is just display with option to select either of laptop display, hdfmi or usb. what to do ? – Sandeep Balagopal Sep 11 '20 at 14:35
  • 1
    @SandeepBalagopal IMO, try selecting HDMI, but remember the sequence of buttons to press to revert this change ) In case your laptop fails to fallback to the laptop display if it doesn't find the HDMI display – Sergii Golubev Sep 14 '20 at 10:24

I attempted the solution that says to reconfigure to lightdm but that did not seem to work.

I did some reading from the following website: https://devtalk.nvidia.com/default/topic/1035768/linux/ubuntu-18-04-can-t-see-second-monitor/ and I found that at least on the Lenovo Legion Y530 the solution is to change the NVIDIA prime profile from intel to nvidia and then restart the computer.

You can switch the profiles by going to 'NVIDIA X Server' settings, going to the 'PRIME profiles' tab and then selecting 'NVIDIA (performance mode)'. After, restart the computer.

You can also reconfigure the PRIME profiles tab by running the following command in the terminal.

 sudo prime-select nvidia

and then restarting your computer.

  • 1
    In my case, nvidia was already selected, but it started working when selecting "intel". Then I selected back "nvidia" with no problems. – dvlcube Jun 6 '20 at 4:09
  • Worked for me on my legion y7000. – Ritesh Jul 4 '20 at 5:48

Try this (change resolution, if 1920x1080 is not your resolution):

    xrandr --addmode HDMI-1-1 1920x1080
    xrandr --output HDMI-1-1 --mode 1920x1080

I could connect to external monitor before i execute

sudo apt install gnome

I tried suggestions above, but none of them works. at last I recover the connection by this

sudo service gdm3 restart
sudo reboot


  • restarting gdm3 resolved the problem. – Vignesh_A Sep 25 '20 at 5:23
  • after trying many other things in this thread, this is the one that worked for me. However, it changed completely the appearance of my login screen. – Santiago Oct 27 '20 at 8:55
  • Tried a bunch but this one finally did the job - thanks a ton – Julian Jul 7 at 22:58

Besides following this answer above, I followed instructions here. More specifically, step 1 of that told me the recommended drivers for Ubuntu 18.04.1

15:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C8Csv00001028sd00000798bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP107M [GeForce GTX 1050 Ti Mobile]
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-390 - third-party free
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-440 - third-party free recommended
driver   : nvidia-driver-435 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin`

Then a apt install nvidia-driver-440 & I was finally home.


The top solution did not work for me on my Acer laptop, which suddenly stopped showing HDMI-1 as an output in xrandr this morning. I tried changing to the noveau drivers in case that helped, but it didn't.
I read on a different site that sometimes the OEM laptop Nvidia cards can "get confused whether cable is connected or not", which I had assumed was just tech-support appeasing someone. But, for giggles, I tried unplugging the HDMI cable, plugging in the VGA cable, rebooting, and plugging the HDMI cable back in. For some reason, that worked.

This is probably an extension of "Just Learning"'s solution, the important part of which is probably the "through VGA" part.


I did not have this problem on Ubuntu 18.04 with NVIDIA GeForce GTX 1050 Mobile and GeForce GTX 1050. But after upgrading my kernel to 4.19 my external monitor was not detected anymore. Reverting back to the standard 4.15 kernel made the problem disappear.


Tried everything related from gdm3, lightdm, i3, nvidia drivers purge & reinstallation. What worked for me was to go to /etc/X11/ folder and create a xorg.conf file with file contents:

Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"

Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0@0:2:0"
Option "AccelMethod" "None"
Section "Screen"
Identifier "intel"
Device "intel"

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1@0:0:0"
Option "ConstrainCursor" "off"

Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "on"
Option "IgnoreDisplayDevices" "CRT"

And then reboot. I did not have success in Wayland but it worked in the Unity version.(I am running 18.04 in Alienware R313 with dualboot Windows)

  • This gave me a PKCS#7 error when booting so I had to disable the driver to enter and remove the file. – Francisco Peters May 27 '19 at 16:20
  • I think you might be able to get the same result in gdm3 by changing one line in /lib/systemd/system/gdm3.service See my main answer in this thread or the original bug report bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1716857 – nhorning Aug 14 '19 at 19:57

For me, the solution found here was the only thing that worked.

$ sudo apt install intel-gpu-tools
$ intel-virtual-output
$ reboot

My setup is:

  • MSI GS65 Stealth 8SF
  • Ubuntu 18.04 LTS (Budgie Desktop 18.04)


I noticed that the second display correctly shows after reboot, but no longer does it after suspension. Above was not what seemed to do the trick, but it seems that it's just the reboot that has helped.


I just spent several hours trying may different solutions I found on this thread and elsewhere online.

I'm running Ubuntu 18.04 on HP Elitebook with Nvidia GTX1050 graphics card. After a fresh install everything worked except external monitor. I switched the nvidia driver in the Additional Drivers section of Software & Updates several times and everytime before the switch got completed I had to choose some password that I'd supposedly use during the next reboot, but I never got asked for it during the actual reboot.

The reason the external display didn't work, was that the selected drivers didn't get loaded. I found that out by running nvidia-settings in the terminal and getting a "ERROR: NVIDIA driver is not loaded" response.

The solution: Pay attention at reboot for Enrol MOK key/MOK management screen. There select the option to Enroll key and type the password you created during driver update in Ubuntu.

All works perfect after this.


I had the same issue on an my Asus ROG laptop (running Ubuntu 19.04 / Windows 10 dual boot) after a BIOS update.

First I had to disable secure boot in BIOS.

Then I had to set options nvidia-drm modeset=0 in /lib/modprobe.d/nvidia-kms.conf and run sudo update-initramfs -u.


People who are still struggling to setup your external monitor with Ubuntu 18.04. Just disable Secure Boot at the BIOS settings and give it a try. It worked for me. (ASUS ROG G531GV)


I had similar problem, played with UEFI & Legacy boot mode, searched for hours but finally got it done by following ways: 1. goto Software & Updates 2. Additional Drivers 3. Changed the display driver from there. 4. restart

enter image description here


For me I had to turn on Legacy mode support in BIOS.


For me this problem occurred on a Lenovo Ideapad 510 running Ubuntu 16.04 after connecting to a different than usual external monitor via HDMI. It got fixed after I had connected this laptop to yet another external monitor, although it hadn't worked there. Earlier I also changed my graphics drivers from open-source to proprietary and then to open-source again--maybe this helped. I also restarted my computer several times. It seems pretty random.


One quick extra check is that you don't have nomodeset or vga= as kernel parameters, as noted here (the link is for Radeon but I guess similar would apply to other graphics hardware). Removing nomodeset just fixed a similar problem for me.

Instructions for how to check and if necessary edit your kernel parameters as applied at boot time can be found on this page.

  • How would that matter after it switches from text mode to graphics mode? – 0xC0000022L May 4 at 21:09

I tried many things to solve this problem and someone finally helped me out. My issue was with the NVIDIA drivers and this line solved it.

sudo apt install nvidia-driver-435

Link to my issue here (Ubuntu 18.04.3 cant find second monitor - Dell G3 - NVIDIA 1060 TI)


I just purchased a brand new Dell 5493 with i7 and Intel Graphics card. Had the same issue, no HDMI or monitor detected after installing Ubuntu 18.04 dual boot with Windows 10. Upgrading to the newest kernel solved the issue.

  • How did you update to latest kernel? any specific commands or website that you followed. – Vignesh_A Sep 25 '20 at 5:24

I removed my laptop's battery for a while, and then it worked again. This is a 'known' fix at my company; employed commonly.

So for me specifically the problem was that secondary monitors were always detected, up until I rebooted and it suddenly didn't anymore.


I have an MSI Prestige 15.6" Laptop with a GeForce GTX 1650 Mobile / Max-Q graphics card and a built-in Intel vga controller. I'm running Ubuntu 18.04. I use two 1080p external monitors one connected to the HDMI port and one connected through a USB-C hub. All 3 monitors worked before installing the Nvidia driver.

I installed the 440 driver and after that the laptop would not recognize the monitor connected via the HDMI port. It was like the HDMI port didn't work any more. (I enabled the MOK per the driver installation instructions.)

If I switched back to the X.org Nouveau driver (through Software & Updates, Additional drivers) then all 3 monitors work properly. If I switch back to either the 440 or 435 driver the monitor connected to HDMI doesn't work.

I've tried several of the recommendations in this thread and none of them work. The Nvidia drivers simply don't work on this hardware with the 5.3 kernel.

I have an old desktop with a 960 in it that I'll go back to using for the little bit of CUDA development that I have to do.

I post this FYI for anyone else running into this.


Something that worked for me for a similar problem was lower the refresh rate of the monitor through the display settings on Ubuntu.


I connected my external monitor through VGA and went to Settings > Devices > Displays choose Mirror and then Apply. was asked if I wanted to keep this Setting choose Yes and everything connected. Simple and Beautiful.

  • 1
    Unfortunately, the default settings app was the very first thing I tried. That being said, perhaps someone else will find this advice useful! (My problem has been solved, by the way, although I'm not entirely sure how...) – PullJosh May 22 '18 at 20:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.