Yesterday Ubuntu automatically updated the nvidia driver. Since then when I boot my system, I get a black screen. Initially, I couldn't even get into tty1, but after going into recovery mode and deleting the driver manually I've at least been able to get there. The problem seems to be that the lightdm service is failing to start. The /var/log/lightdm log file says:
XServer 0: Removing X server authority /var/run/lightdm/root/:0 Seat seat0: Display server stopped Seat seat0: Stopping session Seat seat0: Session stopped Seat seat0: Stopping display server, no sessions require it Seat seat0: Stopping; greeter display server failed to start Seat seat0: Stoppping ... Exiting with return value 1
Xorg.0.log says (among other things)
... Failed to open DRM device for (null): -2 ... Screen 0 deleted because of no matching config section Fatal server error: no screens found(EE) Server terminated with error(1)
I have tried reinstalling xorg, lightdm, several nvidia drivers (current, recent version, old version - sometimes nothing changed, sometimes I went back to not being able to get into tty1), running dpkg-reconfigure lightdm and trying gdm3 (which also starts into a black screen which doesn't let me get into tty1). I can boot into Windows on the same device just fine, so there doesn't seem to be a hardware problem.
OS: Ubuntu 17.10 GPU: Nvidia GTX 980
Edit: If I go into recovery mode and select resume, the system boots just fine but if I start the system normally, I am still greeted by a black screen.
Edit 2: In the /var/log/lightdm/x-0.log file it says:
NVIDIA API mismatch: the NVIDIA kernel module has version 387.34 but this NVIDIA driver component has version 304.137. Please make sure that the kernel module and all NVIDIA driver components have the same version.
This is while using nvidia-current after removing the previous version with apt-get purge nvidia*