Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to configure Linux text console to automatically turn of the monitor after some time?

And by "text console" I mean that thing that you get on ctrl+alt+F[1-6], which is what you get whenever X11 is not running. And, no, I'm not using any framebuffer console (it's a plain, good and old 80x25 text-mode).

Many years ago, I was using Slackware Linux, and it used to boot up in text-mode. Then you would manually run startx after the login. Anyway, the main login "screen" was the plain text-mode console, and I remember that the monitor used to turn off (energy saving mode, indicated by a blinking LED) after some time.

Now I'm using Gentoo, and I have a similar setup. The machine boots up in text-mode, and only rarely I need to run startx. I say this because this is mostly my personal Linux server, and there is no need to keep X11 running all the time. (which means: I don't want to use GDM/KDM or any other graphical login screen)

But now, in this Gentoo text-mode console, the screen goes black after a while, but the monitor does not enter any energy-saving mode (the LED is always lit). Yes, I've waited long enough to verify this.

Thus, my question is: how can I configure my current system to behave like the old one? In other words, how to make the text console trigger energy-saving mode of the monitor?

(maybe I should (cross-)post this question to http://unix.stackexchange.com/ )

share|improve this question
    
Are you using APM or ACPI for power management? I've noticed that with APM the behavior you're looking for is available out of the box. I have yet to figure out how to get that behavior with ACPI. I'm wondering if you were using APM with your Slackware installation, and ACPI with Gentoo now. –  Jack Leow Jan 15 '12 at 1:50
    
Well, given the year when I used Slackware, it is quite possible that I used APM (maybe together with ACPI, if that's possible). I believe that what I'm describing here is a bug that nobody cares to fix (maybe because it affects too few people?). –  Denilson Sá Jan 16 '12 at 11:03
    
Sounds like it - I'm guessing not many people use just console mode Linux. Let me post an answer that may be relevant. –  Jack Leow Jan 16 '12 at 17:47
    
BTW, you can use only APM or only ACPI, but not both. –  Jack Leow Jan 16 '12 at 17:48
add comment

2 Answers

I'm not totally sure, but if you have setterm -blank <n> set in one of your initialization files, try something like:

setterm -blank 10 -powerdown 15

The vbetool command can be handy sometimes:

vbetool dpms off

You will need to have APM or ACPI enabled in your kernel.

See also:

share|improve this answer
    
Good. I already have /usr/bin/setterm -blank 6 -powersave powerdown -powerdown 12 on my /etc/conf.d/local.start, but the monitor does not power off. :-\ –  Denilson Sá Nov 3 '10 at 20:04
add comment

Over the past week, I have been trying to compile a minimal kernel for an old machine, and I've noticed the exact same behavior you are seeing with your new Gentoo set up when I use ACPI, and the behavior you saw with your Slackware when I use APM.

Specifically, if I compile a kernel with ACPI but not APM:

  • Console goes blank, but the display never power downs.
  • However, you have control over ACPI events (e.g., pressing the power button initiates the Linux shutdown sequence).

If I compile with only APM, no ACPI:

  • When the console goes blank, the display powers down.
  • Pressing the power button cuts power to the system immediately.

I made various attempts (setterm, vbetools) to get the screen to power-down during console blanking with ACPI, but can't seem to do it. If anyone has any ideas, please let me know.

Also, I don't think you have to re-compile your kernel to repeat my experiment. I believe most default kernels have both ACPI and APM available (as modules), and defaults to ACPI (if the hardware supports it). To try disabling ACPI, you should be able to pass in acpi=off to your kernel during boot up.

Per the Linux kernel documentation:

acpi=       [HW,ACPI,X86]
        Advanced Configuration and Power Interface
        Format: { force | off | strict | noirq | rsdt }
        force -- enable ACPI if default was off
        off -- disable ACPI if default was on
        noirq -- do not use ACPI for IRQ routing
        strict -- Be less tolerant of platforms that are not
            strictly ACPI specification compliant.
        rsdt -- prefer RSDT over (default) XSDT
        copy_dsdt -- copy DSDT to memory

        See also Documentation/power/pm.txt, pci=noacpi

(Source: http://www.kernel.org/doc/Documentation/kernel-parameters.txt)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.