26

I'm having a precision 7530 with i7-8850H and NVIDIA Quadro P2000 and using ubuntu 18.04. Now after some time the external monitor connected over displayport (displayport to hdmi cable, where the displayport goes into the laptop and the hdmi cable into the monitor) stopped working. I'm using this workstation at work with the TB18DC dock, where 2 external monitors are connected and work properly. But at home I do not have any dock and with the setup mentioned above the external monitor stopped working. It did work some months ago. During the time it worked and now I have done normal ubuntu software updates where also the bios-firmware has been updated to 1.5.2 (i'm not sure what version I've had before, was the first time I updated firmware after bought, so maybe 1.0.7?).

I have also installed the nvidia 390 driver. But it doesn't work either with the xorg-driver.

xrandr says with connected displayport monitor:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y     axis) 344mm x 193mm
   1920x1080     60.03*+  60.01    59.97    59.96    59.93    48.02  
   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 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis) 

I have also tried the following:

  • installing lightdm and use it (no effect)
  • disable switchable graphics in bios (no effect)
  • downgrade firmware version-by-version till 1.2.5 (as it won't let me downgrade back to 1.0.7. no effect)
  • reset bios settings to default (no effect)
  • reinstalling nvidia-driver (no effect)
  • trying without any nvidia-driver (no effect)
  • Disable secure boot (no effect). But I also getting nothing when running lsmod | grep nvidia

I booted from a live ubuntu usb stick and without external monitor it worked normally but with external monitor I got the following error message:

error message image

Any ideas how to get the monitor working? Thank!

Pomm0
  • 363
  • I'm facing the same problem with Linux Mint. Since Mint comes with Lightdm as the default display manager I've installed gdm3. But this showed to be not enough and then I've uninstalled all the NVIDIA drivers. So, using the default xserver drivers and gdm3 solved the problem, but I might say in an unsatisfactory way because I use linux mainly for multimedia work and can't use the full potential of my hardware without the Nvidia drivers. Many people has this problem too and looks like there is no specific reason for this to happen and it's sad. – Fabio Silva Apr 09 '19 at 00:19
  • This solved my problem Ubuntu 22.04. – imbr Jan 17 '23 at 12:27

13 Answers13

31

I recently installed the nvidia-418 driver on my laptop which uses Ubuntu 18.04. At first the external monitor worked perfectly, but after I switched from power saving mode (sudo prime-select intel) back to performance mode (sudo prime-select nvidia), the second monitor was not detected anymore.

I discovered that prime-select writes a configuration file which causes the problem. It enables the nvidia-drm modeset option. You can simply undo the change made by prime-select by commenting out this option. It will not be reset, because prime-select only writes this file when it does not yet exists.

Open the file in your favorite editor (vim, nano, gedit, etc.).

sudo nano /lib/modprobe.d/nvidia-kms.conf

And comment out the the nvidia-drm modeset option.

# This file was generated by nvidia-prime
# Set value to 0 to disable modesetting
# options nvidia-drm modeset=1

Hope this also helps you and many others!

ps: It is completely normal that the second monitor is not detected in power saving mode when the connection is part of the nvidia graphics card.

  • 2
    For me it works however it doesn't seem to be the full solution. When I don't have any nvidia driver installed, I can easily use only intel 930 card and switch between internal and external display. However after installing intel 930 is not capable to display on external monitor, while nvidia requires the trick described by you. I believe it would be much more convenient to have also the possibility to use external hdmi port when using intel card. – user2707175 Jul 19 '19 at 17:23
  • 1
    Doesn't work for me. Using an Dell G3 with an GTX1050 with 430 drivers – Maxwell s.c Aug 24 '19 at 01:34
  • I'm on 19.04 and that file doesn't exist. Though, I'm using the Graphics Driver PPA. – MattBoothDev Oct 10 '19 at 09:19
  • Ok, scratch that, I simply needed to run prime-select at least once and it did, indeed, generate that file. This seems to be working for me. I've also forcefully disabled Wayland for Gnome to stop that from being attempted to be set. – MattBoothDev Oct 10 '19 at 10:42
  • 1
    I needed to do sudo update-initramfs -u and reboot after setting modset to 1 to make it work. – Julia May 22 '20 at 22:08
  • Helped for: nvidia-driver-390 / Dell e6530 / Card NVS 5200M / Ubuntu 20.04.

    Before described steps I did: sudo ubuntu-drivers autoinstall

    then modeset=0 and at the end sudo update-initramfs -u. Original NVIDIA link: https://forums.developer.nvidia.com/t/ubuntu-18-04-3-blank-screen-at-startup-with-430-drivers-and-gtx-960/107501#5402308 also this one is useful: https://forums.developer.nvidia.com/t/ubuntu-19-04-doesnt-detect-my-hdmi-display/79577/22

    Also from my side seems that after sudo ubuntu-drivers autoinstall just switching to: nouveau display driver helped

    – Damian JK Dec 30 '21 at 21:49
  • Holy cow! This even worked on a 22.04 Ubuntu desktop machine where I accidentally power schemes. – skubski Apr 20 '23 at 18:42
8

I do prefer the solution by thomasnabgelis, but other working solution would be to use lightdm display manager. To do this just run sudo apt-get install lightdm and sudo dpkg-reconfigure lightdm if not configured after install.

Why this happens? I spent a lot of time trying to understand... nvidia-drm provides anti-tearing solution, though I didn't find any difference with this turning that off. Citation from nvidia forum (topic):

nvidia-drm modeset=1 is needed for tear-free display but since this is enabling linux kms for the nvidia driver, gdm thinks it can use wayland. Having a parallel wayland session makes it somehow impossible for X to detect any outputs on the nvidia gpu

ivizot
  • 81
  • Thank you. Unfortunately the preferable solution provided by @thomasbangels did not work for me as the module nvidia-drm seemed to be loaded regardless of the changes applied to the configuration file. Switching from gdm3 to lightdm did the trick. – Ra'Jiska May 04 '19 at 17:57
  • What are advantages/disadvantages of using lightdm instead of gdm3? Btw, even when using lightdm I can display on external hdmi when using intel card. :( – user2707175 Jul 19 '19 at 17:29
  • Thanks, that's works perfectly. In fact a rather lightdm :) – jcmordan Oct 24 '19 at 12:36
3

Without risking the configuration files editing (which I am not sure of what effects propagate), my solution was to select the NVIDIA (Performance Mode) option and reboot after issuing the nvidia-settings command.

3

Thanks for all your hints. My second monitor was dead a couple of days ago. I got it working again with the following steps:

  1. sudo nvidia-settings -> if this shows an error, then the nvidia driver is not active
  2. settings > info > software > additional drivers -> switch to current (or not so current) version of nvidia driver. If there is no error, skip step 3.
  3. install missing nvidia-drivers: sudo apt install nvidia-driver-450 (or similar)
  4. reboot
  5. it works (at least for me)

Hope that helps anyone. Cheers, Werner

werneR
  • 31
3

Do:

sudo apt update && sudo apt upgrade -y
sudo ubuntu-drivers autoinstall
reboot

This solved the issue for me.

shamaseen
  • 141
  • 2
1

I scoured the web when I got my MSI GS65 Stealth with GeForce GTX 1660 Ti/PCIe/SSE2 and installed Ubuntu 18.04. I tried pretty much everything but nothing helped.

What did it for me was installning Ubuntu 19.10. Everything worked right out of the box and seeing as Ubuntu 20.04 LTS is right around the corner, this feels like a viable solution.

1

None of the methods worked for me. At last after hours of searching, disabling secure boot from bios worked.

https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1771185

1

For some reason, in Ubuntu 20.04, with every kernel upgrade, the system loses its dual-monitor configuration and only starts to work with one monitor due to lack of simultaneous upgrade of linux-modules-nvidia-390XXXX (in my case).

The reason is that during each Ubuntu kernel upgrade, the kernel for NVIDIA drive module for that new kernel is not upgraded automatically and it should be done manually.

In my case, my Ubuntu 20.04 workstation was upgraded from linux-modules-5.4.0-39-generic to linux-modules-5.4.0-40-generic. After the upgrade, I lost my dual monitor configuration.

To fix it I installed linux-modules-nvidia-390-5.4.0-40-generic (new kernel) and rebooted the system. Done!

Dual monitor mode restored:

$ nvidia-smi
Thu Jul  2 18:35:01 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.138                Driver Version: 390.138                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 550 Ti  Off  | 00000000:04:00.0 N/A |                  N/A |
| 41%   43C    P0    N/A /  N/A |    344MiB /   957MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+

Solaris
  • 11
  • watch out for this . The ubuntu docs (https://ubuntu.pkgs.org/20.04/ubuntu-updates-restricted-amd64/linux-modules-nvidia-390-5.4.0-40-generic_5.4.0-40.44_amd64.deb.html) states You likely do not want to install this package directly. Instead, install the one of the linux-modules-nvidia-390-generic* meta-packages, which will ensure that upgrades work correctly, and that supporting packages are also installed. so maybe try sudo apt-get install linux-modules-nvidia-390-generic – jeremy_rutman Dec 10 '20 at 10:40
  • BEWARE. this removed my display ability. Reverted capability by following this solution: https://askubuntu.com/a/1276794/1048198 – jsibs Sep 23 '22 at 23:33
1

I ran into this same problem with a new HP Omen laptop with a RTX 2060.

I followed the instructions of werneR above (using the Software & Updates GUI), but it still did not work.

Eventually, I realized the issue was the SecureBoot. On reboot, make sure instead of hitting "Continue Boot", that you choose "Enroll MOK" and give the password you set for SecureBoot when using the GUI. If you do not do this, the driver changes will not take effect (the whole point of SecureBoot), and your second monitor will not work.

DaveH
  • 11
0

I also don't get my external display recognized, after a month or so working normally with ubuntu 20.04 xrandr gets me :

...
   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)

I already have secureboot disabled. I tried commenting

# options nvidia-drm modeset=1

in /lib/modprobe.d/nvidia-kms.conf and still nothing. Also did

sudo apt-get install linux-modules-nvidia-390-generic

and also tried prime-select intel and back again to nvidia, so far nothing has helped. When in nvidia mode I do get an ok response from nvidia-smi namely

jeremy@jeremy-Blade:~/$ nvidia-smi
Thu Dec 10 18:27:28 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.38       Driver Version: 455.38       CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   67C    P3    22W /  N/A |    285MiB /  6078MiB |     21%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1186 G /usr/lib/xorg/Xorg 45MiB | | 0 N/A N/A 1773 G /usr/lib/xorg/Xorg 184MiB | | 0 N/A N/A 1934 G /usr/bin/gnome-shell 32MiB | | 0 N/A N/A 3435 G /usr/lib/firefox/firefox 1MiB |

What finally solved this for me was install of latest nvidia driver.

0

I had the same problem. But it was simply that my laptop was unplugged. It goes into power-saving mode that disables extending display to a second external monitor.

Cosmo
  • 111
0

I have a HP OMEN 15-ek0062la – 15.6″ (1M1L9LA) with an NVidia TU117M [GeForce GTX 1650 Ti Mobile]

External monitors do not work with the recommended nvidia driver, but do work with nvidia-driver-470. It might be necessary to run sudo prime-select nvidia first.

0

I also had this problem on ThinkPad P14s when connecting to DELL 34". It was actually caused by having too much data travelling through the USB-C cable.

Just unplugging the Ethernet cable from the DELL monitor made it work .

Just for reference, these are the devices plugged into the monitor:

  • USB mouse
  • USB keyboard
  • USB printer
  • 10GbE Ethernet

Strangely enough, sometimes it works even with the Ethernet plugged in. But what mostly works is to let the graphics drivers establish connection to the monitor display first and then connect the Ethernet if I need to.

jirislav
  • 621