This question already has an answer here:
I've just installed a fresh copy of Ubuntu 13.04, and tried installing the NVIDIA drivers for my Geforce GT540M. This just completely broke my Unity. After rebooting I can login, but it just shows my desktop without the side- and top bar. Also the resolution was 640x480 (instead of 1920x1080) and I was not able to change it via command-line (no modes fount etc.).
I've tried a lot of solutions already:
- Using the mainline kernel instead of the default one
- Using CCSM to re-enable Unity plugin, problem here was that it didn't show Unity
- Removing Compiz config files
- Starting Unity in 2D mode, but I wasn't able to do this because I could not find the option on the login screen
- Delete .Xauthority in the home folder
- Remove and install Unity again
Problem is, none of these possible solutions work. I've seen others with the same problem and these solutions worked for some of them, but it doesn't for me.
EDIT: In the meantime i've found an even better solution then using primus. Since one of the later driver versions, Optimus is support (although just basic) by the package "nvidia-prime" which is part of the proprietary drivers. Install the drivers like so:
"sudo apt-get install nvidia-331 nvidia-settings-331 nvidia-prime"
Afterwards restart your computer. Now the driver will only be enabled when needed, just like it does on Windows.