In earlier Ubuntu versions like 16.04 and 17.04 while watching YouTube videos in full-screen mode, the screen would not get locked automatically.

In Ubuntu 17.10 while watching videos in browser, system is getting locked. So Ubuntu 17.10 is considering this scenario as user is not doing anything.

Kindly suggest a solution for that.

  • Did you install gnome-tweak? In that program there are some settings that are not in the normal setttings. And yes it has a few I would consider needed (without it I could not set my system to NOT kill my wifi cuz gnome-tweak has an extra setting for "suspend" that was always ON despite normal settings it was set OFF).
    – Rinzwind
    Oct 26 '17 at 8:56
  • 1
    @Rinzwind The correct package name is gnome-tweak-tool I believe.
    – pomsky
    Oct 26 '17 at 10:27
  • Do you use VLC? If yes, then go to preferences and disable screensaver. It will prevent your screen from going dark. Nov 10 '17 at 16:24
  • 1
    @Manish Kumar Bisht , I would think having to manually disable the screensaver any time one wanted to watch a video would, at best, be a VERY short-term patch if the problem is as described.
    – jpezz
    Nov 10 '17 at 16:33
  • Did you try other media players that are known to support screensaver inhibition, e. g. Totem or VLC or the native video player of your web browser (typically Firefox or Chrome/Chromium)? MPV isn't that well maintained and Flash player never supported screensaver inhibition. Many web sites don't require Flash to play back videos these days, if you disable it. Nov 11 '17 at 0:24

The reason that this does not work any more is because 17.10 is the first ubuntu release that uses wayland as its display server. It looks like preventing screen lock is an entirely missing feature in Xwayland.

It has been filed as a bug in Ubuntu and hopefully will be fixed soon. If you're affected by this bug, please click the launchpad link below and click "Does this bug affect you?" to increase the bug priority.


As a workaround, you could also select "GNOME on X.org" as your session type when logging on.

There is also a bug in chromium, but it seems to apply only for google hangouts sessions:



You may have to use the great Caffeine, available from here. You have to allow installing extension from Firefox or install the Ubuntu package gnome-shell-extension-caffeine thanks to the command apt. This extension detect any full screen application and prevent from running screensaver. It also adds a small cup beside your volume icon, letting you to disable the screen saver with one click.

Apt method

Open your Terminal, and type

sudo apt install gnome-shell-extension-caffeine

Then go to Gnome Tweak, click on Extensions tab, and enable Caffeine

Gnome Shell extension

Open https://extensions.gnome.org/extension/517/caffeine/ from Firefox, click on Allow from the top bar asking for Gnome Shell Integration. Enable then Caffeine extension.

  • Or Keep Awake extensions.gnome.org/extension/1097/keep-awake Nov 10 '17 at 20:37
  • Thanks, I searched before asking and could not find answer, it was not so strait forward, I had to go back and forth a few time ... I'll go with what I remember. I had to reboot cause the extension was not showing (I probably just had to log out). Installing Tweak and the extension from command line did not work, I wonder why ?
    – kbenoit
    Nov 11 '17 at 2:41
  • Also one can install Caffeine app (not the extension) by running sudo apt install caffeine.
    – pomsky
    Nov 11 '17 at 16:14

You may try a GNOME shell extension as a workaround called Keep awake!

Product description:

Keep your computer awake! Forbid your computer to activate sceensaver, turn off the screen or suspend when it is idle for a while. Toogle [sic] this option on or off with one click.

Once you install this extension you'll see an "eye" icon in your top bar.

enter image description here
(screenshot source: extension's homepage at extensions.gnome.org)

Clicking on the eye will switch between "normal" and "no screen-lock or suspend" mode.

Another advanced extension which does the same but provides more customisability is Caffeine.

Warning: There is (or was, not sure whether it's fixed already) a bug in Caffeine which may freeze your computer for ~30 seconds after clicking on the power-off button in the status menu.

  • I posted a duplicate question, sorry. As pomsky said, there should be a bug in Caffeine (there a comment from a couple of days about it), but I should be able to fix it, if I step on it, but I could not see it so far.
    – kbenoit
    Nov 11 '17 at 2:56
  • @kbenoit Lucky you if you haven't hit the bug! Then no worries at all, happy "Caffeinating"! :)
    – pomsky
    Nov 11 '17 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.