I am using Ubuntu 18.04, kernel 4.15.0.76-generic, GPU is Geforce GTX 960 (GM107 chip). I set up Nvidia drivers 440.33.01 with Cuda 10.2 last week, and everything was working perfectly. I believe the issue started after a minor update to either ubuntu (or something else) today. Currently, booting happens on the main laptop screen, but as soon as I login using gdm3, the main laptop screen turns black. (Still can be used for TTY though) Nvidia-smi and related commands work fine.
I purged and reinstalled nvidia drivers and cuda, and without drivers the main laptop screen works fine. (But in this case the external display is not recognized)
sudo lshw -c video
*-display
description: 3D controller
product: GM107M [GeForce GTX 960M]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a2
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:134 memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:4000(size=128) memory:a4080000-a40fffff
*-display
description: VGA compatible controller
product: HD Graphics 530
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:132 memory:a2000000-a2ffffff memory:b0000000-bfffffff ioport:5000(size=64) memory:c0000-dffff
Output of nvidia-smi
nvidia-smi
Wed Feb 12 21:41:22 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| 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 960M On | 00000000:01:00.0 On | N/A |
| N/A 47C P0 N/A / N/A | 205MiB / 4043MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1415 G /usr/lib/xorg/Xorg 14MiB |
| 0 1534 G /usr/bin/gnome-shell 11MiB |
| 0 1932 G /usr/lib/xorg/Xorg 89MiB |
| 0 2180 G /usr/bin/gnome-shell 81MiB |
| 0 2714 G /usr/lib/firefox/firefox 1MiB |
I don’t think I have an hardware issue. Might be related to X, maybe manually editing Xconf may help, but running nvidia-xconfig did not solve the issue.
I will be very grateful if anyone can help, thanks.