How do I get Ubuntu to recognize my nvidia graphics card?

If i type lspci| grep VGA into the terminal i get this output:

00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller(rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0fd1 (rev a1)

When i install nvidia-current it installs 259.49 which is the wrong driver for the 650m (259.59 is the correct). Any thoughts?

EDIT: I employed this command dpkg --list | egrep '(nvidia|bumbl)' | grep ^ii which output

ii  bumblebee                              3.0-2~preciseppa1                       nVidia Optimus support
ii  bumblebee-nvidia                       3.0-2~preciseppa1                       nVidia Optimus support using the proprietary NVIDIA driver
ii  nvidia-common                          1:0.2.44                                Find obsolete NVIDIA drivers
ii  nvidia-current                         295.40-0ubuntu1                         NVIDIA binary Xorg driver, kernel module and VDPAU library
ii  nvidia-settings                        295.33-0ubuntu1                         Tool of configuring the NVIDIA graphics driver

So I guess this shows that since it has no idea which card it is, it doesn't pick the right drivers...

Also the computer is a Samsung Series 7 (700Z7C) if that helps

Running optirun glxspheres gives this output in kern.log

NVRM: GPU at 0000:01:00.0 has fallen off the bus.
NVRM: GPU at 0000:01:00.0 has fallen off the bus.
NVRM: RmInitAdapter failed! (0x26:0xffffffff:1170)
NVRM: rm_init_adapter(0) failed

Ok, as you haven't mentioned in your question that you have optimus enabled laptop and as per the interaction with other users it is clear that you are into a mess. A fresh install is required, Let me explain it to you.

optimus isn't supported by nvdia drivers in linux. So if you install nvidia drivers from any repo. You won't be able to boot into GUI. The linux driver page of nvidia has a warning like The driver won't work with few models (few means optimus enabled graphics cards)

So there is some unofficial work to get the power save feature at least (i.e. to turn off the discrete GPU). The first success was by mj-casalogic.(I don't know his name) His first project named as bumblebee then he updated it and renamed it ironhide.

However ironhide wasn't well designed and it has lot of problems. It is now abandoned project.

Bumblebee 3.0 was a fork of original bumblebee project. It has more stability and whole code was re written a C. Now a daemon runs from the startup. Disable the discrete GPU automatically and use it only when required. But this is not compatible with ironhide or earlier bumblebee. You have to do a lot of things to get this working. Its easier to reinstall ubuntu.

After clean installation of ubuntu, do the following

Instruction for installing Bumblebee to turn off discrete GPU and enable only when required

  1. Type the following in terminal:

    sudo add-apt-repository ppa:bumblebee/stable
    sudo apt-get update
    
  2. To install Bumblebee using the proprietary nvidia driver:

    For 12.04 - 13.04

    sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
    

    And for 13.10:

    sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
    
  3. Reboot.


If you just want to disable nvidia card, no need to learn followings

Usage Instruction :

To run a program with nvidia card, use optirun command prefixed in terminal. Like to run glxspheres with nvidia card type

optirun glxspheres

To run firefox type : optirun firefox &


To get the graphics card model, install mesa-utils Install mesa-utils.Remember the graphics card model won't be nvidia one. It will be intel, because in nvidia optimus the nvidia card isn't exposed directly. Nvidia card is wired via the intel one

Linked Questions:

How well will Nvidia Optimus cards be supported in 12.04?

Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

Can't use nvidia card/driver on optimus notebook


You want to use the Bumblebee packaged drivers for your system. You should be able to solve your problem by following the same procedure as here: Switchable laptop graphics issues on Ubuntu 12.04?

PS. Don't use ironhide or x-swat for an Optimus graphics card. People are spreading outdated information.


You have accepted an answer to your question, but did you ever resolve this problem? In case you haven't, and for other people looking for step-by-step instructions on getting the Optimus GT650M working with bumblebee and the NVidia proprietary driver, you should check out a recipe I wrote here: http://eternalvoid.net/tutorials/linux-optimus-gt650m/

Basically, until bumblebee 3.0.1 and nvidia-current 304.22b are in an Ubuntu repository, you will probably have to follow a method similar to my recipe to be able to use your NVidia card.

In short, this involves installing a new beta version of the NVidia driver (the official version), but you have to use many command-line switches when installing it, so that you get it in a non-standard location, and so it doesn't remove all your existing OpenGL stuff.

Then you have to install bumblebee 3.0.1 from their git repository, and configure it to be able to find all the NVidia libraries, but also to use an Intel driver when accessing the framebuffer.

Full instructions are at the link I provided, but please only follow them on a fresh install of Ubuntu, with everything backed up somewhere else.