Google Chrome screen tearing after resuming from sleep

Hello, I experience heavy screen tearing on google-chrome version 87.0.4280.66 stable.

This is only happening on chrome after I resume from sleep and start scrolling. It started from version 82 I think, I report only now because I thought that it will get fixed :frowning: . I googled and tried several solutions with no avail this and this and similar stuff.

$ inxi -SGxx

  System:   Host: HELLRIDER Kernel: 5.4.77-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: Xfce 4.14.3 
           tk: Gtk 3.24.23 wm: xfwm4 dm: LightDM Distro: Manjaro Linux 
Graphics:  Device-1: Intel Core Processor Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0046 
           Device-2: NVIDIA GT216M [GeForce GT 325M] vendor: ASUSTeK driver: nvidia v: 340.108 bus ID: 01:00.0 
           chip ID: 10de:0a35 
           Device-3: IMC Networks 2M Integrated Webcam type: USB driver: uvcvideo bus ID: 1-1.2:3 chip ID: 13d3:5122 
           Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia resolution: 1600x900~60Hz s-dpi: 96 
           OpenGL: renderer: GeForce GT 325M/PCIe/SSE2 v: 3.3.0 NVIDIA 340.108 direct render: Yes 
  

I only use the nvidia graphics. These are the enabled chrome flags
chrome_gpu_flags_2020-11-19_14-52-11

So if I enable vulkan its even worse, I have managed to enable out of process rasterization but the outcome is same.
Any help is appreciated.

Hello @GokuSan :wink:

Questions:

  1. Do you have the same issue with chromium-browser?
  2. Which gpu is used for chrome? intel or nvidia?
  3. Is tearfree enabled? https://wiki.archlinux.org/index.php/Intel_graphics#Tearing

So it only happens after resuming, right? In fact gpu acceleration is still buggy on linux and i have also the same issue. I just restart the chrome browser and it is fixed. Could be more a chrome issue than a linux one, idk.

There’s no point enabling flags in Chrome, hardware acceleration won’t work as it’s not supported on Linux. However, Chromium is compiled with VA-API support. See: Chromium - ArchWiki

Hello,

@megavolt
Answers:

  1. I tried brave-browser which is chromium based, I think it uses the same engine, so its same over there.
  2. I use nvidia gpu, I did a tutorial from the old forum that sets nvidia as only gpu, like from day 1 when I switched to linux ( almost two years now :slight_smile: )
  3. I have created and tired file 20-nvidia.conf, which doesn’t do anything for this problem, because this is only chrome and chrome based browsers problem I think. In Firefox I don’t have any problems its buttery smooth :slight_smile: , with hardware acceleration on.
    Btw I deleted the 20-nvidia.conf 'cause I dont’t see any difference in regards to my overall system.

yes , temporary solution is either restart browser on resume or turnoff hardware acceleration in settings/advanced/system in chrome.
For me personally the first is annoying, and the second is making my cpu go haywire if I have more than 2 tabs opened which is no good.

@Yochanan
Well it use to work prior to 82 version I think. I mean since I installed chrome on my machine it worked with hardware acceleration enabled.Its like I said almost two years with manjaro, prior was windows 7.
I will look into the link you posted and see what comes up :slight_smile:

It will appear it’s enabled in chrome://gpu but it’s actually not. The wiki article explains how you can verify its actually working or not.

Thanks @Yochanan’s link I found a solution, by reading whole thing and other stuff :smiley:

So it turns out that I was missing VDPAU driver with VAAPI backend so I installed libvdpau-va-gl package. Its available in the manjaro official repositories as well.

So now I have

  1. libvdpau - Nvidia VDPAU library

  2. libvdpau-va-gl - VDPAU driver with OpenGL/VAAPI backend

  3. chrome-flags.conf - in ~/.config/ with one simple flag inside --use-gl=desktop

If you don’t have chrome-flags.conf file create it touch ~/.config/chrome-flags.conf
For chromium browser the file would be chromium-flags.conf.

All other flags are just like in the picture above.

That’s it enjoy :slight_smile:

@megavolt just to mention you in case you don’t see this. Try this if you haven’t :wink:

Did you test and verify the Mojo decoder is in use?

@Yochanan

According to chrome://media-internals

Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED} 

So its still in-software decoding, but the screen tearing is gone.
Also according to

chrome://gpu

|GL_VENDOR|NVIDIA Corporation|
|GL_RENDERER|GeForce GT 325M/PCIe/SSE2|
|GL_VERSION|3.3.0 NVIDIA 340.108|
|Window system binding vendor|NVIDIA Corporation|

Which wasn’t the case before. And on 10 opened tabs 6 youtube videos and 4 other ones the cpu is stable around 15-20% and temperature is 45-47 celsius, so its good enough for me. :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.