Linux Mint 19.3: lightdm does not appear after installing proprietary drivers

I am using Linux Mint 19.3 Tricia and tried to switch from the nouveau driver to nvidia-435 driver, which caused lightdm to stop appearing on reboot, it only shows a black screen (with an underscore cursor in the top left corner). I am still able to switch to a tty console using e.g. CTRL-ALT-F1.

I have tried the following, to no avail:

  • Installing through Linux Mint’s driver-manager utility ( I tried all of versions 430, 435 and 440)
  • Installing using apt (versions 435 and 440, using the graphics-drivers ppa)
  • Out of despair - installing using Nvidia’s .run script (version 440)
  • Turned on secure boot (has been turned off before and since)
  • Reinstalled nvidia-prime as suggested in black screen after installing nvidia driver on Linux Mint 19.1
  • Tried to boot into an older kernel, from 5.0.0-32 to 4.15.0-91 (similar to what solved Ubuntu 18.04 (Linux Mint 19.3 Cinnamon) - GeForce GTX 460 - nvidia-driver-390 issues after system updates), but it drops to emergency mode immediately, even without Nvidia drivers installed. I don’t know if this issue is directly related to the lightdm problem, but I’d happy to hear whether anyone here finds it likely that’s the case.

The driver seems to be loaded correctly, although the Xorg.0.log file (included in the log attached here) has a couple of warnings:

[    48.698] (WW) NVIDIA(0): Unable to get display device for DPI computation.
...
[    48.749] (WW) NVIDIA(0): Option "PrimaryGPU" is not used

but I can’t tell whether they have any serious consequences.

Any suggestions are appreciated.

nvidia-bug-report.loggz (1.2 MB)

In the end, I found a solution.
For clarity: I’m on a laptop with a GTX 960M graphics card and Intel integrated graphics, and with that setup, I would want to use the Nvidia Optimus technology.

Using the xorg.conf file provided by Gentoo for Optimus setups, and setting it as /etc/X11/xorg.conf turned out to do the trick.
For this to work, Nvidia requires a couple of commands to be executed, see Gentoo’s page on the matter.