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.
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.
In my experience using light-locker as the locking software handles this turning off display with small delay.
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.
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.
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; }
You can save screen and energy by using the "Blank screen" theme of xfce4-screensaver. If it does not work, it is a bug.
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.
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.
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.
-- 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