Screen tearing in Chrome while watching Netflix in full-screen on 14.04 LTS
Running Ubuntu 14.04 on an ASUS laptop with Intel HD 4000 graphics. The issue is only in Netflix.Screen tearing only persists if I'm full screen. Windowed mode works fine. Running movies in VLC is fine and has no tearing. I'm using Google Chrome Version 40.0.2214.111 (64-bit).
How should I proceed?
Solution 1:
This issue occurred after updating 14.04.2. To fix tearing in Chrome while watching Netflix full-screen do the following:
-
Install CompizConfig Settings Manager:
sudo apt-get install compizconfig-settings-manager
Open CompizConfig Settings Manager.
Click Composite.
In Unredirect Match, add
& !(class=^Google-chrome)
to the end of the line.
This prevents Chrome windows from being unriderected, while leaving other fullscreen windows unredirected. Unredirecting fullscreen windows lets fullscreen apps draw directly to the screen, which should result in higher performance. That also means the app drawing has to manage v-sync if it cares about it. Chrome does not do v-sync by itself when there's a compositing window manager. Thus it relies on Compiz to do it. That's why we need to let Compiz redirect Chrome and manage v-sync for it. In order to not hurt other apps' performance, we add an exception to the Unredirect Match rules instead of turning off the feature altogether. Note that !(class=google-chrome)
is already there by default but it doesn't work. The current Chrome window class starts with a capital "G" whereas the default rule starts with a lowercase "g". It may be possible that the window class got changed during a Chrome update at some point between the rule being added to Ubuntu and now. It could also be a regression in Ubuntu that changed the leading "G" was changed to "g".