2

I know there are plenty of threads on this topic, but apparently you need 50 rep to comment. I have, however, tried all the things in those threads.

Running Ubuntu 18.04 with nvidia-driver-430*. The asterisk is that when I tried downgrading to nvidia-driver-390 my additional drivers tab now shows "continue using manually installed driver" and the options for 390 and nouveau are greyed out. So I'm probably using 390?

Anyway, the problem is the same regardless if I use nouveau or any of the nvidia drivers. The second monitor is just not detected. It was working but when I tried to fix a completely different problem, tearing in videos, it stopped detecting it after I set my prime profile to intel. Switching back to nvidia didn't fix it.

I'm currently running: i7 8750H, RTX 2070, 1080p 144hz built in display, some benq 1440p 60hz external connected via hdmi

When I reboot to Windows, the monitor works fine. So it's not a problem with the wire nor the monitor.

Update: output of nvidia-smi :

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

Update:

Switched back to 430, output of nvidia-smi :

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.40       Driver Version: 430.40       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| 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 RTX 2070    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P0    34W /  N/A |    191MiB /  7982MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1884      G   /usr/lib/xorg/Xorg                           106MiB |
|    0      2207      G   /usr/bin/gnome-shell                          67MiB |
+-----------------------------------------------------------------------------+

Update:

Output for xrandr :

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 381mm x 214mm
   1920x1080    144.00*+  60.01    60.02    59.97    59.96    59.93  
   1680x1050     84.94    74.89    69.88    59.95    59.88  
   1600x1024     60.17  
   1400x1050     85.00    74.76    70.00    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      85.00    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     100.00    85.06    85.00    75.00    75.00    70.00    60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       85.02    74.96    69.88    60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       85.08    74.76    70.06    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98    85.08  
   576x432      100.11    85.15    85.09    75.00    75.00    70.00    60.06  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27

Output from dmesg | grep -i nvidia :

[    2.731757] nvidia: loading out-of-tree module taints kernel.
[    2.731764] nvidia: module license 'NVIDIA' taints kernel.
[    2.740486] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    2.749928] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[    2.751126] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
[    2.751247] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    2.793153] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  430.40  Sun Jul 21 04:53:48 CDT 2019
[    2.807484] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  430.40  Sun Jul 21 04:57:42 CDT 2019
[    2.809576] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    3.472496] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input25
[    3.472598] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input26
[    3.724291] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    3.734373] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 237

Output for grep -i nvidia /var/log/Xorg.0.log :

