Chromium fullscreen should be unredirected by default

Bug #1442728 reported by Kevin Keijzer
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Fix Released
Medium
Eleni Maria Stea
Trusty
Fix Released
Medium
Eleni Maria Stea
Xenial
Fix Released
Medium
Eleni Maria Stea

Bug Description

The default Compiz settings cause Chromium to tear when fullscreen.
See also: https://code.google.com/p/chromium/issues/detail?id=344141

By default, "Unredirect Match" contains
(any) & !(class=Totem) & !(class=MPlayer) & !(class=Vlc) & !(class=Plugin-container) & !(class=Firefox)

This means that fullscreen Chromium videos bypass Compiz, causing them to tear (no V-sync).
Firefox, Totem, VLC and MPlayer videos do not tear when fullscreen, because of the line above.

Due to the popularity of the Chromium browser (and Chrome, now it has brought Netflix to Ubuntu), it should be added to the default Compiz settings, changing the line to

(any) & !(class=Totem) & !(class=MPlayer) & !(class=Vlc) & !(class=Plugin-container) & !(class=Firefox) & !(class=Chromium)

Most likely & !(class=^Google-chrome) should be added as well.

It's very tedious to do this on each and every machine I install, and I would say that having both Firefox and Chromium be unredirected is a more sane default than just Firefox. Especially because Chromium is the only browser on Ubuntu with full MSE support and Chrome being the only way to use Netflix.

[impact]
Compiz doesn't handle by default the fullscreen windows and this causes tearing in some browsers like Chrome. With the fix revno 3994 compiz handles the chrome windows in fullscreen and the tearing is gone.

[test case]
Open chrome in fullscreen and start a video. You will see some tearing.
Close chrome, apply the compiz patch.
Open chrome in fullscreen and play the same video. There's no more tearing.

[regression potential]
-

Related branches

Revision history for this message
Alexander Kashev (kav2k) wrote :

For the record, "Chromium" class (or "Chrome") will not work for Chrome browser.

Corresponding classes are "Google-chrome-stable", and presumably "Google-chrome-beta", "Google-chrome-unstable".

So for Chrome, the needed filter is "& !(class=^Google-chrome)".

Revision history for this message
Kevin Keijzer (kkeijzer) wrote :

Changed, thanks.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Kevin Keijzer (kkeijzer) wrote :

As part of the big bug review for 16.04 LTS I have tested this on 15.10 and the bug is still there.

tags: added: desktop-bugscrub-triaged
Mathew Hodson (mhodson)
Changed in compiz (Ubuntu):
importance: Undecided → Low
Will Cooke (willcooke)
no longer affects: compiz
Changed in compiz (Ubuntu Xenial):
assignee: nobody → Eleni Maria Stea (hikiko)
importance: Low → Medium
Revision history for this message
Chad Miller (cmiller) wrote :

X window properties:

chromium-browser: WM_CLASS(STRING) = "chromium-browser", "chromium-browser"
google-chrome: WM_CLASS(STRING) = "google-chrome", "google-chrome"

Revision history for this message
Chad Miller (cmiller) wrote :

(any) & !(class=Totem) & !(class=MPlayer) & !(class=Vlc) & !(class=Plugin-container) & !(class=Firefox) & !(class=chromium-browser) & !(class=google-chrome)

Eleni, many of these values appear to be old or wrong. Here's what

$ xprop WM_CLASS | cut -d\" -f4
chromium-browser
$ xprop WM_CLASS | cut -d\" -f4
Totem
$ xprop WM_CLASS | cut -d\" -f4
vlc
$ xprop WM_CLASS | cut -d\" -f4
mplayer2
$ xprop WM_CLASS | cut -d\" -f4
Firefox
$ xprop WM_CLASS | cut -d\" -f4
google-chrome

I don't know were "plugin-container" comes from. mplayer2 is kind of new.

My suggestion:

(any) & !(class=Totem) & !(class=MPlayer) & !(class=mplayer2) & !(class=vlc) & !(class=Firefox) & !(class=chromium-browser) & !(class=google-chrome)

That fixes vlc, adds chromium-browser and google-chrome, leaves old MPlayer and adds new mplayer2. Firefox and Totem are unchanged.

Revision history for this message
Chad Miller (cmiller) wrote :

That's a lot of exclamation and parens.. Can't we de-Morgan's some of that away?

(any) & !(class=Totem | class=MPlayer | class=mplayer2 | class=vlc | class=Firefox | class=chromium-browser | class=google-chrome)

I don't know if that's valid.

Revision history for this message
J.Pasat (justxux) wrote :

I have Ubuntu 15.10 installed now and i don't experience screen tearing,like in previous versions of Ubuntu. Still don't know why. Maybe i can post some logs or information to help.

Revision history for this message
Will Cooke (willcooke) wrote :

@skini151 - can you let me know the spec of your CPU? cat /proc/cpuinfo

I'm starting to wonder if this is most visible in lower spec CPUs. For example, my i3 2.1GHz machine shows tearing without this change and no tearing with it.

Revision history for this message
Per-Inge (per-inge-hallin) wrote :

The suggestion in post #6 fixed the issue on my system, when playing a C More Channel in Chrome Version 47.0.2526.111 (64-bit).
Ubuntu Xenial Xerus
Radeon R9 380
AMD FX -8120

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.12.2+16.04.20160209-0ubuntu1

---------------
compiz (1:0.9.12.2+16.04.20160209-0ubuntu1) xenial; urgency=medium

  [ Eleni Maria Stea ]
  * chrome and chromium windows are considered compiz windows in
    fullscreen to avoid tearing (Bug #1442728) (LP: #1442728)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Tue, 09 Feb 2016 01:16:01 +0000

Changed in compiz (Ubuntu Xenial):
status: Confirmed → Fix Released
Revision history for this message
Omer Akram (om26er) wrote :

We need this backported to trusted. I created a diff in the duplicate report. Which branch shall I propose the change to ? I'll definitely find a patch pilot to get that uploaded.

Changed in compiz (Ubuntu Trusty):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Omer Akram (om26er) wrote :

To add a little, this also potentially fixes a system crash where exiting fullscreen in chrome/chromium results in unity hanging completely, where I have to restart session from a tty.

This issue is no longer happening since yesterday after I adding google-chrome to the setting.

Revision history for this message
Will Cooke (willcooke) wrote :

@ Hikiko - please prepare the SRU.

Changed in compiz (Ubuntu Trusty):
assignee: nobody → Eleni Maria Stea (hikiko)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello the-unconventional, or anyone else affected,

Accepted compiz into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/compiz/1:0.9.11.3+14.04.20160425-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in compiz (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.11.3+14.04.20160425-0ubuntu1

---------------
compiz (1:0.9.11.3+14.04.20160425-0ubuntu1) trusty; urgency=medium

  [ Eleni Maria Stea ]
  * backported fix: #1442728 (Chrome and Chromium windows must be
    handled by Compiz in fullscreen) to trusty. (LP: #1442728)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Mon, 25 Apr 2016 16:30:40 +0000

Changed in compiz (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for compiz has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.