Ubuntu – Selecting nvidia graphics card with Prime results in black screen

driversgraphicsnvidianvidia-primexorg

I am currently dual-booting Ubuntu MATE 16.04 and Windows 10 using UEFI with "Secure Boot" disabled on a Thinkpad P51 with a Quadro M1200. I am trying to get the latest stable Nvidia drivers and Nvidia-Prime working with MATE.

I am able to install the drivers and Prime, but I get a black screen/blinking cursor anytime I try switching from Intel to Nvidia graphics. Switching back to Intel graphics fixes the issue.

After having used drivers 378 and 384 from the graphics-drivers PPA, my var/log/Xorg.0.log says that these drivers are incompatible with my card. Using 387 hangs up on a frozen black screen/blinking cursor and requires me to boot into an old kernel to uninstall the driver. All of these drivers are stated to work on Nvidia's website and were able to be installed on my Windows installation.

After basic troubleshooting, including setting nouveau.modeset = 0 in GRUB, I am unsure of other actions I may take. Is there anything else I may be able to do to fix this issue?

A thanks in advance!

Best Answer

Solved the issue through the following steps:

  1. Booted into login screen and switched to console via Ctrl+Alt+F1

  2. Ran sudo service lightdm stop to stop lightdm

  3. Purged all nvidia packages along with intel-microcode, tlp, and thermald

  4. Rebooted machine, repeated steps 1-2, then reinstalled intel-microcode, nvidia-384, tlp, and thermald in that order

  5. Deleted all XOrg .conf files in /etc/X11

  6. Ran nvidia-xconfig and sudo prime-select intel

  7. Rebooted machine, logged in as normal, then switched to nvidia graphics via PRIME GUI

  8. Machine has been working as normal