S3 Standby State Done Right
For Earth Day, Cameron Butterfield has written in with a pointer to his article on how to get your Windows PC into S3 sleep, and why you want to. It covers the question of how to take advantage of this extremely low-power mode even when your machine is an "always on" file server, remote desktop, or VNC server.
Great for Windows users... but what are the options to set up a Linux system to reduce power usage and fan noise when idle?
-- Ed Avis ed@membled.com
It doesn't seem to be a hot topic because I couldn't google a definitive page. There were lots of pages for individual computers or distros though.
/usr/src/linux/Documentation/power/ ... The exact file on my system is states.txt but it also seems to exist on other distros as suspend.txt
The documentation is probably on your own computer at:
I wonder if how does S3 work on a laptop? Does laptops' built-in energy saving mechanism collide with tricks described in the article?
I use the S3 standby on my MCE machine, and it's really really nice. I turn the machine on and off (well, awake/asleep) using the power button on the remote, and the machine is up and ready to go in about 3 or 4 seconds (as long as it takes me to switch the TV to the right input). I've only ever had it refuse to wake up once in the 1-1/2 years I've been using it, and that was remedied by using the power button on the front of the machine (it woke right up and didn't even need to be rebooted). Definitely worth looking into for instantaneous access + decent power savings.
This guy's the limit!
Surely enabling your PC to wake up whenever any network traffic is sensed is stupid in the example described in the article.
Will it not wake up whenever any workgroup broadcasts are sent to it?
I know I'm setting myself up for flames around here, but the OS with the best support for APCI S3 Suspend is FreeBSD 6.2, even though it's certainly not perfect.
My desktop _almost_ worked. I had to swap-out my ATI video card to get it to resume from S3.
Now, the big problem is X.org... Since X doesn't play well with suspend, FreeBSD is supposed to switch off of X, to a virtual console before entering suspend mode. Unfortunately, I've found that, unfortunately, X 6.9.0 freezes about 1 in 3 times. Once I figured that out, it was just a matter of manually switching to a console, then typing "suspend" before I walk away. Now I haven't rebooted my machine in months, and it's on and usable (right where I left everything) in about 3 seconds.
Of course, the drawback to X not cooperating is that I can't set my machine to auto suspend when it's been idle for a few minutes, but I'm hopeful the next release of FreeBSD will fix that. X6.9.0 is the latest ported release, and compiling from vanilla sources goes horribly, horribly wrong, right now. I could try downgrading, but it's not worth the hassle and lost features, IMHO.
Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
I haven't used any of the MacPro's, but in the PPC era the sleep state was similar to S3 standby.
This guy's the limit!
Windows XP will often times not give s3 suspend as an option even when turned on in BIOS. But with Microsofts dumppo.exe utility you can force it to use an S3 or S4 state. ftp://ftp.microsoft.com/products/Oemtest/v1.1/WOST est/Tools/Acpi/dumppo.exe To force it to S3, run this under command prompt "dumppo admin minsleep=s3"
often, my computers cant be put to sleep because theyre transferring files (over aim, bit torrent, you name it.. every app according to its need).
Ive noticed all companies, including apple, whose products i use, are giving you only a black and white choice. you either have the computer awake or its fully asleep.
i'd like to have a low power transfer mode, where the cpu is reduced (to 1 core at say 500 mhz), the monitor is turned off, and as much memory as possible is dedicated to the apps which are doing intensive file reads/writes. this will allow the hard drives to be used less by caching the files in ram and pulsing the hard disk.
VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
Wow, great article and definitely something I wouldn't even consider unless it discussed wake-on-lan settings as I use my computer as data storage for my media center also. I tested out my standby settings and my fans just kept going, which is a problem for me because right now my office is 9 degrees hotter than the temperature outside (80 to 71, in Minnesota!). Kind of uncomfortable. Also nice to see an article all on one page. I expect to see a regurgitation of this article soon on some ad-ridden PC site spanning 10 pages.
Reviewing just the first hour of video games.
There was some useful info in this article about configuring your network adapter to support wake-on-lan, but what about wireless adapters? In my experience they don't seem to support WOL or any equivalent. The only solution I can think of is to connect an ethernet client device to my computer so that I can use the WOL of the computer's ethernet, but this is not really a good solution.
Is there any sort of WOL capabilities in the new 802.11n?
* Power bills are generally measured in kilowatt hours or "kW/h"s. Power rates might be as much as $0.12 per kW/h
* Our total cost of having the computer on 24/7 for the month in this scenario would be as follows:
*
That said, it is a good article on how to keep the "instant-on" without using excess power.
Back in the pre-NT-based days, perhaps. Most modern operating system kernels issue the HLT instruction plus some extra power management jiggery-pokery to the CPU when it's not being used at max anyway. (Check out /proc/acpi/processor/CPU*/power under Linux.)
"If we take just a reasonable estimate that a computer uses 400 Watts idling along, we can find some astounding figures."
That doesn't sound very reasonable to me.
".4 kW (400watts) * 720 Hours * $0.12kW/h = $34.56"
Nope, that's way off what the average PC costs to run.
He does have a point thought about using lower power modes. On newer PCs it seems to work well and it will save you bucks if you have several PCs in your house.
If you wanna get rich, you know that payback is a bitch
Does that mean my PC costs one-quarter of what he calculates?
I don't need no friiggin S3 sleep on my computer ! The damn thing ingested an S2 engine the other day. Now I wont turn off even when it's not plugged-in !
It seems to me like this is more of a workstation thing than a server thing, at least in Microsoft land (which is what the article is about). In any sort of domain environment, the DC is going to be talking to the servers at least every fifteen minutes, if not more frequently. The servers won't be asleep for very long.
Welcome to the exciting new world of UGC.
that will now cry that their computer _has_ to be on, 24/7 (because otherwise, they couldnt improve their epenis, er, i mean uptime).
Well, i used to have my computer always on. When it wasnt needed, it went into hybernation mode. After i upgraded my system (changed from amd and old socket 939 to core2. Btw, against the "wisdom" of the typical moron, without reinstalling windows. Isnt needed since win2000, people...), S3 was activated automatically.
And it NEVER made any problems. The limiting factor for wake-up time is the HD spinup (about 4-5 seconds). Meaning that when i press that little button on my case, the desktop is available when i have sat down and grapped the mouse.
Works inside 3D games, when playing videos, ect.
Never went back. Electricity cost is down about $30 a month, without _any_ kind of drawback.
HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
Slightly off tangent, but hibernation (S4) fails in WinXP SP2 if you have more than 1GB of RAM.
My biggest problem with standby on my WinXP machine is that my machine will randomly wake up after a random amount of time. I've already disabled WOL and Wake-on-USB, but my computer will wake up randomly from standby anywhere from 3 minutes to never. I still can't figure out what's causing the problem. :(
Anyone who has not Bill Gate's memo about this should. Anything M$ touches is shit: winmodems, wifi, ACPI, APM and the list goes on and on. They can't make their own stuff work, so they have to break everyone else's.
Despite his efforts, power management can be made to work. It's not easy and you can't expect the latest and greatest to work. The closer a company's working relationship to M$ is, the harder it will be to make things work. For example, Dell is more difficult and Thinkpad is easier. As with most free software, if it's going to work the live distros will auto configure it and it will work almost out of the box.
I still use APM for the most part and have ignored conveniences like WoL.
Friends don't help friends install M$ junk.
Windows XP will often times not give s3 suspend as an option even when turned on in BIOS. But with Microsofts dumppo.exe utility you can
How typical, a DOS only power tool to manipulate your hardware and everyone else is out of luck. Yeah, that stinks. Thanks, Bill.
Friends don't help friends install M$ junk.
I usually have sleep mode enabled after 60 minutes of inactivity, but I occasionally need to keep the machine up because I'm downloading something.
Ideally I'd like to recompile the app with code inserted to disable sleep mode while it's running, or register some kind of user activity. Anyone know how this is accomplished on Vista? Another option would be to write another app that monitors network activity, and disables sleep mode when it sees activity over a certain threshold.
AccountKiller
Slightly off tangent, but hibernation (S4) fails in WinXP SP2 if you have more than 1GB of RAM.
Works just fine for me. Probably because I installed the udpate mentioned in the resolution section of the article sometime last year.
Chicken fried butter sticks? Do
that will now cry that their computer _has_ to be on, 24/7 (because otherwise, they couldnt improve their epenis, er, i mean uptime).
Uptime is something M$ can't deliver, but they have done a nice job of making sure systems with good uptime can't do power management easily. ACPI is sabotaged. I'd love to be able to have all my systems hibernate AND be network accessable, but I have not had the time to see that it does or does not work on my system yet.
From what I've heard, M$ has also unable to deliver when it come to applications data and power savings. Programs like Word used to barf and corrupt your open files on resume. I suppose that's what happens when you make spend your time making things complicated to harm the competition instead of making thins simple so your own stuff works.
Oh, yeah about uptime. I booted my laptop at 90 days because I wanted a new kernel. Other than that, all my work was always where I left, neatly spread out across virtual desktops, it whenever I lifted the lid. That's 90 days without a loss of placekeeping or the pain of booting.
Friends don't help friends install M$ junk.
I work as an HVAC engineer, and I have to take into account the PCs when designing air conditioning for an office. I figure 200 to 250 watts per workstation; that is supposed to take into account average usage including everything: the PC, monitor, peripherals, task lighting, occassional printers, etc. I've been told that this is too high, but my career has spanned a lot of changes - dummy terminals, energy inefficient monitors, heavy duty PC workstations, efficient but larger monitors, LCD monitors, thin clients, etc. - so I tend to take the conservative approach and assume that it can change again to higher wattages within the lifetime of the AC system. Power consumption of devices keeps on being improved, but instead of using less power, PCs do more with the same amount of power. If your PC has a 500 watt power supply it would probably never use much more than 400 watts (you need some safety margin) and it would probably use, on average, less than half that while working hard. With modern PCs it could easily use less than 50 watts when idle.
Twitter is becoming a very amusing study of social engineering to me. He is 100% correct on most of his posts, it's only the attitude in his speech that makes him annoying to most people. Your response is just encouraging the behavior, which is the typical response to his posts. Rarely do people actually refute the content of his posts.
I think with a different delivery method, Twitter might be better received. . .
"He may be mad, but there's method in his madness. [...] It's what drives men mad, being methodical." G.K.Chesterton
Everybody who believes to the contrary should have to dig around in disassembled DSDT code to try to make their thermal zones report the temperature properly (which I've done) and make the machine resume from S3 instead of rebooting when hitting the power button (which has failed miserably) in a spec-compliant ACPI implementation.
If you haven't done that, go do it. Now. Gain an appreciation for either the difficulty in following the spec properly or the incompetence of the OEMs to implement their part properly---or both.
Energy isn't measured in kW/h. I'm not sure what a kW/h would meassure. The article writer made this mistake and now everyone on /. is doing the same thing.
Energy is measured in kWh (or kilowatt-hours), which is one kilowatt of power used for the length of one hour.
Oh yeah.
Bill Gate's memo
That's an interesting email from 1999. Myself, I've been known to send emails to the tone of "how can we prevent the competition from leeching on our multi-million dollar R&D investment with our technology partners", but OK.
Would you like to point me to the follow up email from Eric Rudder that says "Hi Bill - As you requested, we've made the ACPI extensions specific to Windows so no one else can implement them. Cheers!" I can't seem to find it.
Oh, wait - here's ACPIfor Linux and ACPI for FreeBSD. Indeed, here's a quote from the WP entry:
Now, ACPI has its shortcomings. It's complicated. It might not be your ideal of a standard. But it is an open standard, which Linux indeed implements. It might be broken in some ways in Linux as it is in Windows, but implemented it is. It's an important standard because it takes hardware out of the equation, which is important for a general OS that's supposed to support a wide range of it.
I still use APM for the most part
Really? That's also a Microsoft-defined standard (along with Intel):
Is that standard "shit" as well? And if you all these standards from Microsoft are "shit", then why do you use them at all? You use Linux, right? Why don't you come up with your own standard and give it to the free software world so they can stop using all these "shit" open standards that Microsoft has bothered to make open for anyone to use? Which reminds me, I'd love to see that other email about ACPI I mentioned. Thanks.
I've been wondering if it's technically possible for newer 10K or 7.2K HDD's to slow down during quiet periods. It bugs me that the drive in my little home server has to run 24/7 at full speed just to receive the odd email or web page hit every 5-10 minutes.
Maybe there isn't a big enough power difference to make it worthwhile, I dunno.
Anyway, with flash is getting so cheap, sooner or later I'll find a way to delegate those things to flash and let the HDD actually go into sleep mode at night.
S3 standby shuts off hard drives and if you're running a file-server, aside from the lag people will experience between their packet and your computer reviving itself, power cycling your drives dozens of times a day will greatly reduce their lifespan. If you're worried about going green, buying an unnecessary hard drive probably puts more chemicals into the environment from its manufacturing than leaving your computer on?
powercfg -a
Works for both XP and Vista. Tells you what's available and what's not (S1, S2, S3,...) Vista tells you why something isn't support.
Got info from this page
the system. I followed directions like that S3 article, and what I get is a Windows that locks up and won't wake up. I don't know if it is a hardware, OS, or software issue. I usually get the login screen and then the mouse cursor won't move and the keyboard no longer works and beeps at me for each key I press.
My laptop works that way and so does my desktop. It is very annoying and in order to avoid the lockups I have to turn power saving off and then the system doesn't lock up anymore.
Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
I know you are trying to http://en.wikipedia.org/wiki/Internet_troll troll, but is that the best you can do? This has got to be one of the lamest troll comments in a while on slashdot...
Put some effort into it at least! Let me get you started with a helpful guide to trolling http://www.urban75.com/Mag/troll.html
Keep in mind that if you're using Vista, you're machine will likely not wake, and, if you have my problem, you'll have to hard power down the machine, fscking your filesystem.
see this
Video drivers. I've seen it before -- switch to an ATI card and you'll be fine.
/my/ machines to somnanbulate.
Those nSomnia cards cause nothing but grief.
I'd seriously consider blaming the mouse. Try unplugging it before sending the computer into standby, and see what happens. Micromovements are always what cause
Yahoo! Pipes are awesome. How awesome? http://pipes.yahoo.com/jesdynf/slashdot
I might have to agree, at least in part. Requiring a static IP makes this solution not viable for people on, say, a college campus, which is the first thing that comes to mind when I think of areas where power-saving modes could actually add up to something meaningful.
Is that [APM] standard "shit" as well?
Yes, like all M$ defined "extensible" non standards, APM is shit. It's older, less complicated and better fixed shit but shit none the less. It relied on finding a DOS partition for hibernating, and was different on each laptop. APCI is much the same, but screws up even more of your motherboard. LinuxBIOS or other free software implementations are much better.
Would you like to point me to the follow up email from Eric Rudder that says "Hi Bill - As you requested, we've made the ACPI extensions specific to Windows so no one else can implement them. Cheers!" I can't seem to find it.
I'm surprised Bill was dumb enough to document his intent. I'd be very surprised to find follow ups other than the 600 page ACPI non specification. If an email from Bill Gates himself saying "screw Linux power management over" is not good enough for you to understand the situation, I'm not sure what is.
Friends don't help friends install M$ junk.
Don't bet on it. I have an ATI card (X1600) and I had that problem. Patch worked for me.
Telltale Games: Bone, Sam and Max
Your computer doesn't necessarily use 400 watts all the time. It might use mebbe 40-50w in idle, AKA, no 3D apps running, nothing using too much power.
s umption.asp h tml
Here are a few sites with some more info:
http://windows.uwaterloo.ca/Hardware/PC_Power_Con
http://www.codinghorror.com/blog/archives/000662.
Charming man. I wish I had a daughter so I could forbid her to marry one. -Arthur Dent
Err. Having read your serious reply to my worthless suggestion, I see that Slashdot helpfully deleted the (non-conforming) markup I used to indicate what was a joke and what wasn't. Phooey. Shoulda caught that in preview, I suppose...
Yahoo! Pipes are awesome. How awesome? http://pipes.yahoo.com/jesdynf/slashdot
Yes, that's been a great success. Are you working on this or other standard to replace all the "shit" Microsoft has given you so far? How's that going?
I'm surprised Bill was dumb enough to document his intent.
What you are implying is action. I asked for you to document how Microsoft "screwed" Linux power management with ACPI, possibly screwing themselves (if I follow your logic) in the process, since Windows contains an ACPI implementation. You made an assertion, and now you need to prove it. As always, it's that simple. Claiming that ACPI has too many pages is hardly proof of anything other than that stuff is hard to do in software rather than hardware. Unless you're an expert in the field and would like to clarify that for me. Oh, that would be great.
Other than that what you have is an 8-year old email that proves absolutely nothing but is great as a bullet point in your infantile "I hate teh M$ Windoze" rants.
Generally people don't bother to refute the content of his posts because it's pointless. He'll argue until he's blue in the face - or you provide a coherent and logical response to him. He has no rebuttal for that. Far easier for him to go on to the "Evil Micro$oft WinDoze!" troll.
What I'd like to see is S3 power state + "leave my f*ing hard drives spinning (and maybe a fan blowing on them for good measure)".
I can't seem to find an easy way to implement such a state (short of adding a second dedicated PSU?) but it's precisely what I believe is needed. How long do you think your data is gonna last with your hard drives spinning up and down a dozen times a day every time a packet is destined for your NIC? Hard drives take up what, 8 watts ongoing? It's really the CPU and Graphics that eat up juice in a modern PC, so please, leave my hard drives alone.
Why try and force a 300W machine to sit at 50W when it only needs to run low load background tasks? That's not an optimal solution.
:)
If you do need a machine to be on 24/7, there is another way.
In my example, I have the requirement to run a games server 24/7 serving 1.6Gb/day, and also play games on it/unrelated games. Obviously the games machine is always going to be something of a power hungry beast, so not optimal for long-term running as a server as well.
The solution - two machines. One expensive power-hungry beast for playing games (that can be switched off when not in use), and one cheap efficient machine for 24/7 serving.
For the server I use a SFF Compaq D500 (1.3GHz Celeron with 512Mb SDRAM) which can be picked up for next to nothing on eBay. It came as standard with a 50W supply because they never were that power hungry in the first place. Disconnecting the DVD drive and not having a keyboard and mouse plugged in brings its power consumption down even further, and with some of the links to Linux power saving configuration in the threads above it may even be possible to improve this.
It has happily served 1.6Gb of games traffic per day for a measly 35W for many months now.
Don't try and adjust your quart to fit into a pint pot.
biopowered.co.uk - catalytically cracking triglycerides for home automotive use since 2008. Just say no to big oil!
Last time I looked, you didn't need a static IP address on the target machine in order to send a wake-on-lan packet, you need the MAC address, and an ability to get that packet onto the same LAN as the target machine. For a college campus, where you have control of all the routers, it would be easy to arrange the wake-on-lan packets to be sent to all of the college's subnets.
I.e., it should be parsed as "(Minimal Power) Management" rather than "Minimal (Power Managerment)"? Or, in other words, it attempts to minimize power usage, not to minimize management of power usage?
Last year I picked up an HP Pavilion A1540N running XP Media Center Edition, which is more or less Windows XP SP2. I was very annoyed to find that when I pressed the sleep button all the fans kept spinning. A bit of rummaging around led me to the control panel for Intel's Viiv Feature, which is intended to turn your PC into a 24x7 media control center. Well, call me a Luddite, but backwards me only wanted an economical PC on which to get my work done, and this high power, high noise sleep mode wasn't what I had in mind. Turning off Viiv seems to have solved "the problem". Sleep works fine now, and so does hibernate.
By the way, somewhere back in this thread someone mentioned a problem hibernating Windows machines with lots of resources (e.g. > 1GB Ram). FWIW, I had good luck applying Microsoft Update KB909095. There is also at the bottom of that page an announcement of another fix that specifically claims to be for hibernating with > 1 GB.
Anyway, the Viiv stuff was my main problem. You wonder just how many new power plants get built when companies ship this stuff enabled-by-default to people who don't need it.
Even though my ISP states that I have a dynamic IP address, my *router* will allow me to set a standard one (192.168.1.x). There are plenty of (free) software solutions that will translate your dynamic IP to a pseudo-domain. I've been using NO-IP to allow myself VNC access for a few years with no problems.
Non calor sed umor est qui nobis incommodat.
What patch did you use? I have an ATI x800 XL, and Catalyst 6.6 was the last version that S3 worked. I've tried all the Catalyst versions since then, up through 7.3 or 7.4, and S3 still doesn't work with that card.
You have an eight-year old email from Bill Gates wondering whether they should try to prevent everyone from leeching their R&D investment on ACPI (no doubt you think developing software is a zero sum game, but it's not. Someone paid for all that groovy software in your Gentoo boxen), and so far you have provided no proof whatsoever that said email actually ended up causing ACPI to be limited or damaged or "sabotaged" in any way shape or form by Microsoft. None whatsoever, period.
To repeat myself, ACPI is an open standard, of which at least one implementation exists for Linux and FreeBSD. So what is this "situation" you are referring to? Aside from your usual "FUD with a link" recipe that tends to fool the Slashdot moderators, how are you rationalizing that Microsoft "screwed" power management on Linux? By releasing ACPI and screwing themselves over as well?
Seriously, your "if you don't see things in the same glorious black and white as me I can't help you" responses are not going to do it. You need to specify what this "situation" with Linux power management is and why Microsoft caused it.
hmmm, now who'd be interested in that...
Thanks so much, I have been having this issue and just figured it was my annoying Lenovo laptop's fault.