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.

dadexix86
  • 6,616
  • 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? – David Foerster Oct 15 '17 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 '17 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). – David Foerster Oct 15 '17 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. – David Foerster Oct 15 '17 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 '17 at 17:50
  • @DavidFoerster did your friend resolve his issue with the displays staying on when locked? I can't find anything on that issue and I have the same problem. – Ron Smith Aug 01 '18 at 20:31
  • @RonSmith: My friend didn't see it as an issue. That was the expected behaviour. – David Foerster Aug 04 '18 at 07:30
  • @DavidFoerster KVM adapters and capture cards lose connection when display is turned off. Keeping it on while system is locked is a legitimate usecase. My friend. If you don't know how to do it please avoid answering instead of questioning the question. – ZAB Nov 30 '22 at 07:54
  • @ZAB: The underlying goal is usually relevant to a viable solution or work-around. Thus it’s good to ask for and understand these goals. – David Foerster Nov 30 '22 at 11:31

1 Answers1

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