I recently reinstalled my OS from Ubuntu to Fedora 16 and followed the instructions here to get it running on Fedora.
Everything works well. glxinfo looks correct, glxgears runs fine, played games via wine at reasonable speeds. However, I’m trying to get my Qt code to run and it segfaults trying to do certain operations in the paint function like calling begin() on QPainter (which calls glCreateShader) underneath.
I get the following error before my app dies:
QGLTempContext: No GL capable X visuals available
Here’s some of my glxinfo:
$ glxinfo
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness, GLX_ARB_multisample,
GLX_NV_float_buffer, GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_EXT_swap_control, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_NV_float_buffer,
GLX_ARB_fbconfig_float, GLX_EXT_fbconfig_packed_float,
GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB,
GLX_NV_present_video, GLX_NV_copy_image, GLX_NV_multisample_coverage,
GLX_NV_video_capture, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness
GLX version: 1.4
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness, GLX_ARB_multisample,
GLX_NV_float_buffer, GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB,
GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 8800 GTS/PCI/SSE2
OpenGL version string: 3.3.0 NVIDIA 290.10
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler
...
I’ve downloaded OpenGL test code around the web that use shaders and new functionality without issue, so from what I can tell Qt is asking for something different than other programs.
Excerpt from qgl_x11.cpp:
int attribs[] = {GLX_RGBA, XNone};
XVisualInfo *vi = glXChooseVisual(X11->display, screen, attribs);
if (!vi) {
qWarning("QGLTempContext: No GL capable X visuals available.");
return;
}
My code was running fine on Ubuntu. Looking around on the internet, there seems like someone was having a similar issue with glXChooseVisual, a function Qt calls underneath, which may be where this error is coming from. Supposedly they had to install the glx module or something, but I’m not sure if that’s my particular problem.
My xorg.conf is only four lines and only mentions the nvidia driver and not anything regarding a glx module. Do I need to add that module explicitly to my xorg.conf?
Section "Device"
Identifier "Screen0"
Driver "nvidia"
EndSection