Apparently the PyQt application ends up loading the Mesa GL library (/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) instead of the NVidia driver (/usr/lib/nvidia-331/libGL.so.331.38) that is loaded when importing PyOpenGL first.
The difference seems to be the library name when calling dlopen(). PyOpenGL tries to import "libGL.so.1", whereas PyQt imports "libGL.so", without the ".1" suffix.
A simple C application calling dlopen() and checking /proc/<pid>/maps shows that "libGL.so" points to the Mesa driver, whereas "libGL.so.1" ends up loading the NVidia driver.
So this is a bug in Ubuntu's NVidia package I assume?
Ok, I think I found the problem.
Apparently the PyQt application ends up loading the Mesa GL library (/usr/lib/ x86_64- linux-gnu/ mesa/libGL. so.1.2. 0) instead of the NVidia driver (/usr/lib/ nvidia- 331/libGL. so.331. 38) that is loaded when importing PyOpenGL first.
The difference seems to be the library name when calling dlopen(). PyOpenGL tries to import "libGL.so.1", whereas PyQt imports "libGL.so", without the ".1" suffix.
A simple C application calling dlopen() and checking /proc/<pid>/maps shows that "libGL.so" points to the Mesa driver, whereas "libGL.so.1" ends up loading the NVidia driver.
So this is a bug in Ubuntu's NVidia package I assume?