[screensaver] Screen blanks during video playback in Chrome and Firefox under Xwayland

Bug #1697373 reported by Jean-Baptiste Lallement
214
This bug affects 48 people
Affects Status Importance Assigned to Milestone
X.Org X server
New
Undecided
Unassigned
xorg-server (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

gnome-shell / gdm / wayland

Test Case:
1. Launch netflix in chrome
2. Play a video
3. Wait until the display times out.

Expected result
The screen does not dim

Actual result
The display goes black.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: gnome-shell 3.24.2-0ubuntu6
ProcVersionSignature: Ubuntu 4.10.0-22.24-generic 4.10.15
Uname: Linux 4.10.0-22-generic x86_64
ApportVersion: 2.20.5-0ubuntu4
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon Jun 12 09:21:46 2017
DisplayManager: gdm3
InstallationDate: Installed on 2013-09-03 (1377 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130902)
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

gnome-shell only knows that Chrome/Chromeium is running. It does not know what the browser is doing.

So if you want to disable blanking specifically during video playback, that's a browser enhancement. You might need to log a bug directly with Chromium/Chrome upstream.

affects: gnome-shell (Ubuntu) → chromium-browser (Ubuntu)
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The behaviour is different in unity7 and gnome-shell. In unity7 screen blanking is disabled during video playback. Tested on the same machine with same settings.

On unity7 I did the following test:
1. Set screen blanking to 2 min
2. Wait 2 min with nothing playing
  -> The display goes black after 2 min
3. Play a netflix video in Chrome
  -> The display does not go black after 2 min

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh... probably a duplicate of bug 1692762 :)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I am not sure it is a duplicate because I am using GDM

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, that's the opposite of your problem :)

Back on topic with this bug...

I don't know what API(s) are being used by the browser to disable video playback, but there are only a few probable options:

  (a) The API is different between telling Unity7 and Gnome Shell to not blank, and Chrome doesn't support the latter; or
  (b) The API is different between telling Unity7 and Gnome Shell to not blank, and Chrome does support both but gnome-shell is ignoring it; or
  (c) The API is the same for both Unity7 and Gnome Shell, and gnome-shell is ignoring it.

So yeah, in both (b) and (c) we would need a gnome-shell task. But there are many possible reasons as to why this is broken. Needs more research.

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

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

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It appears that Xwayland on artful has no DPMS support yet:

https://cgit.freedesktop.org/xorg/xserver/tree/Xext/dpmsstubs.c?h=server-1.19-branch
https://cgit.freedesktop.org/xorg/xserver/tree/hw/xwayland/Makefile.am?h=server-1.19-branch

So Chromium can't use DPMS to disable blanking:

https://chromium.googlesource.com/chromium/src.git/+/master/device/power_save_blocker/power_save_blocker_x11.cc#427

Looks like the situation is changing in trunk Xorg/Xwayland but unclear what the status of DPMS support is (dpmsstubs.c no longer exists).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Assigned to xorg-server because the feature simply does not exist in Xorg/Xwayland 1.19.

Either Xwayland (source: xorg-server) needs enhancement to support DPMS, or Chromium needs enhancement to use something other than DPMS.

affects: gnome-shell (Ubuntu) → xorg-server (Ubuntu)
summary: - Do not dim/lock the screen when a video is playing
+ [screensaver] Screen blanks during video playback in Chrome under
+ Xwayland
Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
Changed in xorg-server (Ubuntu):
importance: Undecided → Medium
Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Olivier Tilloy (osomon) wrote : Re: [screensaver] Screen blanks during video playback in Chrome under Xwayland

chromium 61.0.3163.31 (from the beta channel) still affected.

Revision history for this message
Chai T. Rex (chaitrex) wrote :
Revision history for this message
funicorn (funicorn) wrote :

I confirm that also happens in firefox 57 on Ubuntu 17.10.

Firefox: 57.0
Ubuntu: 17.10
Gnome-shell 3.26.2
xwayland:2:1.19.5-0ubuntu2

PS I noticed there is a '-v' option for wayland that runs with "screen-saver without video blanking". Is that helpful?

Or Schiro (orschiro)
summary: - [screensaver] Screen blanks during video playback in Chrome under
- Xwayland
+ [screensaver] Screen blanks during video playback in Chrome and Firefox
+ under Xwayland
Rafał Sadowski (esdoes)
no longer affects: chromium-browser
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

From what I can tell, Xwayland is still missing DPMS support:
https://cgit.freedesktop.org/xorg/xserver/tree/hw/xwayland/

And that's still what all X apps need to use. For example:
https://chromium.googlesource.com/chromium/src.git/+/master/services/device/wake_lock/power_save_blocker/power_save_blocker_x11.cc

This is a bug in Xwayland only. Xwayland needs to be modified to convert DPMS requests from clients like web browsers into calls to this:
https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/idle-inhibit

no longer affects: chromium-browser (Ubuntu)
Changed in xorg-server (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Or Schiro (orschiro) wrote :

As a workaround I found this GNOME extension:

https://extensions.gnome.org/extension/517/caffeine/

If you go into F11 fullscreen during playback, the screen no longer blanks. :-)

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Still happpening in Ubuntu 18.04. Maybe not that important now that wayland is not the de default session, but nonetheless worth of fixing I think

Revision history for this message
satya gowtham (satyagowtham-k-gmail) wrote :

its problem with vlc as well; I'm neither using wayland.

Revision history for this message
Mike (0x656b694d) wrote :

Still there with Ubuntu 19.10.

Revision history for this message
Krishnakanth (krish9861) wrote :

yah it affects my new installation of ubuntu 18.04 lts

Revision history for this message
john (yegnal) wrote :

Yes, cannot watch video without display locking

Revision history for this message
Abdulla Masud (abdulla95) wrote :

Having this issue on Xubuntu 19.10

Revision history for this message
Jason Mitchell (jasonjamesmitchell) wrote :

Having this issue on Lubuntu 20.04.1 as well.

Revision history for this message
Hicks (hicks1gb) wrote :

Ubuntu hirsute hippo too

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.