Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Screen goes blank after 15 minutes.

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
pr0vidence
n00b
n00b
Posts: 47
Joined: Fri Apr 12, 2002 12:49 am
Location: Connecticut

Screen goes blank after 15 minutes.

  • Quote

Post by pr0vidence » Fri Apr 12, 2002 1:12 am

Hello all.

Just wanna say I think Gentoo is a fantastic distro. Keep up the good work.

Enough of that :)

When using my Gentoo box (or any other Linux distro for that matter), or, perhaps I should say, when NOT using my box (or maybe waiting many, many hours for something to compile), the screen will blank itself out after ~15 minutes. I would like to shut this feature off, does anyone know how? I have tried killing apmd, even shutting off power management at CMOS level. I don't know what's next.

Thanks all for the help.
Top
DaemonCat

15 minute black out

  • Quote

Post by DaemonCat » Fri Apr 12, 2002 9:18 pm

It's a "term thing"! the variable is "blank". I'm using "BSD style init", (Slackware) so the setting is in /etc/rc.d/rc.M , which is the initialization script for the "multi user" modes. I assume that the Sys-V style has a similar script somewhare. The line to look for is:
/bin/setterm -blank 15
Simply comment it out by inserting a "#" at the beginning of the line, OR change the "15" to "0" and it's gone for everybody.
If you just want to disable it on a "per user" basis,
/bin/setterm -blank 0
at the command prompt after you log in should do it.
Check the manpage for "setterm" for all kinds of goodies!
man setterm
at the command prompt.
Top
snowmoon
n00b
n00b
Posts: 64
Joined: Wed Jun 05, 2002 4:16 pm
Location: Albany,NY USA

  • Quote

Post by snowmoon » Thu Jan 23, 2003 4:20 am

xset -dpms

might also work.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Fri May 02, 2003 2:34 pm

Other possibilities:
  • xset -s off from Power management question
    disabling BIOS features from screen goes blank
There might be a problem with this during installation as noted in Setterm Set During install to stop screen blanks?.
Quis separabit? Quo animo?
Top
msalerno
Veteran
Veteran
User avatar
Posts: 1338
Joined: Tue Dec 17, 2002 6:20 pm
Location: Sweating in South Florida

  • Quote

Post by msalerno » Fri Nov 19, 2004 10:06 pm

This should do the trick:

Code: Select all

echo "setterm -blank" >> /etc/conf.d/local.start
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

  • Quote

Post by kimchi_sg » Thu Apr 21, 2005 6:30 pm

setterm -blank -powersave off -powerdown
Top
david9999
n00b
n00b
Posts: 1
Joined: Mon Sep 13, 2010 9:00 am

  • Quote

Post by david9999 » Mon Sep 13, 2010 9:03 am

For some reason my screen goes blank when I have no activity. I have screen saver set to two hours and "active screen saver when idle" unchecked. I also have power-management disabled.

I've noticed this behavior when using totem but not sure if it's just with this program or not. It goes out during a movie and I have to touch the mouse to bring the picture back. Any ideas?
Top
k9dog
Tux's lil' helper
Tux's lil' helper
Posts: 104
Joined: Mon Jun 22, 2009 10:58 pm
Location: Denmark

  • Quote

Post by k9dog » Sat Aug 12, 2017 10:00 pm

I don't think there is a way to block blanking in Linux (currently) fx.during media playing. You can change the period in the system setting, but a signal to not start blanking during continuous media is still missing it seems or at least not well defined.
There is many good media applications and libraries out there (VLC, Kodi ... just to mention a few), so I think distros lacking this feature, makes it hard to consider at least most distros good platforms for Media Centers. (At least I haven't heard of any implementation to do this). In Windows there is a feature that can block the blanking and sleep of normal system behavior. The exact behavior I think most users miss, is partly illustrated by the usage and description of https://dlaa.me/Insomnia/. Don't misunderstand me, I love Gentoo and this laptop gave up Window somewhere during Window 7 when Microsoft decided everything looked better if the system memory and cpu was eaten by useless .net and security updates that was meant to solve problems that should have been fixed in a way that didn't hurt performance of the overall system. Ah well considering the stripping of the last traces of any skin in Windows 10 it doesn't really matter. Gentoo is the place to be now.
Hehe sorry about that. Windows is properly okay. But I do think there is a long dark path from Windows NT to Windows 10 that shouldn't have been taken. Microsoft come many good improvements along the way. Personally I don't really feel they develop the system as an OS any more. And I think there is a big issue with drivers in every OS upgrade, that mostly mean you have to do new investments again and again.
When it comes to Linux, I think the best thing that could have happened was what Linus did for Minix and the cross development in the years to come.
Gentoo have truly continued in that spirit. I'm not entirely sure where the blanking should be blocked. Kernel/driver, X, desktop, tool like laptop_mode or some combination. I think the later, which might explain why there isn't a common implementation.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Sat Aug 12, 2017 10:42 pm

k9dog wrote:I don't think there is a way to block blanking in Linux (currently) fx.during media playing.
Works fine in mpv.
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Aug 12, 2017 11:00 pm

Some media players simulate pressing a key on a relatively short interval, which blocks screensavers (and other "user iddle" triggers)
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Sat Aug 12, 2017 11:11 pm

mpv just calls `xdg-screensaver suspend`, which in turn runs... xset. As you can see from the replies from 14 years ago in this thread, we've had a solution to this for quite a while...
Top
k9dog
Tux's lil' helper
Tux's lil' helper
Posts: 104
Joined: Mon Jun 22, 2009 10:58 pm
Location: Denmark

  • Quote

Post by k9dog » Fri Sep 08, 2017 9:38 pm

szatox wrote:Some media players simulate pressing a key on a relatively short interval, which blocks screensavers (and other "user iddle" triggers)
Thanks for the information. Nice to know that there at least is a used work-around, even if not all players implement it. At least it is a place to start. :) I feel like Linux has become a more user friendly environment over the last decade,so not too unlikely we'll get a more native method eventually (I guess the keypress work-around is fine until then). I guess we'll just need to ask developers to incorporate it more widely until the system does :) Just have to reninbd them to only do it while videos are actually playing.
.
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Sep 09, 2017 2:13 pm

