Narf03
Posts: 243
Joined: Mon Jun 11, 2012 3:44 pm
Location: Malaysia

How to disable power saving ?

Mon Feb 25, 2013 9:42 am

In command prompt mode, if i never type anything within lets say 15 mins, the monitor will go power saving mode(blank), need to know are there any "not so difficult" method to turn that feature off or configure it a huge number ? (instead of 15 mins, 15 years should be enough)

Thanks.

User avatar
PeterO
Posts: 4946
Joined: Sun Jul 22, 2012 4:14 pm

Re: How to disable power saving ?

Mon Feb 25, 2013 9:56 am

Assuming that by " command prompt mode" you mean in console mode rather than in X windows, then look at the setterm man page.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: How to disable power saving ?

Mon Feb 25, 2013 10:04 am

You need to edit the following file /etc/kbd/config
then change BLANK_TIME= to BLANK_TIME=0
and POWERDOWN_TIME= to POWERDOWN_TIME=0 then reboot..

Your Pi should not blank the screen while idling. :)

Richard S.

Narf03
Posts: 243
Joined: Mon Jun 11, 2012 3:44 pm
Location: Malaysia

Re: How to disable power saving ?

Mon Feb 25, 2013 10:12 am

Ya, console mode, sorry, im a windows guy, and thanks redhawk, ill try that.

User avatar
RaTTuS
Posts: 10418
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: How to disable power saving ?

Mon Feb 25, 2013 10:20 am

redhawk wrote:You need to edit the following file /etc/kbd/config
then change BLANK_TIME= to BLANK_TIME=0
and POWERDOWN_TIME= to POWERDOWN_TIME=0 then reboot..

Your Pi should not blank the screen while idling. :)

Richard S.
^whs
if you want to do it on a machine without rebooting
setterm -blank 0
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: How to disable power saving ?

Mon Feb 25, 2013 11:58 am

RaTTuS wrote:
redhawk wrote:You need to edit the following file /etc/kbd/config
then change BLANK_TIME= to BLANK_TIME=0
and POWERDOWN_TIME= to POWERDOWN_TIME=0 then reboot..

Your Pi should not blank the screen while idling. :)

Richard S.
^whs
if you want to do it on a machine without rebooting
setterm -blank 0

Thanks that seems easy, will give it a try !
I know everything about nothing"

digitalhippie
Posts: 9
Joined: Mon Feb 25, 2013 3:33 pm

Re: How to disable power saving ?

Mon Feb 25, 2013 3:41 pm

Put this in your /etc/rc.local before the "exit 0":

Code: Select all

/usr/bin/setterm -blank 0 -powerdown off
and execute the same command as root (sudo /usr/bin/setterm -blank 0 -powerdown off) once. No reboot required.

Another useful trick which works on any shell:

Code: Select all

sudo /bin/chvt 1 # change console to tty1
sudo /bin/chvt 7 # change to graphical console (X11)

User avatar
Nfarrow
Posts: 47
Joined: Sat Dec 20, 2014 1:24 am
Location: Oklahoma, USA
Contact: Website Facebook Twitter YouTube

Re: How to disable power saving ?

Mon Oct 01, 2018 5:48 am

I get this error when I run it as root. Any idea why?

[email protected]:~# /usr/bin/setterm -blank 0 -powerdown off
setterm: argument error: 'off'
Twitter: @farrownick
Instagram veggievampire
I own a lot of Pis....

DirkS
Posts: 9902
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to disable power saving ?

Mon Oct 01, 2018 6:07 am

Nfarrow wrote:
Mon Oct 01, 2018 5:48 am
I get this error when I run it as root. Any idea why?

[email protected]:~# /usr/bin/setterm -blank 0 -powerdown off
setterm: argument error: 'off'
According to the docs valid values are 0-60 with 0 = off.
So use '0' instead of 'off'

User avatar
RaTTuS
Posts: 10418
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: How to disable power saving ?

Mon Oct 01, 2018 8:07 am

this will not do what you expect in Stretch ,
as systemd terminals are slightly different
the easiest way to remove the console blanking is to add
consoleblank=0
to the end of /boot/cmdline.txt
and reboot
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “Advanced users”