[Mesa-users] OSMesa problems with proprietary NVIDIA 304 drivers on Debian Jessie

Andreas Weber octave at tech-chat.de
Thu May 14 14:13:49 PDT 2015


Dear users and maintainers,

we want to use OSMesa for offscreen rendering in the upcoming GNU Octave 
4.0 release. Unfortunately I'm facing some unecpected problems when 
using proprietary NVIDIA 304 legacy drivers (it works fine if switching 
to nouveau or on machines with AMD or Intel GPU).

The problem is that the generated image is almost black and values 
queried with glGetIntegerv contains arbitray values, for example

GLint z, s, ar, ag, ab;
glGetIntegerv (GL_DEPTH_BITS, &z);
glGetIntegerv (GL_STENCIL_BITS, &s);
glGetIntegerv (GL_ACCUM_RED_BITS, &ar);
glGetIntegerv (GL_ACCUM_GREEN_BITS, &ag);
glGetIntegerv (GL_ACCUM_BLUE_BITS, &ab);

returns:
GL_DEPTH_BITS       = 0
GL_STENCIL_BITS     = 18770680
GL_ACCUM_RED_BITS   = 0
GL_ACCUM_GREEN_BITS = -476738784
GL_ACCUM_BLUE_BITS  = 32544

The OSMesa demos from git://anongit.freedesktop.org/mesa/demos
(./configure --enable-osmesa) in src/osdemo runs fine and creates valid 
tga images.

I've created a minimalistic function which shows the problem, detailed 
infos from my system at the end and build instructions for
Debian GNU/Linux 8.0 (jessie) amd64 below:

$ apt-get install octave liboctave-dev octave-pkg-dev

My minimalistic example:
$ wget http://www.tech-chat.de/files/debug-osmesa-octave.tar.gz
$ tar xzf debug-osmesa-octave.tar.gz
$ cd debug-osmesa-octave
$ make
$ make check

This should create a debug_osmesa.png which is identically to 
debug_osmesa_reference_image.png

my testing system and how I installed the Nvidia driver:

$ uname -a
Linux xenonbabe 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 
(2015-04-24) x86_64 GNU/Linux

$ lsb_release -a
   ... Description:	Debian GNU/Linux 8.0 (jessie)

$ apt-cache policy libosmesa6-dev
libosmesa6-dev:
   Installiert:           10.3.2-1
   Installationskandidat: 10.3.2-1
   Versionstabelle:
  *** 10.3.2-1 0
         500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
         100 /var/lib/dpkg/status

$ nvidia-detect
Detected NVIDIA GPUs:
40:00.0 VGA compatible controller [0300]: NVIDIA Corporation G71GL 
[Quadro FX 1500] [10de:029e] (rev a1)
Your card is only supported up to the 304 legacy drivers series.
It is recommended to install the
     nvidia-legacy-304xx-driver
package.

$ sudo apt-get install nvidia-legacy-304xx-kernel-dkms
$ sudo apt-get install nvidia-xconfig
$ sudo nvidia-xconfig
   ...
   New X configuration file written to '/etc/X11/xorg.conf'
$ sudo reboot

$ glxheads
   ....
   GL_VERSION:  2.1.2 NVIDIA 304.125
   GL_VENDOR:   NVIDIA Corporation
   GL_RENDERER: Quadro FX 1500/PCIe/SSE2

Thank you, any help is greatly appreciated.
Andy


More information about the mesa-users mailing list