You're welcome.
Also, I recently had to find a way to suppress screensaver for players that do _not_ simulate keypress, and I found a few switches for xset.

'xset q' prits current settings
'xset s 0' disables screensaver (you can reenable it later by setting a non-zero timeout - value is in seconds)
'xset -dpms' disables power saving features, so your monitor will not suspend/power off. Enable it again with xset +dpms.
Top
k9dog
Tux's lil' helper
Tux's lil' helper
Posts: 104
Joined: Mon Jun 22, 2009 10:58 pm
Location: Denmark

  • Quote

Post by k9dog » Tue Mar 20, 2018 1:38 am

I recently found that most video players use screen savers own mechanism to prevent going to sleep without any emulation of keystrokes. I dont think many players use keystroke emulation (as in xdotool).
xscreensaver uses a command "xscreensaver-command -deactivate" to reset timer.
By running the command an interval shorter than the time where screensaver starts you can prevent screensaver from blanking screen. Just like suggested for xdg-screensaver.

I now made a script that will prevent the xscreensaver from initiating any screen saver or power save. Named insomnia after Windows program of the same name.

Code: Select all

#!/bin/sh

export DISPLAY=:0

while { /usr/bin/xscreensaver-command -deactivate &> /dev/null ; sleep 30; }; do :; done
(Rewritten to match what Hu said in next post. I was still composing and wanted to include it in post :) Thanks Hu)

The DISPLAY=:0 is just so I can run from console on another machine. It does require me to be logged on the X based platform as same user where I want to inhibit the xscreensaver. You can replace the statement of xscreensaver-command with "xdg-screensaver suspend" for that screensaver. Method is better than simulating the keypress with xdotool for fx. netflix as pressing shift also makes control bar appear on netflix.

I believe the package caffeine does much the same thing. I am not sure if you can tell caffeine which screen saver you use. It failed to work on one machine, but it worked on another of mine. (Might work after I reinstalled xscreensaver. caffeine said it tried to run inihibit for wrong screensaver and obviously failed)

xset might be a level too low as I was talking about screen saving done by xscreensaver and the like. I know you can control screen power and blank screen with xset. In the early days I saw xset as a way to set options. It was pretty much limited to basic mouse-keyboard-screen stuff. Settings for screen saver also includes type of screen saver, so one level higher is where we need to control what happens.
Last edited by k9dog on Tue Mar 20, 2018 4:45 am, edited 4 times in total.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Mar 20, 2018 3:23 am

k9dog wrote:

Code: Select all

/usr/bin/xscreensaver-command -deactivate &> /dev/null
while sleep 30 ; do /usr/bin/xscreensaver-command -deactivate &> /dev/null ; done
In the interest of DRY, this can be rewritten:

Code: Select all

while { /usr/bin/xscreensaver-command -deactivate &> /dev/null ; sleep 30; }; do :; done
You could use sleep as the body instead, but then killing sleep would not count as an error condition.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Tue Mar 20, 2018 8:49 am

k9dog wrote:The DISPLAY=:0 is just so I can run from console on another machine. It does require me to be logged on the X based platform as same user where I want to inhibit the xscreensaver.
k9dog ... in which case it might be a good idea to test this:

Code: Select all

#!/bin/sh
set -e
_xpid="$(pgrep -n X)"
_xuser="$(ps -o user --no-headers $_xpid)"
_display="$(egrep -aoz ':[0-9](.[0-9])?' /proc/$_xpid/cmdline)"

if [ -n "$_display" ] ; then
    export DISPLAY="$_display"
else
    echo "No display found"
    exit
fi

if [ "$(whoami)" = "$_xuser" ] ; then
    while { /usr/bin/xscreensaver-command -deactivate &> /dev/null ; sleep 30; }; do :; done
else
    echo "fooey!! ... display is currently in use by $_xuser"
fi
Note that the above requires X be runing non-suid (otherwise, as Hu pointed out in another thread, '$_xuser' will return 'root'), so keep that in mind.

best ... khay
Top
Post Reply

16 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic