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 Launcher and top Panel. Also the resolution was 640x480 (instead of 1920x1080) and I was not able to change it via command line (no modes found, 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

The 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 than 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.

marked as duplicate by Jorge Castro, Basharat Sialvi, Takkat, Mateo, Seth Apr 29 '13 at 0:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


As I know GT540M is optimus graphical card. Next time install Bumblebee.

sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

sudo apt-get install bumblebee bumblebee-nvidia

to run some app with GT540M:

optirun executable_app

To solve you problem: remove drivers that you installed.

  • Well i've tried removing drivers already, did not work. I had to reinstall Ubuntu 13.04. Anyways, it is an optimus card indeed, does your method also enable the driver? – PureTryOut Apr 28 '13 at 11:38
  • Yes, it also enables the driver. But this technology is working bad. It works not the same as on windows, because it is not automatic tool. You always have to write in terminal "optirun application_name" to run the app with GeFroce card. Without Bumblebee your both graphics cards will be powered on all the time, even though the Nvidia graphics card isn't used. – pretender1991 Apr 28 '13 at 11:50
  • But for example, if I want to run a game using Steam (say Team Fortress 2), do I need to run Steam using "optirun"? Or how does that work? – PureTryOut Apr 28 '13 at 11:58
  • Yes, for steam games you need to run steam using "optirun". Write in terminal "optirun steam".As i know then all games will start from steam with optimus card. – pretender1991 Apr 28 '13 at 12:18
  • Thanks! This worked, I now have my Graphics driver working without messing up Unity! Just one last question, if I want to run (for example) Cod4 via Wine on Ubuntu itself, do I need to use "optirun wine cod4.exe"? Or does this not work this way? – PureTryOut Apr 28 '13 at 13:53

As stated earlier install bumblebee, but also Install primus and use primusrun instead of optirun, performance is much better. It's recommended by steam and bumblebee developers

Ubuntu wiki: https://wiki.ubuntu.com/Bumblebee#Installation

Steam support: https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437 (highly recommends not using primusrun steam/optirun steam as it negates any power saving but provides a command that can be added to steam games through menus in your library, I suggest using primusrun %COMMAND% as the command listed wont work entered lowercase)

Awesome guide: http://cjenkins.wordpress.com/2013/01/01/steam-for-linux-on-optimus-enabled-computer-running-ubuntu-12-04-64bits/

  • Thanks, this worked and prismrun did indeed increase my FPS! – PureTryOut Apr 28 '13 at 13:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.