I've got a Pi3 running 4.9.35-v7+ #1014 SMP. For some reason, when left unattended the screensaver turns on but the display never enters power save mode. I have to shut it off with the power switch. Needless to add, I'm inclined to forget....
The display does power down using the experimental GL driver, but that's not practically usable, however it suggests the cable and hardware are OK.
The power manager settings are never sleep (to preserve the Wifi connection), blank after 2 minutes, sleep after 3 minutes and switch off after 4 minutes.
Is there a setting I've got wrong or don't know about?
Thanks for reading,
bob prohaska
Didn't find your answer? Ask the community — no account required.
R
Roger Bell_West
(1) Which screensaver?
(2) What does "xset q" say about DPMS?
I
I R A Darth Aggie
*ding*
formatting link
Arch has a fantastic wiki. The section "Modifying DPMS and screensaver settings using xset" is probably what Bob wants.
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
isn't looking good, either.
I am BOFH. Resistance is futile. Your network will be assimilated.
B
bob prohaska
Under Preferences > Screensaver I find Xscreensaver 5.30, 11-Sept 2014. I think that's what's running, but I also thought that the LXDE logo comes up in some of the screen savers. I don't recall tampering with this feature, I think it's just doing its default things.
When I bring up Preferences > Power Manager the window title bar says Xfce Power Manager. That is set to blank after 2 minutes, put to sleep after 3 minutes and switch off after 4 minutes, none of which seem to happen.
Now we might be getting somewhere. It reports:
Keyboard Control: auto repeat: on key click percent: 0 LED mask: 00000000 XKB indicators: 00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off 03: Compose: off 04: Kana: off 05: Sleep: off 06: Suspend: off 07: Mute: off 08: Misc: off 09: Mail: off 10: Charging: off 11: Shift Lock: off 12: Group 2: off 13: Mouse Keys: off auto repeat delay: 500 repeat rate: 30 auto repeating keys: 00ffffffdffffbbf fadfffefffedffff 9fffffffffffffff fff7ffffffffffff bell percent: 50 bell pitch: 400 bell duration: 100 Pointer Control: acceleration: 20/10 threshold: 10 Screen Saver: prefer blanking: yes allow exposures: yes timeout: 0 cycle: 0 Colors: default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff Font Path: /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins DPMS (Energy Star): Standby: 7200 Suspend: 7200 Off: 14400 DPMS is Disabled
Seems like the key line is the last one, but I don't understand why the power manager control panel didn't do anything.
Many thanks!
bob prohaska
R
Roger Bell_West
OK, that's reasonably capable.
I don't work with GUI control panels, but
xset +dpms
should be a good start, and possibly reducing the timings a bit might help.
xset dpms 300 600 1200
would put the monitor into standby after 5 minutes, suspend after 10, off after 20.
B
bob prohaska
The result is curious. Issuing sudo xset dpms 300 600 1200 caused the screen to blank for 5 minutes, then the screensaver came on and stayed on, the monitor never went to "yellow light" mode.
xset q now reports
Keyboard Control: auto repeat: on key click percent: 0 LED mask: 00000000 XKB indicators: 00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off 03: Compose: off 04: Kana: off 05: Sleep: off 06: Suspend: off 07: Mute: off 08: Misc: off 09: Mail: off 10: Charging: off 11: Shift Lock: off 12: Group 2: off 13: Mouse Keys: off auto repeat delay: 500 repeat rate: 30 auto repeating keys: 00ffffffdffffbbf fadfffefffedffff 9fffffffffffffff fff7ffffffffffff bell percent: 50 bell pitch: 400 bell duration: 100 Pointer Control: acceleration: 20/10 threshold: 10 Screen Saver: prefer blanking: yes allow exposures: yes timeout: 0 cycle: 0 Colors: default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff Font Path: /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins DPMS (Energy Star): Standby: 7200 Suspend: 7200 Off: 14400 DPMS is Disabled
It seems the command didn't take, but there were no error messages.
Thanks for writing, if you think of something else to try please post!
bob prohaska
R
Roger Bell_West
Why did you sudo? This isn't a function that requires root.
M
Martin Gregorie
I don't use a screensaver on my RPi because its run in headless mode and only accessed via ssh, but I do use a screensaver on my Fedora systems. Its one that works with the XFCE desktop package (XScreenSaver 5.37). It has its own configuration which controls whether it shows a blank screen, randomly chosen graphics, whether it needs a password to show the desktop, etc.
My guess is that the screen will stay on unless the screensaver is disabled or set to show a blank screen.
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
B
bob prohaska
Ahh, didn't know any better.....
Thank you!
bob prohaska
R
Rob Morley
Getting into the habit of sudoing anything that /might/ need it erodes some of the protection that you get from running as a user with lower privileges.
B
bob prohaska
Indeed that seems to be what's happening. The question is how to make the monitor enter power save mode in the default setup. It happens "for free" when using the experimental GL driver, but that does not work well enough for regular use. However, it does prove (?) that the hardware (cable and monitor) are capable of executing the desired action.
It seems to be a configuration issue, but I've pushed the buttons I know about and am hoping somebody knows of more.
Thanks for reading!
bob prohaska
A
A. Dumas
Well, with it not needing a password on standard Raspbian, I didn't think it could be eroded any further.
T
The Natural Philosopher
really?
What a hoot!
Might as well set up a passwordless root acount and drive it like a DOS PC!
Microsoft : the best reason to go to Linux that ever existed.
M
Martin Gregorie
Yep, thats a pretty stupid way to configure sudo, but its easy to fix.
Just edit /etc/sudoer and remove NOPASSWD: from the line at the end of the file. It should look like this:
pi ALL=(ALL) NOPASSWD: ALL
...and replicate for any other users you happen to have added to your RPi and configured to use sudo.
you can do this with a normal editor or use visudo, which will validate the modified /etc/sudoers file before writing it back. Despite its name, which implies that it will use vi as its editor, the Raspbian visudo seems to have been hacked and/or reconfigured to use nano. At least, that is the case on my RPi.
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
R
Roger Bell_West
Like any well-written unix program, it will use whatever you've set up as the default editor.
R
Richard Kettlewell
(about visudo)
Not exactly; see the man page. It has a built-in list of permitted editors.
The reason is that sudo supports the idea of authorizing users to run only a limited set of commands, and honoring arbitrary values of $EDITOR would undermine that.
I?ve never thought this a very sensible feature (due to the substantial risk that one of the permitted commands will allow privilege escalation), but it is part of the design nevertheless.
http://www.greenend.org.uk/rjk/
M
Martin Gregorie
OK, it turns out that the problem is somewhere in sudo.
If I "su -" to root and run visudo it runs microEmacs, which is what I have set in $EDITOR. However if I run "sudo visudo" from my normal login user it runs nano despite /etc/sudoers having "Defaults env_reset" set, which should make it use whatever $EDITOR is set to - $VISUAL is unset.
less is showing exactly the same symptoms.
I'm seeing exactly the same effect with sudo on my Fedora systems, but haven't noticed before it since I haven't used "sudo visudo" there for a rather long time and seldom use an editor from within "sudo less ....".
Sudo should not be doing this. My (very old) sudoers file on Fedora didn't contain the "Defaults env_reset" line, so I've just added it. This has had no effect whatsoever.
So it appears that both the Fedora and Debian sudos are ignoring the "Defaults env_reset" statement, with the result that both sudoers and less are only using sudo's compiled-in default editor (vi for Fedora, nano for Raspbian) when they are run under sudo.
This is what I'm seeing , anyway. I'll be interested in hearing what you are seeing and if you see the same, I'll raise a Fedora bug against sudo because I have a bugzilla login there.
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
M
Martin Gregorie
Correction: s/sudoers/visudo/
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
A
alister
At least you have to specifically request root as an indication that you know what you are doing, rather than running as root so there is some protection.
of course if the user blindly prefixes everything with sudo regardless then the above is moot
Much better to get a full understanding of the Linux security model
"...Local prohibitions cannot block advances in military and commercial
technology... Democratic movements for local restraint can only restrain
the world's democracies, not the world as a whole."
-- K. Eric Drexler
M
Martin Gregorie
Yes, but see "man sudoers", which says that the "Defaults env_editor" statement overrides that and causes visudo, less, etc. to use the editor specified by $EDITOR. This is in the sudoers(5) and sudo(8) manpages for Sudo 1.8.10p3, which is the version used by Raspbian.
Meanwhile, F25 publishes the same sudoers(5) and sudo(8) manpages are for sudo 1.6.5 yet its sudo is version 1.8.20p2. This sudoers manpage also describes the use of "Defaults env_editor" but this is not mentioned in the sudo manpage.
However, "Defaults env_editor" doesn't work for either sudo 1.8.10p3 or
1.8.20p2.
As I said, I feel a bug report coming on.
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.