Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I'm guessing this is the wrong forum, but I don't know which one would be better, so...
I'm trying to get my computer to go to sleep, so that it's dark/silent at night (dark is key; too many case lights ). I'm dual-booting Windows / Debian Sarge; "Standby" in Windows does exactly what I want. When the machine's up, though, it's usually running Linux, so that doesn't help much...
I don't know too much about power saving on linux, but from what I've googled, it looks like I want ACPI level S3. Apparently, the way to do this is 'echo 3 > /proc/acpi/sleep' (I've also seen 'echo "S3" > /proc/acpi/sleep'; I've tried both). When I do this, though, nothing happens. 'echo 3 > /proc/acpi/sleep' has exactly the same effect as 'echo 3 > /dev/null'.
I have installed acpid and acpi. I'm running a 22.214.171.124 kernel compiled from the kernel.org sources, because the stock Debian kernel didn't support my SATA hard disk. When I compiled this kernel, I compiled in all ACPI options, other than the assorted Laptop Extras (this is a desktop), Debug Statements, and * Container Driver (EXPERIMENTAL). I compiled a few APM options as modules; none of those modules appear to be loaded.
I'm running a Pentium D processor on an Intel 955X-based motherboard, with an NVidia graphics card and proprietary drivers (sorry folks, need UT2004 at decent framerates...), if that matters. rmmod'ing the nvidia module doesn't seem to help.
When you are going into suspend or sleep mode, you will have to first stop cron and syslog.
The setting S3 is Suspend to RAM, so I think it is still experimental. Use can S1 (power-on suspend) state instead. IMHO, desktop computers should not be set in suspend mode because it is glitchy at times. I did not add suspend feature in my kernel.
The LED lights can easily be turn off by a mechnical switch (aka a toggle switch). Also electrical tape can be used to hide the light. To minimize the noise, look into noiseless components like heatpipe and water cooling.
I tried stopping cron and syslog; I'd read that some programs might cause problems with suspend, but I didn't know which ones. Would they actively prevent the system from going into a Suspend mode, or would they just break on resume?
I also tried S1; I hadn't tried it before. It's not what I really want, but it'd be better than nothing. Unfortunately, it doesn't work, either. In the following code block, the first two commands exited after a moment of processing; the rest exited instantly, and caused no response (system didn't enter any kind of low-power mode, as far as I could tell):
By the way, which version of the "echo" command above should be correct? (echo n, echo "n", echo Sn, echo "Sn") Should it matter?
I have put electrical tape on some of the LEDs; the problem is that one is in the power supply, behind the cooling fan, so I can't really do anything to it easily. Also, I'm too cheap to spend too much on cooling, but all fans in the system are variable-speed and very quiet at low speeds, so if I killed all system-intensive apps it'd be quiet enough. I'd rather not kill anything, though; if I have to kill too much stuff, I might as well just shut down.
"Suspend" in Windows does work very reliably on this machine, so I'd think that the computer can do S3 (I assume that's what Windows is doing) without being glitchy. Maybe the Linux support is still experimental so it won't work well, but it'd be nice to at least give it a try.
Most device drivers aren't yet able to cope with ACPI sleep. Try compiling a kernel with all drivers as modules instead of compiled-in (choose M instead of Y when configuring the build). Then you can remove them all (modprobe -r <module_name>). After that, try your sleep command again. If it works (don't hold your breath) then you could try putting them back one by one, to see which causes the problem. "echo -n 3 > /proc/acpi/sleep" Works For Me (tm).
Otherwise, APM might be your best option. Note that you can't have ACPI and APM active at the same time. From the ACPI kernel help: "If both ACPI and APM support are configured, whichever is loaded first shall be used.". So, best to compile a kernel without any ACPI support to make sure APM gets loaded.
I've tried a few more things, and done some more looking around online; here's what I've found:
- The Pentium D is a dual-core processor; I have SMP enabled to take advantage of this. I tried compiling with SMP disabled (no other changes); with this, and with all X instances stopped ("/etc/init.d/gdm stop") and the NVidia binary driver unloaded, the computer will go to sleep as expected. It just won't wake up properly. It won't react to keyboard key presses (normally wakes it up in Windows). If I push the "power" button, hard drives and fans spin back up, but the monitor doesn't display anything (still in power-saving mode, according to its LED), and the computer doesn't react to anything that I can think of. Switching VTs does nothing, CTRL-ALT-DEL on the (PS/2) keyboard does nothing, I can't ping the computer's IP address from another machine on the LAN.
S1 sleep does work correctly with SMP disabled. Is there really any advantage, though, to using S1 that I couldn't get by slowing the CPU way down (I can apparently decrease the frequency by up to 83%), setting the hard disks to spin down, and turning off all peripherals?
Does ACPI work properly on SMP systems? It looks like APM doesn't, and I'd rather have the extra CPU power than power-saving modes.
- I have two hard disks in this machine; both are SATA. This system has two onboard PATA chipsets, one with only one bus and one with the normal two. The second chipset (the one with two busses) isn't recognized (yet?) under Linux, and a DVD burner and SuperDisk drive fill the one recognized bus, so a PATA HD isn't an option right now. I saw somewhere online that SATA doesn't yet support power-saving; I looked around and found a kernel patch that someone had published that claimed to offer SATA power-management support. I applied the patch and re-compiled; it didn't help, though.
This is a project for "Suspend to Disk", and it seems to be completely independent of ACPI. I.e. you completely power-down, but when you reboot, it restores an image from disk (like hibernate under windows). The version here seems to have more (but more experimental) features than that in the kernel. Also, their FAQ has a couple of articles on nVidia cards - maybe they'll give you a hint about what to do with ACPI. I haven't actually tried any of this.
I don't have a special "Sleep" button anywhere, neither in hardware nor in the list. I don't have any idea what all of those wakeup devices actually are. Does anyone else know?; it'd be worth a try, and it'd be interesting to know. Also, are there any systemwide events, like plugging in a USB device, that should wake the computer? (would that be what the USBn devices are for?; this machine has 4 USB port pairs)
I tried Software Suspend 2; I was never able to get it to work, though. Essentially, it couldn't reread its own suspend data; it died with several error on reboot. It looks like Software Suspend 2 might need a PATA drive at present; there's a bunch of stuff on their site about SCSI being untested/unsupported. SATA isn't mentioned anywhere on their site, but on my system it appears to be more closely related to SCSI than to PATA (my main SATA HD is /dev/sda)... Anyone else with facts/experience here?