Nvidia driver not working (Error querying enabled displays on GPU 0 (Missing Extension). )
Solution 1:
I solved the problem. A really stupid mistake on my part...
So here goes:
I gave up all hope and tried to install the drivers using the drivers from the Nvidia site itself http://www.nvidia.com/download/index.aspx . So I ran the installer after purging my current driver installation using
sudo apt-get purge nvidia*
However, the installer failed and I had lots of errors and warnings so I figured that was due to me tinkering around so much with that many installs and purges.
So I went to reinstall my whole OS from scratch (even downloaded the ISO again, followed by making a bootable usb drive). Now after my clean install, the first thing I did was install the nvidia drivers
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-375
Now when I got the secure boot screen after the reboot, I previously just hit enter and went through it...but today with a fresh mind I realised that this didn't turn off secure boot and you have to use the dialog and enter your password in order to disable it. So I did.
A final reboot and everything worked!
Now I'm unsure which of these things solved it, but probably me not turning off secure boot (though after thinkering that much, a clean install is probably a good idea).
I hope this is of help to someone else, spend a whole day on this...