4

Even after doing the change in the Settings > Brightness & Lock, by increasing the value for Turn screen off when inactive for to 5 minutes, it didn't work. I did try the other options there as well.

I've already gone through the steps in this SO.

Is this a current bug, or is there any hack to prevent this? Any help would be appreciated.

9
  • Afaik, putting the screen into stand-by mode is hard-coded in both Unity and GNOME Shell. Why would you want to keep it on with the session locked anyway? This sounds like an X-Y Problem. What are you actually trying to achieve? Oct 15, 2017 at 14:32
  • Thank you @David for the insights. When I'm locking the screen, it doesn't mean that I have to be always inactive. I could lock it for a few seconds of a break for some reason! Hence if the screen is already active and ready to type in the password and unlock it, it's quite easier as I feel. Instead, even for a short second of a break, I have to wait till the lock screen activates itself for me to type in the password and unlock it. I'm not saying it's delaying by any means, but then it's quite annoying, to be honest. Hope I made myself clear.
    – Kulasangar
    Oct 15, 2017 at 16:31
  • 1
    At least with GDM and GNOME Shell you can start to type the password and hit Enter blindly before the screen wakes up. This is what I do on my system: by the time the session is unlocked the display comes back to life. I believe I saw similar behaviour with LightDM and Unity. Otherwise you could try different display managers that don't hard-code display stand-by on session locking as this type of thing is the display manager’s task (not the desktop environment’s like I implied in my previous comment). Oct 15, 2017 at 16:37
  • 1
    I just checked with a friend who uses LightDM and Unity on Ubuntu 17.04: the display stays on when one locks the session. The display is set to go to stand-by after 10 minutes of inactivity. Oct 15, 2017 at 16:41
  • @DavidFoerster you can start to type the password and hit Enter blindly before the screen wakes up that's what I did too :D. I'll try out another display manager and see. Thanks again for your valuable info and time. That should help. +1 :)
    – Kulasangar
    Oct 15, 2017 at 17:50

1 Answer 1

2

Terminal CLI method

To prevent screen from turning off you need two settings, one under battery power the other when plugged into wall outlet (A/C).

For battery timeout:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout <time_in_seconds>

For AC timeout:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout <time_in_seconds>

So for both Battery and A/C set the time to 0 (never).

For Login screen:

gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

Disable dimming screen when idle:

In Unix & Linux someone complained when on battery screen dims every 20 seconds and wants to turn that feature off:

gsettings set org.gnome.settings-daemon.plugins.power idle-dim false

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