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

Brian Paul brianp at vmware.com
Fri May 15 07:35:29 PDT 2015


On 05/14/2015 03:13 PM, Andreas Weber wrote:
> 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).

Just to be clear, OSMesa does not work with nvidia's driver/hardware (or 
any other GPU).  The OSMesa interface only works with software rendering 
(swrast, softpipe, llvmpipe).  If you want to do offscreen rendering 
with a hardware GPU, the easiest approach is to use framebuffer objects.


> 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

My guess is you're calling glGetIntegerv() without having a current 
rendering context.  The values you're getting are probably the 
uninitialized values of z, s, ar, etc.  You could try initializing the 
variables to 1, 2, 3, etc. and see if those values are preserved after 
the glGetIntegerv calls.

-Brian


>
> 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
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.tech-2Dchat.de_files_debug-2Dosmesa-2Doctave.tar.gz&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8&m=4Ba48zvZqjVfh00kB_QTpMBwRMfckLYuERCr060y9jk&s=L23gaWA12lLP8dLV5y9kCs7BaO4RblSDkFxKgM2JVZ0&e=
> $ 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
> https://urldefense.proofpoint.com/v2/url?u=http-3A__ftp.de.debian.org_debian_&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8&m=4Ba48zvZqjVfh00kB_QTpMBwRMfckLYuERCr060y9jk&s=WFoUSQpwej8dV84zAU79IVilJg71v37lQx94AiSm-ZA&e=
> 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
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.freedesktop.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Dusers&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8&m=4Ba48zvZqjVfh00kB_QTpMBwRMfckLYuERCr060y9jk&s=jFK6zJbYubemeCNv370Kti2fkdjGFcoMENO-QZ1rDXg&e=
>



More information about the mesa-users mailing list