LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   No direct rendering with Nvidia (http://www.linuxquestions.org/questions/linux-desktop-74/no-direct-rendering-with-nvidia-946716/)

dcroxton 05-24-2012 06:38 PM

No direct rendering with Nvidia
 
I am unable to get direct rendering to work with a Quadro FX 540 card and iH252 monitor. I use Ubuntu 12.04 and XFCE with lightdm.

I disabled my other monitor because I found something in a log file indicating that it was incapable of direct rendering, so I only have the one monitor to worry about.

I found this post about enabling DRI, but that didn't help.

I also added my user to the "use video devices" group, which I read was causing someone a problem, but that didn't help.

Here is my xorg.conf (generated by the nvidia tool, except for the dri stuff that I added):

Code:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 295.33  (buildmeister@swio-display-x86-rhel47-06.nvidia.com)  Sat Mar 17 16:01:34 PDT 2012


Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option        "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier    "Mouse0"
    Driver        "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/psaux"
    Option        "Emulate3Buttons" "no"
    Option        "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier    "Keyboard0"
    Driver        "kbd"
EndSection

Section "Monitor"

    # HorizSync source: xconfig, VertRefresh source: xconfig
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "HannStar Display Corp iH252"
    HorizSync      24.0 - 80.0
    VertRefresh    56.0 - 75.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName      "Quadro FX 540"
EndSection

Section "Screen"

# Removed Option "TwinView" "1"
# Removed Option "metamodes" "CRT-0: nvidia-auto-select +0+312, CRT-1: nvidia-auto-select +1024+0"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "TwinView" "0"
    Option        "metamodes" "CRT-1: nvidia-auto-select +0+0"
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "DRI"
        Mode        0666
EndSection

Section "Module"
#nb tried without this line, no difference
        Load        "dri"
EndSection

And here is the main output of glxinfo:

Code:

name of display: :0.0
display: :0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
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_NV_swap_group
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_create_context_es2_profile, GLX_MESA_multithread_makecurrent,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_EXT_texture_from_pixmap
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro FX 540/PCIe/SSE2/3DNOW!
OpenGL version string: 1.4 (2.1.2 NVIDIA 295.33)
OpenGL extensions:
    GL_ARB_depth_texture, GL_ARB_draw_buffers, GL_ARB_fragment_program,
    GL_ARB_fragment_program_shadow, GL_ARB_framebuffer_object, GL_ARB_imaging,
    GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query,
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow,
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,
    GL_ARB_texture_rg, GL_ARB_transpose_matrix, GL_ARB_vertex_program,
    GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_draw_range_elements,
    GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample,
    GL_EXT_framebuffer_object, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels,
    GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shadow_funcs,
    GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_texture3D,
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_s3tc,
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod,
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp,
    GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array,
    GL_ATI_draw_buffers, GL_ATI_texture_float, GL_ATI_texture_mirror_once,
    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
    GL_INGR_blend_func_separate, GL_NV_blend_square,
    GL_NV_copy_depth_to_color, GL_NV_depth_clamp, GL_NV_fog_distance,
    GL_NV_fragment_program, GL_NV_fragment_program_option,
    GL_NV_fragment_program2, GL_NV_light_max_exponent,
    GL_NV_multisample_filter_hint, GL_NV_packed_depth_stencil,
    GL_NV_point_sprite, GL_NV_texgen_reflection,
    GL_NV_texture_compression_vtc, GL_NV_texture_env_combine4,
    GL_NV_texture_rectangle, GL_NV_vertex_program, GL_NV_vertex_program1_1,
    GL_NV_vertex_program2, GL_NV_vertex_program2_option,
    GL_NV_vertex_program3, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow,
    GL_SUN_multi_draw_arrays, GL_SUN_slice_accum

I set the LIBGL_DEBUG environment variable, but there was no difference in output.

Also, just a note on my nvidia driver version, I was having serious problems with freezing because of video problems, so I downgraded the Nvidia drivers from the default 295.40 to 295.33, which seems to have solved that problem.

I would be grateful for any help!!

adamk75 05-25-2012 05:25 AM

Code:

client glx vendor string: Mesa Project and SGI
This suggests that you are using the Mesa GL library, not the nvidia one. What is the output of 'ldd /usr/bin/glxinfo'

Adam

TobiSGD 05-25-2012 06:07 AM

Please post what exactly you have done to downgrade the driver (and also a reason why you have downgraded instead of upgrading to the latest version).

dcroxton 05-25-2012 08:44 AM

Quote:

Originally Posted by TobiSGD (Post 4687270)
Please post what exactly you have done to downgrade the driver (and also a reason why you have downgraded instead of upgrading to the latest version).

I was on the latest version, 295.40, because that is what Ubuntu packages, but I was having overflow problems that caused everything to freeze and forced a reboot. I'm sorry I don't have the link now, but I read that this was a known issue with that version of the proprietary drivers and it was recommended to downgrade to 295.33.

As for exactly what I did to downgrade...It wasn't a smooth process, even after 10 years of using Linux I still don't understand X or kernel modules well. I uninstalled the 295.40 drivers, then I had to blacklist nouveau and boot into text mode. From there I just ran the install script from Nvidia's site. (That makes it sound simple; in fact there were a lot of false starts and mistakes along the way.)

cascade9 05-25-2012 09:14 AM

I'd remove your xorg, purge the nvidia drivers, then try the newer drivers. Probably 302.11 beta drivers from xorg-edgers rather than a manual install.

Quote:

Originally Posted by dcroxton (Post 4686847)
I disabled my other monitor because I found something in a log file indicating that it was incapable of direct rendering, so I only have the one monitor to worry about.

*blinks* Monitors dont do direct rendering, its the GPU. AFAIK the chip in the FX540 supports dual monitor direct rendering just fine...

TobiSGD 05-25-2012 09:34 AM

Quote:

Originally Posted by dcroxton (Post 4687390)
I was on the latest version, 295.40,

The latest version is 295.53, so I would try that. Please also look for any errors during the build process and post them here.

fogpipe 05-25-2012 10:13 AM

I have a geforce 210 and my modules section looks like:

Code:

Section "Module"
    Load          "glx"
    Load          "extmod"
    Load          "record"
    Load          "dri2"
    Load          "dbe"
#Load  "dri"
EndSection


The nvidia driver setup program commented out the Load "dri" line.

Just for curiousity sake, what does the command
Code:

cat /var/log/Xorg.0.log|grep dri
return for you?

dcroxton 05-25-2012 06:02 PM

Quote:

Originally Posted by fogpipe (Post 4687459)
I have a geforce 210 and my modules section looks like:

Code:

Section "Module"
    Load          "glx"
    Load          "extmod"
    Load          "record"
    Load          "dri2"
    Load          "dbe"
#Load  "dri"
EndSection


The nvidia driver setup program commented out the Load "dri" line.

Just for curiousity sake, what does the command
Code:

cat /var/log/Xorg.0.log|grep dri
return for you?

Code:

[    30.682] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    30.682]        X.Org XInput driver : 16.0
[    30.683] (II) "dri" will be loaded by default.
[    30.683] (II) "dri2" will be loaded by default.
[    30.747] (II) LoadModule: "dri"
[    30.747] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[    30.747] (II) Module dri: vendor="X.Org Foundation"
[    30.747] (II) LoadModule: "dri2"
[    30.748] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[    30.748] (II) Module dri2: vendor="X.Org Foundation"
[    30.748] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    30.750] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    32.634] (II) Loading sub module "dri2"
[    32.634] (II) LoadModule: "dri2"
[    32.634] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[    32.634] (II) Module dri2: vendor="X.Org Foundation"
[    32.634] (II) NVIDIA(0): [DRI2]  VDPAU driver: nvidia
[    32.677]        ABI class: X.Org XInput driver, version 16.0
[    32.677] (II) Using input driver 'evdev' for 'Power Button'
[    32.678] (II) Using input driver 'evdev' for 'Power Button'
[    32.679] (II) Using input driver 'evdev' for 'Logitech USB Receiver'
[    32.680] (II) No input driver specified, ignoring this device.
[    32.680] (II) Using input driver 'evdev' for 'HID 0b38:0010'
[    32.681] (II) Using input driver 'evdev' for 'HID 0b38:0010'
[    32.682] (II) Using input driver 'evdev' for 'HP 3-MegaPixel Webcam GX607AA'
[    32.683] (II) No input driver specified, ignoring this device.
[    32.683] (II) No input driver specified, ignoring this device.
[    32.683] (II) No input driver specified, ignoring this device.
[    32.683] (II) No input driver specified, ignoring this device.
[    32.684] (II) No input driver specified, ignoring this device.