[    15.088] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/x86_64-linux-gnu/nvidia-430/xorg,/usr/lib/xorg/modules"
[    15.088] (**) OutputClass "Nvidia Prime" ModulePath extended to "/x86_64-linux-gnu/nvidia/xorg,/usr/lib/x86_64-linux-gnu/nvidia-430/xorg,/usr/lib/xorg/modules"
[    15.088] (**) OutputClass "Nvidia Prime" setting /dev/dri/card1 as PrimaryGPU
[    15.092] (II) Applying OutputClass "nvidia" to /dev/dri/card1
[    15.092]    loading driver: nvidia
[    15.092] (II) Applying OutputClass "Nvidia Prime" to /dev/dri/card1
[    15.092]    loading driver: nvidia
[    15.092] (==) Matched nvidia as autoconfigured driver 0
[    15.092] (==) Matched nvidia as autoconfigured driver 1
[    15.092] (II) LoadModule: "nvidia"
[    15.092] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia-430/xorg/nvidia_drv.so
[    15.095] (II) Module nvidia: vendor="NVIDIA Corporation"
[    15.096] (II) NVIDIA dlloader X Driver  430.40  Sun Jul 21 05:01:54 CDT 2019
[    15.096] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    15.096] (II) NOUVEAU driver for NVIDIA chipset families :
[    15.099] (II) NVIDIA(0): Creating default Display subsection in Screen section
[    15.099] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[    15.099] (==) NVIDIA(0): RGB weight 888
[    15.099] (==) NVIDIA(0): Default visual is TrueColor
[    15.099] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    15.099] (II) Applying OutputClass "nvidia" options to /dev/dri/card1
[    15.099] (II) Applying OutputClass "Nvidia Prime" options to /dev/dri/card1
[    15.099] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration"
[    15.099] (**) NVIDIA(0): Option "IgnoreDisplayDevices" "CRT"
[    15.099] (**) NVIDIA(0): Enabling 2D acceleration
[    15.099] (II) Loading sub module "glxserver_nvidia"
[    15.099] (II) LoadModule: "glxserver_nvidia"
[    15.099] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia-430/xorg/libglxserver_nvidia.so
[    15.134] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[    15.134] (II) NVIDIA GLX Module  430.40  Sun Jul 21 05:00:26 CDT 2019
[    15.165] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    15.165] (--) NVIDIA(0):     DFP-0 (boot)
[    15.165] (--) NVIDIA(0):     DFP-1
[    15.165] (--) NVIDIA(0):     DFP-2
[    15.167] (II) NVIDIA(0): NVIDIA GPU GeForce RTX 2070 (TU106-A) at PCI:1:0:0 (GPU-0)
[    15.167] (--) NVIDIA(0): Memory: 8388608 kBytes
[    15.168] (--) NVIDIA(0): VideoBIOS: 90.06.2d.00.55
[    15.168] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    15.198] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    15.198] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    15.198] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    15.198] (--) NVIDIA(GPU-0): 
[    15.198] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    15.198] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    15.198] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    15.198] (--) NVIDIA(GPU-0): 
[    15.198] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    15.198] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    15.198] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    15.198] (--) NVIDIA(GPU-0): 
[    15.234] (==) NVIDIA(0): 
[    15.234] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[    15.234] (==) NVIDIA(0):     will be used as the requested mode.
[    15.234] (==) NVIDIA(0): 
[    15.235] (II) NVIDIA(0): Validated MetaModes:
[    15.235] (II) NVIDIA(0):     "DFP-0:nvidia-auto-select"
[    15.235] (II) NVIDIA(0): Virtual screen size determined to be 2560 x 1440
[    15.278] (--) NVIDIA(0): DPI set to (91, 91); computed from "UseEdidDpi" X config
[    15.278] (--) NVIDIA(0):     option
[    15.590] (II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory
[    15.590] (II) NVIDIA:     access.
[    15.614] (II) NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select"
[    15.699] (==) NVIDIA(0): Disabling shared memory pixmaps
[    15.699] (==) NVIDIA(0): Backing store enabled
[    15.699] (==) NVIDIA(0): Silken mouse enabled
[    15.699] (==) NVIDIA(0): DPMS enabled
[    15.699] (WW) NVIDIA(0): Option "PrimaryGPU" is not used
[    15.699] (II) NVIDIA(0): [DRI2] Setup complete
[    15.699] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    16.213] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event19)
[    16.213] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event20)
[    16.270] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    16.270] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    16.270] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    16.270] (--) NVIDIA(GPU-0): 
[    16.270] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    16.270] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    16.270] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    16.270] (--) NVIDIA(GPU-0): 
[    16.270] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    16.270] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    16.270] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    16.270] (--) NVIDIA(GPU-0): 
[    16.335] (--) NVIDIA(GPU-0): DFP-0: connected
[    16.335] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    16.335] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[    16.335] (--) NVIDIA(GPU-0): 
[    16.335] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    16.335] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    16.335] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    16.335] (--) NVIDIA(GPU-0): 
[    16.335] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    16.335] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    16.335] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    16.335] (--) NVIDIA(GPU-0): 
[    16.340] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    16.340] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    16.340] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[    16.340] (--) NVIDIA(GPU-0): 
[    16.340] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    16.340] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    16.340] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    16.340] (--) NVIDIA(GPU-0): 
[    16.340] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    16.340] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    16.340] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    16.340] (--) NVIDIA(GPU-0): 
[    17.088] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.088] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.088] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.088] (--) NVIDIA(GPU-0): 
[    17.088] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.088] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.088] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.088] (--) NVIDIA(GPU-0): 
[    17.088] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.088] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.088] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.088] (--) NVIDIA(GPU-0): 
[    17.119] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.119] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.119] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.119] (--) NVIDIA(GPU-0): 
[    17.150] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.150] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.150] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.150] (--) NVIDIA(GPU-0): 
[    17.182] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.182] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.182] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.182] (--) NVIDIA(GPU-0): 
[    17.182] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.182] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.182] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.182] (--) NVIDIA(GPU-0): 
[    17.182] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.182] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.182] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.182] (--) NVIDIA(GPU-0): 
[    17.446] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.446] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.446] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.446] (--) NVIDIA(GPU-0): 
[    17.446] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.446] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.446] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.446] (--) NVIDIA(GPU-0): 
[    17.447] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.447] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.447] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.447] (--) NVIDIA(GPU-0): 
[    17.477] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.477] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.477] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.477] (--) NVIDIA(GPU-0): 
[    17.477] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.477] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.477] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.477] (--) NVIDIA(GPU-0): 
[    17.477] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.477] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.477] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.477] (--) NVIDIA(GPU-0): 
[    19.206] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    19.206] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    19.206] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    19.206] (--) NVIDIA(GPU-0): 
[    19.206] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    19.206] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    19.206] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    19.206] (--) NVIDIA(GPU-0): 
[    19.206] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    19.206] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    19.206] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    19.206] (--) NVIDIA(GPU-0): 
[    19.236] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    19.236] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    19.236] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    19.236] (--) NVIDIA(GPU-0): 
[    19.236] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    19.236] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    19.236] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    19.236] (--) NVIDIA(GPU-0): 
[    19.236] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    19.236] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    19.236] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    19.236] (--) NVIDIA(GPU-0): 
[    20.575] (II) NVIDIA(0): Setting mode "HDMI-0: nvidia-auto-select @2560x1440 +1920+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}"
[    23.616] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    23.616] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    23.616] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    23.616] (--) NVIDIA(GPU-0): 
[    23.616] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    23.616] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    23.616] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    23.616] (--) NVIDIA(GPU-0): 
[    23.616] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    23.616] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    23.616] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    23.616] (--) NVIDIA(GPU-0): 
[    23.646] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    23.646] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    23.646] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    23.646] (--) NVIDIA(GPU-0): 
[    23.646] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    23.646] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    23.646] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    23.646] (--) NVIDIA(GPU-0): 
[    23.646] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    23.646] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    23.646] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    23.646] (--) NVIDIA(GPU-0): 
[   608.305] (II) NVIDIA(GPU-0): Deleting GPU-0

