You are not logged in.
Hey everyone,
So I"m hoping to gather enough information to turn this thread into a go to place for information regarding this. I've noticed a lot of people having questions in regards to screen locking, blanking and the working of screensavers. Looking into it, it does seem a bit confusing. This is how I see things, please let me know if I'm wrong or have something ass backwards.
The command line, non graphical tools to manage Display Power Management Settings (DPMS) can set by using the xset and setterm commands, such as:
xset dpms force off Turn off screen immediately
xset s off Disable screen saver blanking
Despite being able to manually set this via terminal, we usually would like some sort of desktop gui method of accessing the tools we use. So to do this we have suites of tools such as XFCE4's Power-Manager. (xfpm) . This tool gives us a nice graphical ui to configure power management, what happens during certain events, like suspending or hibernating. Like shown below:
My questions begin between this area. If we have xscreensaver or something like the default light-locker, what calls them into activity? Where does the above xfce gui tool gathering it's information? Surely it has to have some sort of config file that tells it to call what screenlocker/saver?
In the file /etc/xdg/autostart/light-locker.desktop
There's and Exec line to start light-locker itself.
But I've yet to find anyplace where either xfce-power-manager calls ANY sort of screen locking or screen saver. For those who have xscreensaver or any other screensaver or screen locking too, can you answer as to where it's specified in xfpm that makes the call to bring up the screen saver or screen locking?
Also, as with just light-locker, when it is called, and it puts up the "screen saver" it's just a black screen. What is going on here? Is this xfce4 enacting the DPMS to kill the screen? Or is it light-locker's attempt at a screen saver?
Last edited by Horizon_Brave (2016-04-30 22:25:33)
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
I see that xfce uses a strangely cryptic XML file (it's the only "config" type file I could find for xfpm) Is this file read by dbus to be passed on whatever screen locker/ saver is listening?
kingghidorah@kingghidorah:~/.config/xfce4/xfconf/xfce-perchannel-xml$ cat xfce4-power-manager.xml
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-power-manager" version="1.0">
<property name="xfce4-power-manager" type="empty">
<property name="power-button-action" type="empty"/>
<property name="lid-action-on-ac" type="uint" value="1"/>
<property name="lid-action-on-battery" type="uint" value="1"/>
<property name="critical-power-action" type="uint" value="1"/>
<property name="show-tray-icon" type="uint" value="1"/>
</property>
</channel>
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
I think xfce4-power-manager works independently of the low level X server mechanisms that are altered by the `xset` command, this is why my advice in this thread worked.
To find out how xfce4-power-manager actually works at the lowest level, you may have to read the source code.
EDIT: or strace(1) the little blighter
Last edited by Head_on_a_Stick (2016-05-01 11:19:08)
Offline
In my view, xfce4-power_manager *is* dependent on the X server stuff.
My understanding is that xfce4-power_manager runs xset commands to "implement" the settings specified in the XFCE Power Manager Settings window. It runs the appropriate xset commands during system startup and anytime the user changes display settings in the XFCE Power Manager Settings window.
This can be verified by running the xset command without any parameters (so that it just displays its current settings) before and after making changes to settings in the XFCE Power Manager Settings window.
As for the relationship between the X display settings and screensaver/lock software, I believe these are independent of each other.
If you set DMPS to "blank the screen after 15 minutes" (using either the xset command or using the XFCE Power Manager Settings window), and you have your screensaver/lock software set to trigger after 20 minutes .... when you use the keyboard or mouse within the five minute in-between period after the screen blanks (i.e. between 15 and 20 minutes), the screen will wake up and *not* demand a password. If you wait longer than 20 minutes, then the screensaver/lock software will be in play, so the screen is both blanked by DPMS *and* locked by the screensaver/lock software. So after the 20 minute mark, if you use the keyboard or mouse, DPMS will wake up the screen and you will see the screensaver/lock image, demanding a password.
On the other hand, if you want the screensaver/lock screen to always display for x number of minutes before the screen blanks (or is "put to sleep") you would set the screensaver/lock timeout to a value less than the timeout value specified for the DPMS screen blanking or sleeping.
Offline
Xfce4-power-manager is a part of the Xfce DE. It calls a script called xflock4, part of the package xfce4-session. On BL it makes no sense to install this package, but you can install the single script modified as you like. Put it in /usr/local/bin and ready...
Original here : http://pastebin.com/sXJAezag
If you use light-locker xscreensaver xlock or slock the script will lock the screen by hibernating or suspending . If you use another screenlocker then add a line about at the 38. 39. lines whit the proper lock-command.
Offline
Edit...I had a really long response to everyone's responses here..but I accidently hit the back button on my browser and lost the reply that I was working on...So you guys are getting the abbreviated edition! I wish we had a save draft feature...
@Tynman: Thanks for the explanation! It really makes sense. I did actually verify the changing on the gui and you are correct it does indeed change when you use the xset command. On addendum to your response though, you need to run xset q to see the configuration of xset. Without the q flag it just lists the help screen for xset!
So that puts that issue to rest...
And thanks for the confirmation that X's DPMS screen blanking function is completely unrelated to the locking and screensaver programs like Light-Locker. Speaking of which, light-locker has a sort of odd behavior when it's activated. It switches you from TY7 (the default gui TTY) and gives you the lightdm login screen on TTY8 (ctrl+alt+f8). It then locks the TTY7 screen with the 10 second hold screen before then allow you to login into that TTY7 again... Why not just keep you on TTY7 but just lock it with the screen?
Anway moving on to kleiner_hussar, Danke!
Is this the real script that xfce-power-manager uses? I'm just surprised how sparse and easy it is lol... It also strikes me as odd that is has lists of locking/screensaver applications hard coded in it. What if you're running a very new, and obscure screen locking program? I guess you'd have to edit it yourself, true linux fashion!
My question to you is...why would it make no sense to install this? How is BL then handling this?
Thanks everyone!!
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Edit...I had a really long response to everyone's responses here..but I accidently hit the back button on my browser and lost the reply that I was working on...So you guys are getting the abbreviated edition!
I wish we had a save draft feature...
https://addons.mozilla.org/en-GB/firefo … rea-cache/
Offline
Edit...I had a really long response to everyone's responses here..but I accidently hit the back button on my browser and lost the reply that I was working on...So you guys are getting the abbreviated edition!
I wish we had a save draft feature...
@Tynman: Thanks for the explanation! It really makes sense. I did actually verify the changing on the gui and you are correct it does indeed change when you use the xset command. On addendum to your response though, you need to run xset q to see the configuration of xset. Without the q flag it just lists the help screen for xset!
So that puts that issue to rest...And thanks for the confirmation that X's DPMS screen blanking function is completely unrelated to the locking and screensaver programs like Light-Locker. Speaking of which, light-locker has a sort of odd behavior when it's activated. It switches you from TY7 (the default gui TTY) and gives you the lightdm login screen on TTY8 (ctrl+alt+f8). It then locks the TTY7 screen with the 10 second hold screen before then allow you to login into that TTY7 again... Why not just keep you on TTY7 but just lock it with the screen?
Anway moving on to kleiner_hussar, Danke!
Is this the real script that xfce-power-manager uses? I'm just surprised how sparse and easy it is lol... It also strikes me as odd that is has lists of locking/screensaver applications hard coded in it. What if you're running a very new, and obscure screen locking program? I guess you'd have to edit it yourself, true linux fashion!My question to you is...why would it make no sense to install this? How is BL then handling this?
Thanks everyone!!
Yes, you can grab the package from here: https://packages.debian.org/jessie/xfce4-session extract it and look for the script in /usr/bin.
If you use for example i3lock, then you shold insert a proper locking command as described above.
You know, im am an old Crunchbang Xfce user :-)
Last edited by kleiner_hussar (2016-05-01 18:41:59)
Offline
... I wish we had a save draft feature...
...
I have a Save Draft feature - I call it a text editor
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
oh man, I really hope this works how I think it's going to work...Not sure who I love more right now, you or Firefox devs... Thanks Hoas!
kleiner: Ah I see, that makes sense. To repeat my question though... is if B.L doesn't use the xflock script, what/how does it know to call light-locker and or xscreensaver etc..? I wold think this script would be required to use those? Thanks Kleiner!!
@damo : lol, you know I used to do that as well...I'd have notepad++ opened up and type the responses or reviews, or whatever I was writing, and then paste it over...but I just got lazy recently !! Going to try out the add-on from hoas though...
Last edited by Horizon_Brave (2016-05-01 19:36:38)
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Head_on_a_Stick wrote:
oh man, I really hope this works how I think it's going to work...Not sure who I love more right now, you or Firefox devs... Thanks Hoas!
kleiner: Ah I see, that makes sense. To repeat my question though... is if B.L doesn't use the xflock script, what/how does it know to call light-locker and or xscreensaver etc..? I wold think this script would be required to use those? Thanks Kleiner!!
@damo : lol, you know I used to do that as well...I'd have notepad++ opened up and type the responses or reviews, or whatever I was writing, and then paste it over...but I just got lazy recently !! Going to try out the add-on from hoas though...
BL has the bl-exit script ( this is the on you launch from the menu ) .It suspends reboots and hibernates by calling different d-bus commands, but does not call any screen lockers.
The default BL install has a separate script, bl-exit which calls light-locker.
But in case of going hibernate or suspend 'cause of inactivity without xflock the power-manager does not lock the screen.
If you want to suspend from the menu AND lock the screen in the same time, we need a reworked bl-exit script calling d-bus to suspend AND a screen locker command. But I am a noob in python...
Offline
@Horizon, here's a simple explanation...
light-locker is well integrated with both lightdm and xfce4-power-manager. Installing light-locker onto a system with xfce4-power-manager adds that "Security" field to the power-manager GUI, I don't know where the setting is saved (probably in dconf).
Here's a nice simple summary...
https://kororaproject.org/support/docum … ght-locker
For more info on light-locker options, see man light-locker and this thread...
https://forums.bunsenlabs.org/viewtopic.php?id=484
I don't care what you do at home. Would you care to explain?
Offline
If you want to suspend from the menu AND lock the screen in the same time, we need a reworked bl-exit script calling d-bus to suspend AND a screen locker command. But I am a noob in python...
The version of the bl-exit script in https://github.com/BunsenLabs/bunsen-ut … in/bl-exit has this:
def suspend():
send_dbus("Suspend")
The one I have in my /usr/bin has this:
def suspend():
call("bl-lock")
send_dbus("Suspend")
Maybe I added the call to bl-lock at some point? It works
Offline
You all are gentlemen and scholars. Thanks everyone for their input, and it's definitely cleared the air of mystery, and I hope at least may server to help others later on, clear this up. I also point the missing link in all of this:
https://github.com/BunsenLabs/bunsen-ut … in/bl-lock
and yea tynman, I thought that was where the call to bl-lock would be as well, but mine bl-exit script doesn't have it either..
either way, thanks everyone!
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Ah, and Tynman, you may not need that extra line to call bl-lock in your bl-exit script...check out:
https://github.com/BunsenLabs/bunsen-ut … issues/27#
J.Raff may have confirmed that the setting of xfpm's gui setting, may be the interaction that calls light-locker's activation, probably via dbus or perhaps one of the xset commands.
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
I know the man page exists, but I figure I can type up a quick and dirty How To for xset:
xset is used to configure the settings for your X Session. You can use the xset command suite to modify how your mouse, screen, and keyboard are used and what display screen X will point to, as well as the DPMS (Display Power Manager System)
xset can be used manually by using it from the terminal with anyone of it's flags. Or (as noted in prior posts) it can be used through another program, such as Xfce's XFCE4-power-manager program. Either way it's xset that does the low level work. Here's a run down of some of the common / useful commands:
xset q Provides a list of the currently configured X settings for screen saving/locking/ blanking. WARNING: The output of xset q is misleading. It refers to the term "ScreenSaver" when showing the preferences for screen BLANKING. These two are different things. The output here is showing the config for the screen blanking which is when the monitor displays a plain black screen. If you are using a real screen saver program this is NOT what it refers to.
xset s on Enable the screen blanking functionality.
xset s off Disable the screen blanking functionality.
xset s <x> <y> The x and y here are the length and period parameters for the screen blanking function determines how long the server must be inactive for screen saving to activate, and the period to change the background pattern to avoid burn in
xset -dpms Turn off DPMS functionality
xset +dpms Turn on DPMS functionality
xset dpms <x> <y> <z> The x, y and z values here are for the the time outs for the different modes of dpms. The first value (x) is the time for "standby" mode, the second (y) is for the "suspend" mode, and the third (z) is for the "off" mode. Setting these values implicitly enables the DPMS features. A value of zero disables a particular mode.
xset s off -dpms Disable DPMS AND prevent screen blanking activation.
DPMS - The DPMS standard (Display Power Management Signaling) was developed to extend the useful life of PC monitors as well as to conserve the relatively high amount of energy used by monitors when not required. When DPMS is active (xset +dpms) It allows 4 modes of operation of the monitor. Normal, Standby, Suspend and Off. The DPMS is what controls the general hardware of the monitor. So when your monitor goes to a black screen from either standby or suspend, this is DPMS' configuration and control. It has control over the hardware of the monitor, and allows it to reduce it's consumption by switching into these different modes.
Screen Locking / Saver- This is when you get pulled out of the session for inactivity (of some specified amount of time), and the session and TTY you're logged into (default TTY7) is locked by a screen. Depending on what screen locker you use the lock screen will look different. On most locking programs, it will switch you to TTY8, (since TTY7 is now locked) and gives you a login display that mirrors your Display Manager. (LightDM in the case that you're using Light-Locker) Once you log in, it switches you back to TTY7. As you noticed, unlike DPMS, this is software based. A black screen or screen saver animation can be presented on the screen
If you do an xset q under 'screensaver' if it's set to 0 this means that screen blanking is disablsed.
** NOTE: If you are using XScreenSaver and xfce4-power-manager, know that they both use xset and modifying their gui menus will override the xset configuration.**
The above commands are what I have actually tested and seen to work. I"ll edit and add more as I dig a bit deeper.
Last edited by Horizon_Brave (2016-05-02 20:46:14)
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Ah, and Tynman, you may not need that extra line to call bl-lock in your bl-exit script...check out:
https://github.com/BunsenLabs/bunsen-ut … issues/27#
Looking through that conversation from January, I guess you need the call to the bl-lock script before suspending, or you don't, depending on the screeensaver/lock program being used. If you're using light-locker, it's not needed and actually causes a problem, so in the latest versions of the bl-exit script the call to bl-lock has been removed. I use the i3lock program (no light-locker or lightdm installed), so I have had to add the call to bl-lock back into the bl-exit script, my penance for straying from stock BL .
Offline
Installing light-locker onto a system with xfce4-power-manager adds that "Security" field to the power-manager GUI...
What's that?? No such "Security" tab here, even with the backported 1.4.4 version.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
@johnraff, it's a field that gets added to the bottom of the "System" tab (Lock screen when system is going for [sic] sleep).
I don't care what you do at home. Would you care to explain?
Offline
hhh wrote:Installing light-locker onto a system with xfce4-power-manager adds that "Security" field to the power-manager GUI...
What's that?? No such "Security" tab here, even with the backported 1.4.4 version.
Yea as hhh said by "tab" they just mean the check box. See how poor wording and vague explanations can throw people off? If I were in charge of documentation, everything would be painfully...PAINfully clear!
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline