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 |
Have you checked your monitor for a blanking setting? It may have a setting you can configure in the OSD.
|
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! |
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) |
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! |
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 In my case I used 0 to disable the blanking: Code:
printf "\033[9;%ld]" 0 Thanks for the pointer slacker_et! |
All times are GMT -5. The time now is 12:16 AM. |