Ubuntu 16.04 Optimus laptop fails to load X after switch from nouveau to nvidia-370 drivers

I’ve just tried to install Nvidia drivers v.370 on my laptop (Dell XPS 15 9530) by the following steps:

  • Remove bumblebee installation with apt-get remove --purge
  • Install nvidia-370 (probably from official ubuntu repo)
  • From the following link,https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Display_Managers I did the following steps:
    ** Added the autostart entry for lightdm from the above link
    ** Modified xorg.conf to match the recipe for older x servers on the above link, adjusting busid accordingly.
    ** Added the two lines into /.xinitrc described in the above link
  • Restarted

I’ve uploaded the output of the bug report to the following Github gist: https://gist.github.com/Staberinde/3abebb7f6ceb1b5007364c1dea1960d7

I’ve noticed that it does say something about being unable to find the configuration for a second monitor, when I have no external screens connected.

I added an option back into xorg.conf that was previously there, to the screen - nvidia section:

Option "IgnoreDisplayDevices" "CRT"

Unfortunately this doesn’t seem to have had any effect

You have nomodeset in your kernel commandline. Delete that.

My bad, i’d completely forgotten I put that there.