! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
lock screen does not instantly turn off the display
Status:
RESOLVED: MOVED
Product:
Xfce4-screensaver
Component:
General

Comments

Description olaf 2019-12-26 20:32:12 CET
When "lock screen" is selected from the pull down menu in the upper right corner, the monitors should be turned off instantly. In my case they remain active just with a black screen. After maybe a minute something turns them off.

Such "instant power down" allows the monitor with more than one cable attached to switch to another active source from another, unrelated system.

I think the xfce power manager may influence the behavior. Just checked its settings. It has a strange way to handle black screen/powersave mode/turn off, each one must be at least one minute apart. Anyway, I think the screensaver should force turn-off instantly, unless otherwise configured.

I run git.xfce.org#master on Leap 15.1.
Comment 1 Jarno Suni 2019-12-31 14:40:40 CET
I suppose you mean the Action Buttons menu on xfce4-panel. (The default configration may vary among distributions.) You get blank screen, because you have "Blank screen" theme set in Xfce "Screensaver" preferences. Sadly, xfce4-screensaver does not have an option to set display off. A workaround is to use custom screen locker instead of xfce4-screensaver. That can be set in Settings Editor > xfce4-session > general > LockCommand. You could also disable Screensaver in "Session and Startup" > Application Autostart, and kill xfce4-screensaver of current session, if you do not need it.
Comment 2 Jarno Suni 2019-12-31 15:12:18 CET
In my experience using light-locker as the locking software handles this turning off display with small delay.
Comment 3 olaf 2020-01-09 11:34:38 CET
It turned out the xfce power manager display tab defaults to "battery" instead of "powered".

Anyway, the issue is with xfce screensaver. It has to run the equivant of "xset dpms force off" when it gets activated.
Comment 4 Jarno Suni 2020-01-09 19:10:31 CET
Does
xfce4-screensaver-configure xfce-blank
or activating the same dialog in Screensaver Preferences' Screensaver tab help? The shortest time is 1 minute, though, but maybe you can set shorter time in Settings Editor? Anyway yes,  initial suspending of display(s) would be nice, but when activating from terminal, there should be a short delay so that lifting a key on keyboard would not turn display on. BTW I found out that mere "off" did not work in all cases, where "suspend"  worked.
Comment 5 olaf 2020-01-10 09:16:03 CET
The xfce4-panel "lock screen" action runs the xfce4-session "xflock4" script, which cycles through a few known screensaver commands.
Eventually "xfce4-screensaver-command --lock" gets called. This does just "activate" the configured screensaver.
But since a screensaver does not actually save the screen, or in fact: energy, it just assumes some screen action  and cpu burning.

This patch appears to work for me:

diff --git a/src/gs-manager.c b/src/gs-manager.c
index 6c42b78..10d3541 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -1160,6 +1160,8 @@ gs_manager_activate (GSManager *manager) {
     manager->priv->active = TRUE;
 
     show_windows (manager->priv->windows);
+    if (manager->priv->prefs->mode == GS_MODE_BLANK_ONLY)
+        activate_dpms_timeout(manager);
 
     return TRUE;
 }
Comment 6 Jarno Suni 2020-01-10 11:21:41 CET
You can save screen and energy by using the "Blank screen" theme of xfce4-screensaver. If it does not work, it is a bug.
Comment 7 olaf 2020-01-10 11:32:21 CET
This is what I use. But without 'xset dpms force off' the monitor remains powered on when the screen is locked.
It must be powered off instantly, see comment#0.
Comment 8 haarp 2020-03-21 21:44:22 CET
If you go into the settings for the "Blank screen" theme, you can set a timeout after which the display is properly switched off. Unfortunately this is not very discoverable, as evidenced by the existence of this bug.

iirc the default is 5 minutes, and it cannot be set lower than 1 minute, which is a shame. I'd like it to be immediate aswell.
Comment 9 olaf 2020-04-09 19:34:18 CEST
Created attachment 9688 
xfce4-screensaver.patch

I'm using this patch since a while, it works for me.

There are a few other cosmetic changes, like using the API to work with seconds instead of subsecond resolution. That may go into a separate patch.
Comment 10 Git Bot editbugs 2020-05-25 22:27:50 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-screensaver/-/issues/27.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #16305

Reported by:
olaf
Reported on: 2019-12-26
Last modified on: 2020-05-25

People

Assignee:
Sean Davis
CC List:
2 users

Version

Version:
unspecified

Attachments

xfce4-screensaver.patch (3.27 KB, patch)
2020-04-09 19:34 CEST , olaf
no flags

Additional information