LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-06-2010, 09:05 AM   #1
ShadyCraig
LQ Newbie
 
Registered: Jan 2001
Location: UK - Midlands
Distribution: Redhat various
Posts: 29

Rep: Reputation: 15
Question How to disable console blanking in text mode


Hi All,

I run a custom build of linux running kernel 2.6.24 and busybox.
At the moment I'm investigating a kernel panic.

The problem is that after 10 minutes the screen is blanked, i.e. it is still on but has been turned black. If you press a key then the command prompt is shown once again, but if the kernel has crashed then this won't work and any info about the panic is inaccessible.

So I'd like to prevent the display being blanked.
I've tried booting with 'apm=off' and 'apm=off acpi=on' kernel parameters but neither had any effect.

Any help in this matter will be gratefully received.

Thanks,
Craig
 
Old 01-06-2010, 09:08 AM   #2
slinx
Member
 
Registered: Apr 2008
Location: Cleveland, Ohio
Distribution: SuSE, CentOS, Fedora, Ubuntu
Posts: 106

Rep: Reputation: 23
Have you checked your monitor for a blanking setting? It may have a setting you can configure in the OSD.
 
Old 01-06-2010, 09:58 AM   #3
ShadyCraig
LQ Newbie
 
Registered: Jan 2001
Location: UK - Midlands
Distribution: Redhat various
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks for your reply slinx,

I've checked the OSD for the monitor and no such setting exists.

Also I'm sure it's not the monitor as when in power saving mode the power led changes to amber but it's remaining green.

Thanks again!
 
Old 01-06-2010, 10:06 AM   #4
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 113

Rep: Reputation: 23
Wow ! It's been years since I had to change that setting.
But I think you may want to investigate using setterm and it's -blank argument.

Code:
SETTERM(1)                                                        Linux Programmer's Manual                                                       SETTERM(1)



NAME
       setterm - set terminal attributes

SYNOPSIS
       setterm [options]

DESCRIPTION
       setterm  writes  to standard output a character string that will invoke the specified terminal capabilities.  Where possible terminfo is consulted to
       find the string to use.  Some options however (marked "virtual consoles only" below) do not correspond to a terminfo(5) capability.  In this case, if
       the  terminal  type is "con" or "linux" the string that invokes the specified capabilities on the PC Minix virtual console driver is output.  Options
       that are not implemented by the terminal are ignored.

OPTIONS
.
.
.
.
       -blank [0-60] (virtual consoles only)
              Sets  the interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available).  Without an argu-
              ment, defaults to 0 (disable console blanking).
--ET
 
Old 01-06-2010, 10:14 AM   #5
ShadyCraig
LQ Newbie
 
Registered: Jan 2001
Location: UK - Midlands
Distribution: Redhat various
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks slacker_et,

Unfortunately I don't have setterm on my system but I'm having a look at the source to see what it does.
I can't just compile it as everything has to be cross-compiled for this system :-(

Cheers!
 
Old 01-06-2010, 10:29 AM   #6
ShadyCraig
LQ Newbie
 
Registered: Jan 2001
Location: UK - Midlands
Distribution: Redhat various
Posts: 29

Original Poster
Rep: Reputation: 15
I've had a look at the source code for setterm and basically it prints some special characters to the terminal.
Using the command-line version of printf it's possible to emulate it.

To set the -blank option do:

Code:
printf "\033[9;%ld]" minutes
Replace 'minutes' with a value 0-60.

In my case I used 0 to disable the blanking:

Code:
printf "\033[9;%ld]" 0
Just have to wait an see it it works (ok so far).

Thanks for the pointer slacker_et!
 
  


Reply

Tags
apm, blank, console


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable the new mail notification in console mode? retypedef Linux - Newbie 6 03-21-2010 04:15 AM
Disable Power Save Text Mode ? to3t3r Ubuntu 2 10-22-2006 07:15 AM
disable automatic screen blanking in console mode drkstr Slackware 3 10-10-2006 09:25 PM
How do you disable console mode? shuego Debian 8 12-08-2005 06:50 PM
how do I disable graphics acceleration in console mode lemuel Linux - General 4 01-10-2005 04:57 PM


All times are GMT -5. The time now is 10:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration