Ubuntu Stucking on Login Loop after Installing 1070 Printer Driver

I get Nvidia 1070 display cards and Ubuntu 14.04.

After installing the printer driver(see Linux x64 (AMD64/EM64T) Display Driver | 367.27 | Linux 64-bit | NVIDIA) for 2 1070 display cards, I could not login the Ubuntu desktop environment and the OS gets stuck in login loop by plugging the HDMI cable to the onboard display.

With 2 display cards, the monitor can show the OS by changing the HDMI cable from onboard display to one of the two display cards. And I can login the Ubuntu desktop environment.

With 4 display cards, however, the monitor CANNOT show anything again by plugging the HDMI cable to any one of the 4 display cards. The monitor can only show the OS by plugging the HDMI cable to onboard display this time. Also, I cannot login Ubuntu desktop environment and the OS gets stuck in login loop again.

How can I solve the problem. Can anyone give some some hints?

Using the .run installer you have overwritten your system’s mesa package, so the onboard graphic doesn’t work. to repair

  • uninstall the nvidia drivers (xxx.run --uninstall)
  • reinstall mesa and xorg
  • reinstall the driver using option --no-opengl-files

Thank you so much for your reply!

How can I reinstall mesa and xorg in Ubuntu 14.04?

sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri
sudo dpkg-reconfigure xserver-xorg