46

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?
  • 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..... – Peter-and-Crazybear May 14 '22 at 09:21
  • 3
    I'm having the same problem with Ubuntu 22 also! It just started happening this past week. – lord_nimon May 26 '22 at 04:01
  • My Ubuntu 22.04 lemur pro laptop just started doing this today after updating. WTH. – partofthething Jul 23 '22 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 '22 at 04:39
  • Why do these things keep regressing? Even with Canonical's might and resources, it keeps happening... It's no wonder we'll never see the year of Linux on the desktop... It's an understatement to say it's disappointing! – AnthonyK Apr 05 '23 at 06:06
  • 1
    23.04 - same bug. Only restart helps. But after some time the bug "reactivates". – 4LegsDrivenCat Jul 17 '23 at 20:36

4 Answers4

39

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
seb
  • 506
  • How often do you need to call this command? – lord_nimon May 26 '22 at 04: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? – Erik van den Hoorn Aug 25 '22 at 15:31
  • https://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 '22 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 '23 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.

tbzep
  • 121
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...

gessel
  • 159
1

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’

user234899
  • 21
  • 3