External monitor not detected on Ubuntu 18.04
Solution 1
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
Solution 2
Solved for me by updating to recommended Nvidia card drivers how-to.
To install all recommended drivers:
sudo ubuntu-drivers autoinstall
Solution 3
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
Solution 4
Sweet Merciful Crap! There is a solution without installing lightdm!
Update:
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
Replace
[Service]
ExecStartPre=/usr/share/gdm/generate-config
with
[Service]
ExecStartPre=/usr/bin/xinit /usr/share/gdm/generate-config
Found Here:
https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1716857
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
Solution 5
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.
Related videos on Youtube
PullJosh
I'm a student interested in programming. I started in second grade and have been coding ever since!
Updated on September 18, 2022Comments
-
PullJosh over 1 year
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:
Any recommendations?
-
solsTiCe about 6 yearsWhat do you call open source Xorg driver ? is it the nouveau driver ?
-
PullJosh about 6 yearsYes. Sorry for not being specific.
-
PullJosh about 6 yearsThis 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.
-
angelcervera almost 6 yearsFor me, no "detect displays" button in displays settings. :(
-
WinEunuuchs2Unix almost 6 years@PullJosh Do you want to answer your own question or delete it? If you answer it and accept it, new answers that are way off base can be avoided. Thanks.
-
greenkode over 5 years@PullJosh 's comment above worked for me.
-
dskrvk over 5 years@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/…
-
angelcervera over 5 years@dskrvk Great links. Could I add both in my answer? Of course, adding you in the credits. :)
-
dskrvk over 5 yearsOf course. Just sharing what I found :)
-
mahesh about 4 yearsPSA: Check to see if it's plugged in first. The alpha of all IT problems.
-
Myshko about 4 yearsTried everything here - nothing worked for me. Finally found this forums.linuxmint.com/… and installed latest driver from .run file.
-
Anton3 over 3 yearsMy Dell laptop wouldn't see a USB Type-C (Thunderbolt) external monitor. I solved the problem by tweaking Thunderbolt settings in BIOS
-
Anton3 over 3 yearsAlso,
sudo apt-get install laptop-mode-tools && sudo lmt-config-gui
and enablingvideo-out
might help
-
-
PullJosh almost 6 yearsUnfortunately, 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...)
-
Russell Richie over 5 yearsThis 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 over 5 yearsAlthough it seems that, contra angelcervera's post, if I switch back to gdm3, the problem reappears....
-
dskrvk over 5 yearsIn addition to this answer I renamed my
xorg.conf
, though don't know if that actually had any effect in the end. -
nspo over 5 yearsChoosing lightdm instead of gdm3 worked for me on Ubuntu 18.04 after the latest updates introduced the problem...
-
Lupus over 5 yearsWow! Good catch. It worked when I changed to LightDM. Ubuntu 18.04 here.
-
wawka about 5 yearsYep, 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.
-
Tim Richardson about 5 yearsNote 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.
-
Thierry J. about 5 yearsThis doesn't solve the problem for me. GS65 and Ubuntu 18.04.
-
Fabio Silva about 5 yearsI'm facing exactly the same problem on my Acer Predator with GTX 1060. Did this also "unblocked " yours driver settings?
-
angelcervera about 5 yearsHi @FabioSilva I'm sorry, I don't understand what do you mean with "unblocked yours driver settings?"
-
Fabio Silva about 5 years@angelcervera in talking about the fact of you not being able to change the option "manually installed driver". To summarize, in talking about the image. Are you able to change this option after change your display monitor?
-
angelcervera about 5 years@FabioSilva Yes, I can. But I think that this issue is not related to the monitor detection. To manage drivers, I always use "ubuntu-drivers" from the console.
-
Francisco Peters almost 5 yearsThis gave me a PKCS#7 error when booting so I had to disable the driver to enter and remove the file.
-
Mukul M. almost 5 yearsDoesn't work for me.
-
angelcervera almost 5 years@FactualHarmony My son is facing the same problem now. I think that this problem is too generic and depends on a lot of factors, so different versions of ubuntu packages means different problems. :( Search for more recent questions about the same.
-
nhorning over 4 yearsI 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 over 4 yearsInstalling lightdm detected the monitors for me, but I got stuck in a login loop, reverting to gdm3 meant the monitors were no longer detected. The actual solution for me was a one line change to /lib/systemd/system/gdm3.service see my main answer in this thread, or the bug report where I found it here: bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1716857
-
Jordan Mackie over 4 yearsCan confirm this works for Dell G5 5587 (PRIME) (Nvidia GTX 1050, Intel i7) Ubuntu 18.04 using nvidia 440 driver. LightDM was the only thing I needed.
-
xarlymg89 over 4 yearsThis 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
-
user92240 over 4 yearsThis 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.
-
jaycode over 4 yearsI did this followed by
sudo ubuntu-drivers autoinstall
as recommended by @Kasuyakema and it worked. -
jaycode over 4 yearsI 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.
-
TOPKAT over 4 yearsThis one scre**d up my linux mint, impossible to restart untill I did like @Attila Szeremi mentionned
-
Zoltán Süle about 4 yearsXwrapper root rights worked for me too but I didn't have to change the gdm3.service setting.
-
ijuneja about 4 yearsGot some strange responses from the shell on following these steps, but worked in the end after a reboot.
-
jrenk about 4 years@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. -
dvlcube almost 4 yearsIn my case, nvidia was already selected, but it started working when selecting "intel". Then I selected back "nvidia" with no problems.
-
Ritesh almost 4 yearsWorked for me on my legion y7000.
-
Mr_Spock over 3 yearsThe 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
-
Sandeep Balagopal over 3 yearsMy 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 ?
-
Sergii Golubev over 3 years@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
-
Eren Mehmet Kiral over 3 yearsI 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.
-
Vignesh_A over 3 yearsrestarting gdm3 resolved the problem.
-
Vignesh_A over 3 yearsHow did you update to latest kernel? any specific commands or website that you followed.
-
Santiago over 3 yearsafter 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.
-
0xC0000022L about 3 yearsHow would that matter after it switches from text mode to graphics mode?
-
Tschallacka almost 3 yearsThis together wither @jaycode command an a reboot solved it for me with USB-C connected display.
-
talz almost 3 years
sudo dpkg-reconfigure gdm3
and then choosing gdm3 solved it for me indeed (gdm3 was already my display manager before, I think). -
User almost 3 yearsTried a bunch but this one finally did the job - thanks a ton
-
Yash Jakhotiya over 2 yearsI tried this with Ubuntu 20.04 and 5.11.0-37-generic kernel, which installed NVIDIA driver 470 ... and got locked out of my laptop :( Black screen of death. Had to drop to root login shell in recovery switch drivers and changed back to nouveau driver. NVIDIA is HORRIBLE with respect to driver support for Linux.
-
Yash Jakhotiya over 2 yearsThis doesn't work for me. Probably the reason for the upvote difference @user92240
-
Chris Hayes over 2 yearsNo luck - Ubuntu 20.04 on ThinkPad P1 Gen3
-
brasofilo over 2 yearsAlso try using another cable, that was my issue... it was the cable not the software or hardware :-|
-
Teddy van Jerry about 2 yearsOops, I held broken packages (Ubuntu 20.04.3) and it failed. I have to use Attila Szeremi's method by installing Nvidia packages myself.
-
patapouf_ai about 2 yearsThis worked for me in the sense that now my Ubuntu 20 Legion detects my external monitors, but the problem is that the image on the external monitors (but not the main monitor) is all scrambled (not during booting but after X server loads).
-
PoundXI about 2 yearsThis solution worked with Ubuntu MATE 20.04. With Nvidia Performance mode.
-
Admin almost 2 yearsThis did it for me. Quite simple and elegant. Running on Ubuntu 22.04 LTS. Thanks!
-
Admin almost 2 yearsI tried above step and then did
sudo ubuntu-drivers autoinstall
, after reboot it went fine.