I promise this is not a duplicate question.
I'm running Ubuntu 14.04LTS, on a custom-built desktop with an NVIDIA GTX 970 GPU.
Since installing Ubuntu the second time (long story involving windows 10 breaking grub), I couldn't access the "Display" section of system settings at all. The default drivers would not allow me to use both of my monitors. Two days ago, I followed this fix (the one with 50+ votes), which requires the installation of NVIDIA drivers. Until now I could log in just fine with the proprietary drivers (I restarted and switched to Windows a couple of times), but now Ubuntu is entering a login loop whenever I try to start up. I checked this thread for a solution and tried pretty much every suggestion there. What I found was that there was indeed an error in xsession-errors, but it wasn't related to a sytnax error in .profile or .bash_profile, it was the following:
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
and then several statements about things being terminated. I checked this thread for that error, and it said the only way to fix it was to remove the nvidia drivers. But, I need the nvidia drivers for my original problem with dual monitors. I seem to be in a loop.
So, the question is: Does anyone know of a workaround I could use to get both monitors working without the nvidia drivers which subsequently cause a login loop? It seems almost unbelievable that this would not be possible.
Best Answer
Okay, I got it figured out. This is a touch embarrassing, as it's kind of obvious. If you run into the same problem as me, be absolutely sure that you saved xorg.conf with the line:
Besides that, if you're having trouble with dual monitors / drivers in Ubuntu, you can follow pretty much exactly the steps outlined in the question. Hope this helps somebody else!