Update:

The line you specify to edit doesn't mention nouveau. This is what my line currently is: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Update:

Out put from grep -i nvidia /var/log/Xorg.0.log after editing grub line to GRUB_CMDLINE_LINUX_DEFAULT nouveau.modset=0 : https://paste.ofcode.org/GEJ9KRDsQwKcXhJSBU66Ma (ran out of characters, had to use external site)

Update:

Output from xrandr : https://paste.ofcode.org/hgadLwahXYMEdC3hkp7yTV

Update:

Output from prime-select query is nvidia

Output from ubuntu-drivers list is nvidia-driver-430

Output from `ubuntu-drivers devices is:

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F10sv00001462sd00001272bc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-driver-430 - third-party free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Output for lsmod | grep nvidia is:

nvidia_uvm            815104  0
nvidia_drm             45056  6
nvidia_modeset       1114112  1 nvidia_drm
nvidia              19025920  278 nvidia_uvm,nvidia_modeset
drm_kms_helper        172032  2 nvidia_drm,i915
drm                   401408  19 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler        53248  2 ipmi_devintf,nvidia

Output from lspci -nn |grep -E "VGA|Display|3D" is:

00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e9b]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1f10] (rev a1)
gord0
  • 305

1 Answers1

0

Work In Progress Answer

Some items have been dealt with in comments and I'll roll them up into this answer later. This answer is destined to become a "How to I setup nVidia from A to Z" solution.

Xorg.0.log

This file is usually located in /var/log/ if not use: locate Xorg.0.log to find it.

After finding the file list it's contents which normally should look like this:

$ grep -i nvidia /var/log/Xorg.0.log
[     6.175] (**) |-->Screen "nvidia" (0)
[     6.175] (**) |   |-->Device "nvidia"
[     6.175] (**) |   |-->GPUDevice "nvidia"
[     6.175] (==) No monitor specified for screen "nvidia".
[     6.214] (II) Module glx: vendor="NVIDIA Corporation"
[     6.214] (II) NVIDIA GLX Module  384.130  Wed Mar 21 02:54:48 PDT 2018
[     6.214] (II) LoadModule: "nvidia"
[     6.214] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so
[     6.216] (II) Module nvidia: vendor="NVIDIA Corporation"
[     6.218] (II) NVIDIA dlloader X Driver  384.130  Wed Mar 21 02:29:29 PDT 2018
[     6.218] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[     6.263] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "nvidia" for depth/fbbpp 24/32
[     6.263] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[     6.263] (==) NVIDIA(0): RGB weight 888
[     6.263] (==) NVIDIA(0): Default visual is TrueColor
[     6.263] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[     6.264] (**) NVIDIA(0): Option "ConstrainCursor" "off"
[     6.264] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "on"
[     6.264] (**) NVIDIA(0): Option "IgnoreDisplayDevices" "CRT"
[     6.264] (**) NVIDIA(0): Enabling 2D acceleration
[     7.326] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[     7.326] (--) NVIDIA(0):     DFP-0 (boot)
[     7.344] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 970M (GM204-A) at PCI:1:0:0 (GPU-0)
[     7.344] (--) NVIDIA(0): Memory: 3145728 kBytes
[     7.344] (--) NVIDIA(0): VideoBIOS: 84.04.79.00.0a
[     7.344] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[     7.375] (--) NVIDIA(GPU-0): SONY TV  *00 (DFP-0): connected
[     7.375] (--) NVIDIA(GPU-0): SONY TV  *00 (DFP-0): Internal TMDS
[     7.375] (--) NVIDIA(GPU-0): SONY TV  *00 (DFP-0): 600.0 MHz maximum pixel clock
[     7.375] (--) NVIDIA(GPU-0): 
[     7.378] (==) NVIDIA(0): 
[     7.378] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[     7.378] (==) NVIDIA(0):     will be used as the requested mode.
[     7.378] (==) NVIDIA(0): 
[     7.378] (II) NVIDIA(0): Validated MetaModes:
[     7.378] (II) NVIDIA(0):     "DFP-0:nvidia-auto-select"
[     7.378] (II) NVIDIA(0): Virtual screen size determined to be 1920 x 1080
[     7.385] (--) NVIDIA(0): DPI set to (43, 44); computed from "UseEdidDpi" X config
[     7.385] (--) NVIDIA(0):     option
[     7.732] (II) NVIDIA: Using 6144.00 MB of virtual memory for indirect memory
[     7.732] (II) NVIDIA:     access.
[     7.746] (II) NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select"
[     7.770] (==) NVIDIA(0): Disabling shared memory pixmaps
[     7.770] (==) NVIDIA(0): Backing store enabled
[     7.770] (==) NVIDIA(0): Silken mouse enabled
[     7.770] (==) NVIDIA(0): DPMS enabled
[     7.770] (II) NVIDIA(0): [DRI2] Setup complete
[     7.770] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[     8.132] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event8)

Prime Select

Type this to ensure nVidia is turned on for Optimus Laptops:

$ prime-select query
nvidia

If the answer is "intel" type sudo prime-select nvidia and reboot.

Ubuntu drivers

Type this to see what drivers are used:

$ ubuntu-drivers list
nvidia-384

To help others support you type:

$ ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000013D8sv00001028sd00000708bc03sc02i00
model    : GM204M [GeForce GTX 970M]
vendor   : NVIDIA Corporation
driver   : nvidia-384 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Check running drivers

See what drivers are running in memory with:

lsmod | grep nvidia
lsmod | grep nouveau

One or the other should return results, not both.

Check your hardware

Optimus Laptops should have two hardware devices:

$ lspci -nn |grep -E "VGA|Display|3D" 
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
01:00.0 3D controller [0302]: NVIDIA Corporation GM204M [GeForce GTX 970M] [10de:13d8] (rev a1)

Check Xrandr

Xrandr should show both screens once they are plugged in:

$ xrandr | grep " connected"
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1107mm x 623mm
eDP-1-1 connected primary 1920x1080+3840+2160 (normal left inverted right x axis y axis) 382mm x 215mm
DP-1-1 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1600mm x 900mm

Note some newer laptops only support the HDMI jack through the nVidia GPU. They are hardwired unlike old days when the HDMI jack could be switchable between nVidia discrete GPU and Intel Integrated GPU.

Also note some newer laptops power off HDMI sound channel on boot to save electricity and only Windows was smart enough to turn on sound until Kernel 5.3 or something like that. If an older kernel you need nvhda.ko driver and newer laptop with no HDMI sound you need.

Grub modeset and blacklisting

Check dmesg (device messages):

[    1.406480] nvidia: loading out-of-tree module taints kernel.
[    1.406496] nvidia: module license 'NVIDIA' taints kernel.
[    1.432247] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.442022] nvidia-nvlink: Nvlink Core is being initialized, major device number 242
[    1.442204] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[    1.442328] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  384.130  Wed Mar 21 03:37:26 PDT 2018 (using threaded interrupts)
[    1.447990] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  384.130  Wed Mar 21 02:59:49 PDT 2018
[    1.449244] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    1.449246] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    4.326406] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 240
[    4.728783] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input9
[    7.317965] nvidia-modeset: Allocated GPU:0 (GPU-30fab9bc-fe6f-ec05-e8e6-c151a1a96121) @ PCI:0000:01:00.0

Notice the last line? In question update yours appear missing.

When nouveau appears above or in Xorg.0.log or stop it from loading in grub with:

$ sudo -H gedit /etc/default/grub
# Find this line and add nomodeset
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.nomodeset=0"
# Your CMDLINE may have extra or fewer entries
# Save file, Exit editor and type command below
$ sudo update-grub
$ reboot

Don't type the lines with # above they are your instructions. Type what appears after the $ in the terminal.

nVidia or Nouveau can be blacklisted somewhere. I'll use my custom command but your command is:

locate blacklist | grep -Ev '/src|/usr|/lib'

For my custom command notice the dates will help you target which files to check:

$ llocate blacklist | grep -Ev '/src|/mnt|Sdk|/usr|/lib'
ACCESS      OWNER  GROUP  SIZE   MODIFIED      NAME (updatdb last ran: 2019-08-20 17:00:07)
-rw-r--r--  root   root   367    Jan 27  2016  /etc/bindresvport.blacklist
drwxr-xr-x  root   root   4096   Aug 17 12:43  /etc/apport/blacklist.d
-rw-r--r--  root   root   217    Mar 31  2016  /etc/apport/blacklist.d/README.blacklist
-rw-r--r--  root   root   24     Jan  2  2018  /etc/apport/blacklist.d/apport
-rw-r--r--  root   root   59     Feb  8  2018  /etc/apport/blacklist.d/firefox
-rw-r--r--  root   root   71     Jan 24  2018  /etc/apport/blacklist.d/thunderbird
-rw-r--r--  root   root   5230   Aug  3  2015  /etc/gnome/menus.blacklist
-rw-r--r--  root   root   4054   Aug 18  2018  /etc/java-8-oracle/security/blacklist
-rw-r--r--  root   root   1273   Aug 18  2018  /etc/java-8-oracle/security/blacklisted.certs
-rw-r--r--  root   root   154    Jul  2  2018  /etc/modprobe.d/amd64-microcode-blacklist.conf
-rw-r--r--  root   root   325    Mar 13  2016  /etc/modprobe.d/blacklist-ath_pci.conf
-rw-r--r--  root   root   210    Mar 13  2016  /etc/modprobe.d/blacklist-firewire.conf
-rw-r--r--  root   root   697    Mar 13  2016  /etc/modprobe.d/blacklist-framebuffer.conf
-rw-r--r--  root   root   156    Jul 30  2015  /etc/modprobe.d/blacklist-modem.conf
-rw-r--r--  root   root   44     Aug  4 11:21  /etc/modprobe.d/blacklist-nvidia-nouveau.conf
-rw-r--r--  root   root   583    Mar 13  2016  /etc/modprobe.d/blacklist-rare-network.conf
-rw-r--r--  root   root   1077   Mar 13  2016  /etc/modprobe.d/blacklist-watchdog.conf
-rw-r--r--  root   root   1667   Nov 12  2018  /etc/modprobe.d/blacklist.conf
-rw-r--r--  root   root   390    Apr 12  2016  /etc/modprobe.d/fbdev-blacklist.conf
-rw-r--r--  root   root   154    Jul  2  2018  /etc/modprobe.d/intel-microcode-blacklist.conf
jarno
  • 5,600