OpenSolaris

Printable Version Enter a New Search
Bug ID 6530074
Synopsis NVIDIA OpenGL peformance is slow on S10U3
State 10-Fix Delivered (Fix available in build)
Category:Subcategory xserver:devices_x86
Keywords s10patch-approved
Responsible Engineer John M Martin
Reported Against solaris_10u3
Duplicate Of
Introduced In
Commit to Fix s10u4_06
Fixed In s10u4_06
Release Fixed solaris_10u4(s10u4_06)
Related Bugs 6377618
Submit Date 1-March-2007
Last Update Date 22-August-2007
Description
NVIDIA OpenGL performance is slow on S10U3.  One example is running
/usr/X11/demo/glxgears which will only produce 500 frames/sec on
hardware that is capable of a order of magnitude more.
The NVIDIA GLX module is not being loaded.  The Xorg error:

  (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
  (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
  (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
  (EE) NVIDIA(0):     you continue to encounter problems, Please try
  (EE) NVIDIA(0):     reinstalling the NVIDIA driver.

Reinstalling won't help.  The problem is the patch for 6377618 only
contained the updates to the SUNWxwplr and SUNWxwman packages,
the updates to the SUNWxorg-mesa package were missing.
Work Around
Run this script to fix the sym links:

$ cat fix_ogl_symlinks.sh
#!/bin/sh

# Check OS version
case `uname -r` in
        5.10)
                break;;
        *)
                echo "S10U3 beta or higher. Not needed for Solaris Express or OpenSolaris"
                exit 1;;
esac

# Check processor type
case `uname -p` in
        i386)
                break;;
        *)
                echo "Solaris on x86 platform only"
                exit 1;;
esac

# Check for OpenGL switcher.  If it doesn't exist we cannot
# go any farther.
svcprop -q -p options/vendor application/opengl/ogl-select
if [ $? -ne 0 ]; then
        echo "OpenGL switcher not detected.  S10U3 beta or higher required."
        exit 1
fi

# Prior to the SUNWxorg-mesa packaging change for the
# OpenGL switcher, /usr/X11/include/GL will be a symlink.
# Test to see if the new package has already been installed
# or if this script has been run before.
if [ -h $BASEDIR/usr/X11/GL ]; then
        echo "OpenGL packaging has already been updated"
        exit 0
fi


# Make cetain we are root
UID=`id | sed -n 's/.*uid=\([0-9][0-9]*\)(.*/\1/p'`
if [ $UID -ne 0 ] ; then
        echo "You must be root to use this program"
        exit 1
fi

# If the NVIDIA web installation has been run prior to
# the integration of the OpenGL switcher, it will have
# created the directory /usr/include/GL.
if [ -d $BASEDIR/usr/include/GL ]; then
        rm -rf $BASEDIR/usr/include/GL
fi

# headers
cd $BASEDIR/usr/X11/include
unlink GL
mkdir GL
chmod 755 GL
chgrp bin GL
cd GL
ln -sf ../mesa/GLwDrawA.h
ln -sf ../mesa/GLwDrawAP.h
ln -sf ../mesa/GLwMDrawA.h
ln -sf ../mesa/GLwMDrawAP.h
ln -sf ../../../../var/run/opengl/include/gl.h
ln -sf ../../../../var/run/opengl/include/glext.h
ln -sf ../mesa/glu.h
ln -sf ../../../../var/run/opengl/include/glx.h
ln -sf ../../../../var/run/opengl/include/glxext.h
ln -sf ../mesa/glxint.h
ln -sf ../mesa/glxmd.h
ln -sf ../mesa/glxproto.h
ln -sf ../mesa/glxtokens.h
ln -sf ../mesa/osmesa.h

# libraries
cd $BASEDIR/usr/X11/lib
unlink GL
mkdir GL
mkdir GL/amd64
chmod 755 GL
chmod 755 GL/amd64
chgrp bin GL
chgrp bin GL/amd64
cd GL/amd64
ln -sf libGL.so.1 libGL.so
ln -sf ../../../../../var/run/opengl/lib/amd64/libGL.so.1
ln -sf ../../mesa/amd64/libGLU.so
ln -sf ../../mesa/amd64/libGLU.so.1
ln -sf ../../mesa/amd64/libGLw.so
ln -sf ../../mesa/amd64/libGLw.so.1
ln -sf libOSMesa.so.4.0 libOSMesa.so
ln -sf ../../mesa/amd64/libOSMesa.so.4.0
cd ..
ln -sf libGL.so.1 libGL.so
ln -sf ../../../../var/run/opengl/lib/libGL.so.1
ln -sf ../mesa/libGLU.so
ln -sf ../mesa/libGLU.so.1
ln -sf ../mesa/libGLw.so
ln -sf ../mesa/libGLw.so.1
ln -sf libOSMesa.so.4.0 libOSMesa.so
ln -sf ../mesa/libOSMesa.so.4.0

cd $BASEDIR/usr/X11/lib/modules/extensions
unlink libglx.so
ln -sf ../../../../../var/run/opengl/server/libglx.so

# compatibility links
cd $BASEDIR/usr/include
ln -sf ../X11/include/GL
cd $BASEDIR/usr/lib/amd64
ln -sf ../../X11/lib/amd64/libGL.so
ln -sf ../../X11/lib/amd64/libGL.so.1
ln -sf ../../X11/lib/amd64/libGLU.so
ln -sf ../../X11/lib/amd64/libGLU.so.1
ln -sf ../../X11/lib/amd64/libGLw.so
ln -sf ../../X11/lib/amd64/libGLw.so.1
cd ..
ln -sf ../X11/lib/libGL.so
ln -sf ../X11/lib/libGL.so.1
ln -sf ../X11/lib/libGLU.so
ln -sf ../X11/lib/libGLU.so.1
ln -sf ../X11/lib/libGLw.so
ln -sf ../X11/lib/libGLw.so.1
cd $BASEDIR/usr/openwin/lib/amd64
ln -sf ../../../X11/lib/amd64/libGL.so
ln -sf ../../../X11/lib/amd64/libGL.so.1
ln -sf ../../../X11/lib/amd64/libGLU.so
ln -sf ../../../X11/lib/amd64/libGLU.so.1
ln -sf ../../../X11/lib/amd64/libGLw.so
ln -sf ../../../X11/lib/amd64/libGLw.so.1
cd ..
ln -sf ../../X11/lib/libGL.so
ln -sf ../../X11/lib/libGL.so.1
ln -sf ../../X11/lib/libGLU.so
ln -sf ../../X11/lib/libGLU.so.1
ln -sf ../../X11/lib/libGLw.so
ln -sf ../../X11/lib/libGLw.so.1
cd $BASEDIR/usr/openwin/share/include
ln -sf ../../../X11/include/GL

exit 0
$
Comments
N/A