Video tearing/Xorg high CPU usage

Hello all,

I posted a thread ([link](https://forums.opensuse.org/showthread.php/513323-Frustratingly-tenacious-tearing-issue-with-NVidia-Gnome)) in the "Applications" section a few days ago because I've been experiencing serious issues with video tearing in Gnome 3.16 with the NVidia official drivers. I put more thorough system info in the original thread, but if any other details would be useful, please ask. I had been chasing leads on enabling VSync, but after some further observations and tests, I suspect it may be more driver related. When I'm playing a video, There is quite a bit of horizontal tearing making movies pretty much unwatchable. However, I noticed that when I switch webpages or applications, the new screen usually loads in a quick series of horizontal strips. To me this indicates poor rendering performance rather than vsync issues. However, my GTX 770 should be more than capable of handling videos and webpages. I also noticed that the "Xorg" process saturates a CPU core when playing a video, and it spikes when I scroll on a webpage or switch tabs, indicating that it is software rendering rather than using the GPU. I ran "glxinfo | grep render" and the output seems to be correct for hardware rendering:

direct rendering: Yes
OpenGL renderer string: GeForce GTX 770/PCIe/SSE2
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_KTX_buffer_region, GL_NVX_conditional_render, GL_NVX_gpu_memory_info, 
    GL_NV_compute_program5, GL_NV_conditional_render, 
    GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_KTX_buffer_region, GL_NVX_conditional_render, GL_NVX_gpu_memory_info, 
    GL_NV_compute_program5, GL_NV_conditional_render, 
    GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite, 
    GL_EXT_render_snorm, GL_EXT_robustness, GL_EXT_sRGB, 
    GL_NV_conditional_render, GL_NV_copy_buffer, GL_NV_copy_image, 
    GL_NV_path_rendering, GL_NV_pixel_buffer_object, GL_NV_polygon_mode, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,

So I guess here’s my question: Am I correct in assuming that some form of software rasterizing is happening when it should be using the GPU? If so, I would greatly appreciate some assistance in solving this issue. Thanks in advance for any ideas.

Definitely sounds like it.

The first thing that comes to my mind is libvdpau_va_gl1, which shouldn’t be used on nvidia systems as it “replaces” nvidia’s VDPAU with a software decoder.
It is only really useful on intel systems which don’t support VDPAU, and might have been installed automatically because of an intel GPU that probably is integrated in your CPU. (it supplements the intel X driver…)

Uninstall that package if it is installed.

The libvdpau_va_gl1 package is not installed, the only package that shows up checked when I search “libvdpau” is “libvdpau1”. Both firefox and Chromium say that hardware acceleration is disabled. Here’s the contents of Chromium’s “chrome://gpu” page:


**Graphics Feature Status**




  - Canvas: Software only, hardware acceleration unavailable
  - Flash: Software only, hardware acceleration unavailable
  - Flash Stage3D: Software only, hardware acceleration unavailable
  - Flash Stage3D Baseline profile: Software only, hardware acceleration unavailable
  - Compositing: Software only, hardware acceleration unavailable
  - Multiple Raster Threads: Unavailable
  - Rasterization: Software only, hardware acceleration unavailable
  - Video Decode: Software only, hardware acceleration unavailable
  - Video Encode: Software only, hardware acceleration unavailable
  - WebGL: Unavailable



**Driver Bug Workarounds**




  - clear_uniforms_before_first_program_use
  - init_gl_position_in_vertex_shader
  - init_vertex_attributes
  - scalarize_vec_and_mat_constructor_args
  - use_current_program_after_successful_link



**Problems Detected**




  - GPU process was unable to boot: GPU access is disabled in chrome://settings.
*Disabled Features: all*
  - *Always call glUseProgram after a successful link to avoid a driver bug: [349137](http://crbug.com/349137)*
*Applied Workarounds: use_current_program_after_successful_link*
  - **Program link fails in NVIDIA Linux if gl_Position is not set: [286468](http://crbug.com/286468)**
*Applied Workarounds: init_gl_position_in_vertex_shader*
  - ***Clear uniforms before first program use on all platforms: [124764](http://crbug.com/124764), [349137](http://crbug.com/349137)***
*Applied Workarounds: clear_uniforms_before_first_program_use*
  - ***Linux NVIDIA drivers don't have the correct defaults for vertex attributes: [351528](http://crbug.com/351528)***
*Applied Workarounds: init_vertex_attributes*
  - ***Always rewrite vec/mat constructors to be consistent: [398694](http://crbug.com/398694)***
*Applied Workarounds: scalarize_vec_and_mat_constructor_arg*


****
****

Any plan of attempting to install the .run installer from nvidia?
There are two versions that you can try if you decide.
The long lived branch and the short lived branch.
One of the two might help, right now I am using the short lived branch on a gtx 650 ti.

So I installed Nvidia driver version 361.28 “the hard way” from the .run package, but no dice. Interestingly, Xorg doesn’t eat up the CPU like it did before. When playing a 20Mbps video from my local Plex server, Xorg uses 30-40% of a CPU core. The glxinfo command still indicates that hardware rendering is enabled. I am thoroughly stumped. Any other ideas?

If you run nvidia-settings and under
OpenGL Settings-Performance
You try to un-check all.

I tried unchecking all, but no change. Also, I just tried playing a video through VLC from a local file, and it didn’t tear at all. I don’t know if I fixed it with something I did, or I was wrong when I initially thought the issue affected VLC as well. Now it only seems to be a problem in browsers, although it does affect both chromium and firefox. Chrome://gpu is still saying software rasterizing for everything, even if I force gpu acceleration in chrome://flags. Is there any chance the web browsers are just not properly detecting the video card?

You might try to install vdpau-video (from Packman). AFAIK openSUSE’s chromium is patched to use libva, vdpau-video is a VDPAU (nvidia) driver for libva.

PS: You might be affected by this:
https://bugzilla.opensuse.org/show_bug.cgi?id=965566

Which I think is actually a duplicate of https://bugzilla.opensuse.org/show_bug.cgi?id=966082.