Question

I'm trying to use Point Cloud Library with Ubuntu 12.04. However when I execute point cloud visualization program, I get the following error:

Xlib: extension "GLX" missing on display ":0".

These are my system information:

$ glxinfo
name of display: :0
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Error: couldn't find RGB GLX visual or fbconfig

Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".

$ sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: GF106M [GeForce GT 555M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:f2000000-f3ffffff memory:d0000000-dfffffff memory:e0000000-e3ffffff ioport:d000(size=128) memory:f4000000-f407ffff
  *-display
       description: VGA compatible controller
       product: 2nd Generation Core Processor Family Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:49 memory:f4400000-f47fffff memory:c0000000-cfffffff ioport:e000(size=64)

Because my laptop is with Nvidia Gt555m graphics card and optimus, I tried to install Bumblebee. But when I execute apt-get install bumblebee, my PC stops and turn into black screen.

How can I solve this? Do I really have to install Bumblebee?

Was it helpful?

Solution

There are several way you can deal with the mess that is Optimus on Linux - IMHO, all of these now supersede using Bumblebee. bbswitch (see below), which comes from the same author, is another story.

Using PRIME and the open-source driver, nouveau:

PRIME summarizes the changes that went into XrandR 1.4 done by David Airlie to be able to off-load stuff to the dedicated GPU using the open-source driver stack.

For Precise Pangolin (12.04 LTS) you first need to make sure the so called LTS Hardware Enablement Stack is installed. If you just installed the recent LTS point release, i.e. 12.04.3, the packages will already be the most recent version.

Then all you should need to do is to call some program that needs to use the NVIDIA GPU like this (as shown for glxinfo):

DRI_PRIME=1 glxinfo | grep OpenGL

This should print

OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on XXXX
OpenGL version string: 3.0 Mesa 9.0
OpenGL shading language version string: 1.30

where XXXX is the actual GPU you have in your system.

Using only the NVIDIA GPU:

This solution is not a really what Optimus is about, i.e. off-loading demanding 3D tasks to the dedicated GPU while all the 2D stuff and desktop compositing is handled by the Intel GPU. Using the above solution, you will render using the NVIDIA GPU permanently. Therefore, everything you render goes through the NVIDIA GPU and is only blitted to the screen using the Intel GPU.

There a package, nvidia-prime, which is available for 12.04.3 and does exactly that - as far as I can tell without being able to test it right now.

Since driver version 319.12 you can configure your system using XRandR 1.4 and the proprietary driver by hand. See the most recent README for version 331.13 for info on how to do this.

Switching the NVIDIA GPU on and off:

To really benefit from the actual effect the buzzword Optimus suggests, you need to be able to turn off the dedicated GPU when not in use. For this purpose, the author of Bumblebee came up with a kernel module named bbswitch.

bbswitch can be used to turn the NVIDIA GPU on and off without restarting X, which is perfect if you're using nouveau and PRIME, or with X restart if you prefer the second solution, i.e. you can write a script to switch back and forth between the Intel and NVIDIA GPU depending on your current needs. For the latter, see this page for instructions on the bottom (it's in German, I'm afraid, but you should be able to see what to do).

Obviously, the first one would be preferable since it kind of resembles what Optimus is about, but as we saw, the second solution isn't really on-demand off-loading and thus you need to switch GPU not during X11 session, but in between sessions. This is where the switching script comes in. So, for browsing, office work and stuff you can use the Intel GPU while the NVIDIA GPU is offline and if you want to do some OpenGL stuff, like games or your own graphics development, you switch to the NVIDIA GPU.

In terms of energy consumption, the second solution isn't really that detrimental because the proprietary driver already does pretty good power management - an area at which the open-source driver has been notoriously bad in the past, because NVIDIA wouldn't release the needed hardware documentation to actually implement proper power management without reverse engineering work and the help of the community. This is getting better now.

I hope this is sufficient. Leave a comment if you need further help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top