hippy
Posts: 5805
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Jessie : How to disable CLI screen blanking ? [SOLVED]

Thu Oct 01, 2015 6:17 pm

How does one prevent screen blanking when at the command line under Jessie ?

For Wheezy it was edit /etc/kbd/config and set BLANK_TIME=0 and POWERDOWN_TIME=0 then run /etc/init.d/kbd restart.

Done all that, also rebooted, but after the Pi starts it shows the login prompt for a while, then blanks the screen. Likewise if logged in but nothing typed.
Last edited by hippy on Fri Oct 02, 2015 12:49 am, edited 1 time in total.

User avatar
jojopi
Posts: 3079
Joined: Tue Oct 11, 2011 8:38 pm

Re: Jessie : How to disable CLI screen blanking ?

Thu Oct 01, 2015 8:07 pm

hippy wrote:For Wheezy it was edit /etc/kbd/config and set BLANK_TIME=0 and POWERDOWN_TIME=0 then run /etc/init.d/kbd restart.
POWERDOWN_TIME is just superstition. It only ever applies if BLANK_TIME is non-zero, and it is not actually implemented in the Pi kernel anyway. Likewise, everyone who perpetuates the rumour that "xset s noblank" is necessary, has neither read the documentation nor tested it.
Done all that, also rebooted, but after the Pi starts it shows the login prompt for a while, then blanks the screen. Likewise if logged in but nothing typed.
That is a bug in /etc/init.d/kbd, when run from systemd. There is a workaround in this very old report, which the Debian kbd maintainer does not appear to care about: https://bugs.debian.org/cgi-bin/bugrepo ... bug=771161

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Jessie : How to disable CLI screen blanking ?

Fri Oct 02, 2015 12:31 am

@jojopi I am always impressed by the depth of your knowledge. I have worked around this by using the consoleblank kernel parameter. As you said three years ago
jojopi wrote:The kernel parameter would work, except that debian overrides it during the boot sequence. Change BLANK_TIME to 0 in /etc/kbd/config

To effect the change without rebooting: sudo sh -c "TERM=linux setterm -blank 0 >/dev/tty0"
I guess since /etc/init.d/kbd isn't working correctly in Jessie, using the kernel parameter is a work around. What are your thoughts @jojopi?

hippy
Posts: 5805
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Jessie : How to disable CLI screen blanking ?

Fri Oct 02, 2015 12:52 am

jojopi wrote:That is a bug in /etc/init.d/kbd, when run from systemd. There is a workaround in this very old report, which the Debian kbd maintainer does not appear to care about: https://bugs.debian.org/cgi-bin/bugrepo ... bug=771161
Many thanks. Editing that workaround into /etc/init.d/kbd seems to have fixed it for me.

What would be the best way to get the fix implemented by Raspian or Debian ?

User avatar
jojopi
Posts: 3079
Joined: Tue Oct 11, 2011 8:38 pm

Re: Jessie : How to disable CLI screen blanking ?

Fri Oct 02, 2015 7:15 pm

AndyD wrote:I guess since /etc/init.d/kbd isn't working correctly in Jessie, using the kernel parameter is a work around. What are your thoughts @jojopi?
Yes, setting consoleblank=0 in /boot/cmdline.txt is a great idea, and I like it better as an end user workaround than hacking the init.d script. Of course we should set BLANK_TIME=0 in /etc/kbd/config as well, so that it carries on working when and if kbd or systemd are updated to fix the underlying problem.
hippy wrote:What would be the best way to get the fix implemented by Raspian or Debian ?
I am not sure how usual it is for a Debian bug report to remain open for so long. I may bump it with some additional information and/or patch if I can get around to installing Debian 8 on my desktop. (There is a closely related bug where the KEYBOARD_{RATE,DELAY} settings in the same file also no longer work because when kbdrate is executed its standard input is not connected to the Linux console.)

A Raspbian bug could be reported here, with reference to the Debian issue. I have no experience of that either (there have hardly been any Raspbian bugs, except those from Debian, and quirks in the Foundation's images).

Of course it would be much better to fix the problem in Debian and then the fix will appear in Raspbian like magic. On the other hand, we do know that Pi users are disproportionately likely to want to disable screen blanking.

jakymiwm
Posts: 1
Joined: Tue Apr 26, 2016 9:10 pm

Re: Jessie : How to disable CLI screen blanking ? [SOLVED]

Tue Apr 26, 2016 9:13 pm

Editing /etc/kbd/config works on 2016-03-18-raspbian-jessie-lite until you upgrade systemd from 215-17+deb8u3 to 215-17+deb8u4.

User avatar
paulwratt
Posts: 83
Joined: Fri Jun 12, 2015 12:15 am

Re: Jessie : How to disable CLI screen blanking ? [SOLVED]

Sat Oct 15, 2016 4:22 am

Jessie console (not X) blanking as of 2016-Oct-15 and for setups that don't use kbd package (minibian, amibian) from this post
So my options for changing the default is one of the following:

Add setterm -blank X (X in minutes, 0 to disable) to a shell init file like .bashrc.
Add setterm -blank X to /etc/rc.local.
Paul

Return to “Raspbian”