Ubuntu – How to get OpenGL working on an Nvidia GeForce GT 750M

12.04nvidianvidia-optimusopenglxorg

So, what do I have:

  • Acer Aspire V30772G laptop with an Intel video-chipset and an Nvidia Geforce GT 750M video-card
  • Ubuntu 12.04 installed and updated, with the proprietary driver selected (nvidia-319-updates)

What's the problem?

  1. OpenGL doesn't seem to be working properly. glxinfo | grep OpenGL sais OpenGL is enabled, but it's software-rendered, so it does not allow the unity 3D features to activate.

    OpenGL vendor string: VMware, Inc.
    OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 256 bits)
    OpenGL version string: 2.1 Mesa 9.2.0
    OpenGL shading language version string: 1.30
    OpenGL extensions:

  2. Thus Compiz is not working properly, especially when I try to configure the virtual workspaces or navigate between them (it only shows an icon of the topmost application instead of a full view).

What I have already tried.

  1. I have tried installing bumblebee, did not help.
  2. I have tried installing the nvidia 331 driver from source. Nothing.
  3. Tried installing the same nvidia-331 driver from xorg-edgers, it did not change the problem, but after I ran apt-get upgrade I was unable to log in after reboot (the xorg got broken).
  4. Tried the answer below with purging and reinstalling the nvidia drivers. It brought me to the output mentioned above, but still does not work as I need.

Unity 3D test

OpenGL vendor string:   VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 256 bits)
OpenGL version string:  2.1 Mesa 9.2.0

Not software rendered:    no
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       no

Best Answer

  • Open your terminal ctrl+alt+T (if you are in GUI that is. From CLI first make sure you have a working internet connection. Offcourse there is no need in CLI to open up any terminal)

Type or copy/paste each line:

  • sudo apt-get purge nvidia*
    This will remove your current nVidia drivers (using the one provided below gives a much more stable response)
  • sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
  • sudo dpkg-reconfigure xserver-xorg
    The above two lines should fix Xorg
  • sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf

After this reïnstall nVidia software

  • sudo apt-add-repository ppa:xorg-edgers/ppa
    This provides the necessary repository (assuming you removed it)
  • sudo apt-get update
  • sudo apt-get install bumblebee-nvidia nvidia-319 nvidia-settings-319
Related Question