dcroxton 05-25-2012 06:03 PM

Quote:

Originally Posted by adamk75 (Post 4687239)
Code:

client glx vendor string: Mesa Project and SGI
This suggests that you are using the Mesa GL library, not the nvidia one. What is the output of 'ldd /usr/bin/glxinfo'

Adam

Code:

        linux-gate.so.1 =>  (0xb779d000)
        libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xb7720000)
        libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb75ec000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7446000)
        libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb7430000)
        libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb741e000)
        libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb741a000)
        libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb7414000)
        libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb7410000)
        libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb73f8000)
        libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb73d7000)
        libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb73d1000)
        libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb73c4000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb73a8000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb73a3000)
        /lib/ld-linux.so.2 (0xb779e000)
        libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb739f000)
        libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb7398000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb738f000)


adamk75 05-25-2012 06:23 PM

Right, see how it's linking against the libGL.so.1 in the mesa directory? What's the output of:

Code:

find /usr/lib/ -iname "libGL.so.1" -exec ls -latd {} \;

dcroxton 05-25-2012 06:33 PM

You guys are awesome! I upgraded to the 295.53 driver and direct rendering was immediately on. The output of glxgears was the same, but I can definitely tell a difference in rendering speed, not to mention less CPU usage.

In re the second monitor, it is entirely possible that I misunderstood something. I'm sure I read something like that -- and I had the same reaction, that I didn't think the monitor would make a difference -- but I probably didn't understand it properly. I turned it back on and it works fine.

In re the MESA GL drivers, I get the following output when running that command:

Code:

lrwxrwxrwx 1 root root 15 May 25 19:21 /usr/lib/libGL.so.1 -> libGL.so.295.53
Keep in mind that I had reinstalled the nvidia driver in the meantime, and in fact now that I check it, the client glx vendor string now says "NVIDIA Corporation". I did get an error during the build process: "unable to restore symbolic link /usr/lib/i386-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2 (File exists)" but I'm assuming that doesn't matter at this point.

Thank you so much for your help!


All times are GMT -5. The time now is 07:03 PM.