Chromium hardware acceleration and animations makes all monitors lag in video playback

Everything about displays and monitors. 120Hz, 144Hz, 240Hz, 4K, 1440p, input lag, display shopping, monitor purchase decisions, compare, versus, debate, and more. Questions? Just ask!
Post Reply
mortenmoulder
Posts: 2
Joined: 03 Dec 2021, 12:42

Chromium hardware acceleration and animations makes all monitors lag in video playback

Post by mortenmoulder » 03 Dec 2021, 12:48

I've asked everywhere I know, and a friend of mine suggested I also ask here, which makes a lot of sense. I'm quite tech savvy, and this post should lack no information, otherwise feel free to ask.

I have been experiencing some very, very odd issues with Chromium on Windows 10 and 11. I tried two different Chromium based browsers (Chrome and Brave), and they both do the same.

A little about my setup: 1x 4K monitor, 1x 1440p monitor, 1x 1080p monitor, Ryzen 3900X, RTX 3070, and 32GB of RAM. All monitors are set to 100% DPI in Windows and they run at native resolution with latest Nvidia drivers as well.

When a browser is maximized on my 1080p monitor and an animation is playing, such as Facebook's "someone is typing a comment" or just regular CSS animations, video playback on the 4K and 1440p monitors start to lag completely, resulting in the videos going stuck at some point (infinite buffering). The very second I switch tabs or the animations on the 1080p monitor stops, the video starts playing again.

I originally had this problem in Windows 10, but I decided to completely wipe my SSD and install Windows 11. I installed Brave and decided not to import any settings from Chrome, so it was a perfect default installation. However, the exact same problem happens.

If I turn off hardware acceleration in chrome://flags and restart the browsers, it works flawlessly. Video playback is fine, although 4K 60 FPS on YouTube is a bit choppy at times. If I don't maximize the browser and it just runs in a window, it works flawlessly as well.

At this point I'm suspecting a couple of things could be wrong:
  • Chromium (unlikely as nobody else has reported this problem afaik)
  • Hardware (CPU, GPU, motherboard)
I can eliminate bad drivers because I reinstalled Windows, as well as tried a couple of different Nvidia drivers. I think actual hardware is unlikely, as I only experience issues using Chromium.

Here's a list of things I have tried:
  • Different HDMI cable
  • Different port on the GPU
  • Swap the monitor with another 1080p monitor
  • Reinstall Windows
  • Change resolutions, refresh rate, etc. of all monitors
To replicate the problem, I simply have to open this page (a square spinning using CSS animations) on my 1080p monitor and play any YouTube video on another monitor: https://codepen.io/teerapuch/pen/vLJXeR

To see a recorded example using my phone (just to rule out any PC issues), here's a link: https://www.youtube.com/watch?v=ufsDsV6_HCg

When the animation is playing, the video playback stops. When I switch to this post's tab (where there are no animations), it resumes the video playback.

Where do I even begin to debug this behavior? There are no errors in the Event Viewer or anywhere else I've looked.

User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Chromium hardware acceleration and animations makes all monitors lag in video playback

Post by Chief Blur Buster » 05 Dec 2021, 20:11

I traced some of this to a bug in NVIDIA graphics drivers, and switched graphics drivers (clean reinstall, etc).

Disabling GSYNC on both monitors can sometimes help, as does switching ports (HDMI vs DP).

Different-Hz multimonitors creates some weird conflicts (including deadlocks) in some graphics drivers when they try to do hardware acceleration on both screens simultaneously.

I have not been able to reproduce it recently, but it's definitely a GPU driver related bug. It pulls my hair out whenever this happens, as it primarily happens only on high-Hz multimonitor systems.

Disabling settings in chrome://flags sometimes helps; but don't disable too many -- try surgically toggle one at a time, until you hit the problem flag. Remember to retest testufo.com to make sure that a maximized TestUFO on primary monitor (with no pixels changing on secondary).

But first, try disabling GSYNC on your secondary monitor and see if GSYNC-primary-only works. Failing that, try disabling windowed GSYNC, and blacklist Chromium in your per-application settings away from enabling GSYNC while playing in fullscreen mode. NVIDIA control panel tends to refuse to add Chromium, so renaming chrome.exe to anotherchrome.exe and then configuring it to use VSYNC ON with GSYNC disabled, can allow GSYNC to work for other apps but avoid working on Chrome.

NVIDIA needs to let me add chrome.exe to NVIDIA Control Panel, but currently NVIDIA is not letting me do it, unless I rename "chrome.exe" to another name.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

mortenmoulder
Posts: 2
Joined: 03 Dec 2021, 12:42

Re: Chromium hardware acceleration and animations makes all monitors lag in video playback

Post by mortenmoulder » 06 Dec 2021, 09:39

Chief Blur Buster wrote:
05 Dec 2021, 20:11
I traced some of this to a bug in NVIDIA graphics drivers, and switched graphics drivers (clean reinstall, etc).

Disabling GSYNC on both monitors can sometimes help, as does switching ports (HDMI vs DP).

Different-Hz multimonitors creates some weird conflicts (including deadlocks) in some graphics drivers when they try to do hardware acceleration on both screens simultaneously.

I have not been able to reproduce it recently, but it's definitely a GPU driver related bug. It pulls my hair out whenever this happens, as it primarily happens only on high-Hz multimonitor systems.

Disabling settings in chrome://flags sometimes helps; but don't disable too many -- try surgically toggle one at a time, until you hit the problem flag. Remember to retest testufo.com to make sure that a maximized TestUFO on primary monitor (with no pixels changing on secondary).

But first, try disabling GSYNC on your secondary monitor and see if GSYNC-primary-only works. Failing that, try disabling windowed GSYNC, and blacklist Chromium in your per-application settings away from enabling GSYNC while playing in fullscreen mode. NVIDIA control panel tends to refuse to add Chromium, so renaming chrome.exe to anotherchrome.exe and then configuring it to use VSYNC ON with GSYNC disabled, can allow GSYNC to work for other apps but avoid working on Chrome.

NVIDIA needs to let me add chrome.exe to NVIDIA Control Panel, but currently NVIDIA is not letting me do it, unless I rename "chrome.exe" to another name.
Thanks for the reply!

I have already tried enabling and disabling G-Sync. I generally have it disabled, both in Nvidia Control Panel and directly on the monitor.

Trying to disable random flags in Chrome until I may stumble upon one that triggers it, doesn't seem like a great approach :( I understand what you mean, when you say it pulls your hair out. I'm literally clueless at this point. It seems like such an odd case, that I honestly can't explain, even with my experience in tech.

I would offer a bounty, but I'm not sure if there are any rules against that. If I can't fix it myself, I might as well try to pay my way out of it.

Post Reply