How to reinstall Nvidia drivers on Ubuntu

6comments

18th September 2010 in Coding Tags: linux, ubuntu

Every time I update my Ubuntu machine compiz stops working. I don't know very well the reason, also because I don't have so much time to investigate, I just know that by reinstalling the nvidia drivers the things get back working.

Since this is a procedure that I found myself doing quite often I decided to write it on my blog so I won't forget next time I need to do it :-).

What is Compiz?

Compiz manager is a great software that enhances the overall user interaction by adding fancy effects to your windows, from drop shadows to awesome desktop effects like the Desktop Cube or theExpo view.

Many of these effects are purely fancy, while some others are really useful and once you have it you can't live without.

Why Compiz stops working after updating Ubuntu?

Good question, I don't know well! I think it has to do with the graphic card drivers not being up to date with the system kernel but I'm not sure.
Do you know the answer? If yes write it in the comments please :-).

How can I get Compiz back working?

For me usually reinstalling the nvidia drivers just works fine. If you don't use nvidia then you might want to try to reinstall your graphic card's drivers or ask in the ubuntu forums.

1. Download latest drivers

Download the latest drivers for your machine from the NVIDIA website.

Click on the section that correspond to your machine - for example Linux x64 (amd64/em64t) display driver - download the file and remember the folder in which you put it, because you will have to reach it through the command line.

2. Stop the X server

Stop the X server by hitting CTRL + ALT + F1 on your keyboard.

Now you are in console mode only. Login with your username and password and then and type:

$ sudo /etc/init.d/gdm stop

You might get some kind of warning, just ignore it.

3. CD to the folder in which you downloaded the drivers

Change directory to where you downloaded the file, for example:

$ cd /home/nemesis/Downloads/

4. Run the script

Make the script executable and run the script you just downloaded from the nvidia website. Example:

$ sudo chmod a+x NVIDIA-Linux-x86_64-256.53.run

$ sudo sh NVIDIA-Linux-x86_64-256.53.run

5. Install and configure the drivers

On the first screen select "Accept", then again select "Yes" when it asks you if you want to continue, go ahead and always select yes on the questions or ok to all the eventual warning messages.

At some points it will ask you:

"Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up"

Select yes and then ok.

6. Get back to the graphic mode

$ sudo /etc/init.d/gdm start

Yay! Compiz is back now!

Do I have to do this every time I update the Kernel?

No! The next time you need to update the NVIDIA X drivers for Linux you won't need to repeat this procedure.
Infact  you will just need to do:

CTRL + ALT + F1.
Login with your username and password.

$ sudo /etc/init.d/gdm stop
$ sudo nvidia-installer --update
$ sudo /etc/init.d/gdm start

This is all! Thanks to Fakie Flip in the Ubuntu Forums.

Retweet

Comments

  1. 1.

    Linuxiac38 said:

    ( on 18th of September 2010 at 18:40 )

    Xserver config file is overwritten by stock default upon update.

    Go and invoke the new generic files, or else, the specific nVidia file, in control panel>System>nvidia X server Settings. That will automatically build a new config file, in the correct sub-directory.

  2. 2.

    Federico Capoano said:

    ( on 19th of September 2010 at 12:35 )

    Thanks Linuxiac38 for this information!

  3. 3.

    Yaro Kasear said:

    ( on 4th of October 2010 at 03:05 )

    Get the name of it right.

    It's just Compiz. Not Compiz Manager.

  4. 4.

    Federico Capoano said:

    ( on 4th of October 2010 at 13:02 )

    Thanks Yaro, I corrected it.

  5. 5.

    Drivers said:

    ( on 24th of October 2011 at 07:25 )

    Very useful information, thanks for sharing.

  6. 6.

    bagbonized said:

    ( on 1st of July 2013 at 22:15 )

    hey, i got the "unknown monitor" problem after following your instruction, how to fix this?

Comments are closed.

Comments have been closed for this post.

Categories

Let's be social

Popular posts

Latest Comments

  1. I can make more customers for your business without ripping your pocket I Can Contact for more details? David

    By Davidwrice in How to speed up tests with Django and PostgreSQL

  2. Adult blog with daily updates daily quotes of wisdom what antonyms and synonyms are underwear man http://sissyabuse.blogporn.in/?profile.iyana sequined skirt free porno of girls herbs estrogen hardsteel chastity wife cheat toronto breast implants gallery of contemporary art mens sexo

    By suzannetu2 in OpenWISP at IETF Bangkok

  3. I got very good results with this, thanks for sharing.

    By Yasir Atabani in How to speed up tests with Django and PostgreSQL

  4. Hi Amad, for any question regarding OpenWISP, use one of the support channels: http://openwisp.org/support.html

    By Federico Capoano in How to install OpenWISP

  5. Sir please guid , i have install the ansible-openwisp2 , now how to add the access points . What is the next procedure . Please help.

    By Ahmad in How to install OpenWISP

Popular Tags

battlemesh censorship creativity criptography django event fosdem google-summer-of-code ibiza inspiration javascript jquery linux nemesisdesign netjson ninux nodeshot open-source openwisp openwrt performance photo programming python security staticgenerator talk upload wifi wireless-community