47

My screen goes black after 30 seconds of inactivity and when I press a key, it shows where it was and does not need any password. This problem won't occur when I use it for watching videos in platforms such as youtube etc. My Ubuntu version is 22.04. I have used some methods to overcome it but still couldn't.

  1. I've changed screen blank to "never" in setting>power>screenBlank
  2. I've used commands such as 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim false', and 'gsettings set org.gnome.desktop.screensaver lock-delay 600' with and without sudo in terminal. I restarted my pc after them just in case. could you please help me with this?
6
  • 1
    Same problem with mine, although it happens less often, it happens several times per hour and drives me insane! 'Glad' someone else has same problem and I am not insane..... May 14, 2022 at 9:21
  • 3
    I'm having the same problem with Ubuntu 22 also! It just started happening this past week.
    – lord_nimon
    May 26, 2022 at 4:01
  • My Ubuntu 22.04 lemur pro laptop just started doing this today after updating. WTH. Jul 23, 2022 at 23:33
  • It has started happening to me on 22.04.1. I had this same issue several years ago with 11.0. It eventually went away after a couple updates, but was annoying to say the least. I've temporarily stopped it from happening on my current setup by going into Settings/Power and randomly changing all the settings, then setting them back to what I want to have. It evidently resets DPMS some way or other and leaves my screen alone. I have to do it over again when I reboot, or if I'm away long enough for the true screen blank feature to kick in.
    – tbzep
    Aug 27, 2022 at 4:39
  • 1
    23.04 - same bug. Only restart helps. But after some time the bug "reactivates". Jul 17, 2023 at 20:36

4 Answers 4

41

Same problem here, with Ubuntu 22.04 after only 30 second of inactivity the screen turn black, to bring back the display on screen I need to press a key or move the mouse. I have also notice it does not occur when watching video like YouTube.

The work around which work on my side, is to call this command:

xset -dpms
4
  • How often do you need to call this command?
    – lord_nimon
    May 26, 2022 at 4:01
  • 1
    It looks like it resets after you reboot. So you will have to run it every time you boot. Is it possible to make this persistent? Aug 25, 2022 at 15:31
  • 1
    askubuntu.com/a/719157/29073 tells you how to make a script that runs in the background on boot. Note Upstart and rc.local are deprecated. .profile and similar (eg .gnomerc) execute after login. You can also add a cronjob.
    – pbhj
    Aug 30, 2022 at 14:45
  • For me it seems to happen consistently after I put my laptop into sleep and unplug the secondary screen (not sure if the order matters), So that's when and how often I need to run this command, not on fresh boot.
    – FNia
    Oct 21, 2023 at 21:21
11

Give this a try.

xset s off && xset -dpms

I ran it this morning. When I came home, the screen was on standby as it should be instead of just blacked out like it was doing with xset -dpms. I've let it go into standby several more times and it is still working as it should.

I expect this will revert when I reboot. However, if it does, I will just add it to the end of my .profile.

Edit: This fix has worked for me through a logout/login and two reboots.

2
  • Simple and clean. No idea why it started or why this stops it, but it works.
    – jlettvin
    Sep 8, 2023 at 16:31
  • Works for me, but I have to re-apply it periodically (who knows when).
    – Kalnode
    Mar 6 at 0:30
5

not sure what's messing with the DPMS blank time, this worked fine in 20.04.

# export DISPLAY=:0 && /usr/bin/xset dpms 1200 1200 1200
# xset q
....
DPMS (Energy Star):
  Standby: 1200    Suspend: 1200    Off: 1200
  DPMS is Enabled
  Monitor is On

set correctly, but wait a few minutes, screen blanks in way too short a time...

#  xset q
....
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On

Something is resetting it to 0 0 0. Poking around...

1
2

In Menu, go to System Tools->dconf Editor or type dconf-editor in terminal:

org->gnome->settings->daemon->plugins->power->sleep-inactive-ac-timeout

set sleep-inactive-ac-timeout to 300 (seconds) set sleep-inactive-ac-type to ‘logout’

2
  • I would add: log out, log in to take effect
    – Ferroao
    Sep 27, 2023 at 11:10
  • 1
    daemon-plugins is a single entry Dec 20, 2023 at 17:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .