SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How do you set the monitor to go into powersave mode rather than turn the screen black when in the CLI. I have set this in X for when I leave my computer running something that requires X, say downloading a file with firefox and that works OK, but I have my computer boot up to a console and not startx and similarly when I log off it is in console mode, so I would like it to suspend the monitor after a while rather than make the screen go black
The command you're looking for is setterm. By default it's called at the beggining of /etc/rc.d/rc.M, you can change that line so the settings you want will be loaded every boot.
See setterm man page for more info about using it.
so from what I understand the monitor should powerdown after 75 mins. I don't think it does, the green light that normally goes orange to say its powersave mode stays green unlike when in X, also when I waggle the mouse it come on straight away rather than have a 10 second wait for the monitor to initialise.
I am using the 2.6.10 kernel from /testing on the Slackware 10.1 disc.
I have modprobe apm in rc.modules, this was to allow the computer to knock off when I shut it down, but I think it may have an impact on this.
I am using a GeForce FX5200 graphics card and have installed the nvidia drivers and have configure xorg.conf accordingly, but that driver isn't used in the CLI mode is it? Could that explain why powersave works in X and not in CLI, because the VESA driver doesn't know how to work the graphics card?
manually on the console, powerdown works, but the interval of 60 (or whatever value) minutes does not apply: the monitor powers down shortly after the screen has blanked out.
powerdown problem found in fbcon.c's fbcon_blank()
setterm just sets a flag. the real problem is in the kernel. i've had the same problem when i was just using kernel 2.6.12. i've found out that fb_blank() in the fbcon_blank function of video/console/fbcon.c was not really referring to the fb_blank of the fb driver.
take a look at this code:
Code:
static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
{
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct fbcon_ops *ops = info->fbcon_par;
if (mode_switch) {
struct fb_var_screeninfo var = info->var;
ops->graphics = 1;
if (!blank) {
var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE;
fb_set_var(info, &var);
ops->graphics = 0;
}
}
if (!fbcon_is_inactive(vc, info)) {
if (ops->blank_state != blank) {
ops->blank_state = blank;
fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
ops->cursor_flash = (!blank);
if (fbsplash_active(info, vc))
fbsplash_blank(vc, info, blank);
else
fbcon_generic_blank(vc, info, blank);
fb_blank(blank, info);
}
if (!blank)
update_screen(vc);
}
return 0;
}
you see here fb_blank(blank, info) should have been something like fbops->fb_blank(blank, info)
we must also add struct fb_ops *fbops = info->fbops;
so the output code should be
Code:
static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
{
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct fbcon_ops *ops = info->fbcon_par;
struct fb_ops *fbops = info->fbops;
if (mode_switch) {
struct fb_var_screeninfo var = info->var;
ops->graphics = 1;
if (!blank) {
var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE;
fb_set_var(info, &var);
ops->graphics = 0;
}
}
if (!fbcon_is_inactive(vc, info)) {
if (ops->blank_state != blank) {
ops->blank_state = blank;
fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
ops->cursor_flash = (!blank);
if (fbsplash_active(info, vc))
fbsplash_blank(vc, info, blank);
else
fbcon_generic_blank(vc, info, blank);
if (fbops->fb_blank)
fbops->fb_blank(blank, info);
}
if (!blank)
update_screen(vc);
}
return 0;
}
after that i recompiled the kernel and made the console blank and powerdown the way i expected it to be.
if i am correct fb_blank() remained fb_blank() from 2.6.12 even up to the current version 2.6.17.4. and IMO the real reason devs leave this behind is because each fb driver has their own different behavior and it might just be buggy if powerdown is enabled to other fb drivers.
ps. i tried to redo this in the 2.6.16 kernel and just found out that the fb driver nvidiafb has already changed and for unknown reasons powerdown was no longer working. i already spent too much time trying to figure out the problem of fb_blank and i expect more more time if i'll go on trying to hack the more complicated nvidia.c.
pps. i hope the kernel devs will find a more complete solution to these problems. powerdown in console is a real need.
Thanx for the reply to my ancient thread. I had completely forgotten about it. With Slackware and a 2.4 kernel on my laptop, the monitor shuts down. My other two machines still need this addressed, but since I ssh into both through my laptop more often than I'm physically at them they can wait a bit longer.
I really appreciate the info. I'm glad that I finally got an answer; better late than never.
Wow. You're welcome. I mean thanks a lot too. That's the first time I heard someone appreciate from my post. At least from the linux community.
Anyways I've been into using 2.4 version before but I don't remember the console working with powerdown too. Maybe it's already fixed so I might as well try downgrading to that version sometime.
I'm using the 2.4.32 kernel on an IBM Thinkpad 600x with the APM module. I am very satisfied with the results. I tried the 2.6 kernels but they didn't behave without a fair amount of configuration. Not to mention, I was feeling very lazy at the time. The 2.4 kernels worked well the first time so I chose to stick with them.
I'll try to apply the above knowledge in this thread and see how far it gets me. Again, thanx for the info.
Hello!
What if one wants make the monitor go into suspend or powerdown and not just blank?
For some reason my monitor only turns blank and stays on all the time, I'd like to either shut it down or suspend after NN minutes...
When I use
nothing happend (well, no blank screen anymore), and after playing around with this, I came up to conclusion that only -blank parameter is working...
Is this also depence on video card? (I'm using old voodoo3)
Sorry to bring this one back from the dead, but this is the only intelligent information i have found on this topic. I've been trying to figure out how to go about recompiling the kernel and all, without much avail. Maybe I am just not looking in the right place, but I only can find fbcon.ko which is of no real help.
Are there any new solutions to this? It has been a while =)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.