Slashdot Mirror


Standby TVs Waste Electricity, How About ACPI?

twitter asks: "There's power management and there's standby, do you know the difference? The BBC is running story on how much electricity is wasted by TV standby mode. Thanks to the very useful EnergyStar program, I'd be the one in seven who thought they were saving electricity, with the standby button. I've been very happy with APM and hibernation on laptops, and want to do something similar with the desktops I use. What's the state of APM / ACPI Wake-on-LAN for Linux these days?" Slashdot touched on this issue, earlier in the week, but that article was more on TVs, not on computer power saving technologies.

17 of 166 comments (clear)

  1. Software suspend: ACPI/APM independent by TeknoHog · · Score: 3, Informative
    Linux has software suspend in the kernel. It's the same as hibernation in Windows. Memory contents are saved to swap, and when you boot the same kernel again, it picks up where it left off. It's independent of APM/ACPI and you can use it on any Linux machine.

    While the vanilla version works basically, Suspend2 is a more complete implementation. I use it on my laptop regularly.

    --
    Escher was the first MC and Giger invented the HR department.
    1. Re:Software suspend: ACPI/APM independent by TeknoHog · · Score: 2, Informative
      My big question though is whether it will bring my KDE desktop up faster than a plain vanilla boot? Does software suspend get round all that time-consuming service startup (and all the rest of the stuff that goes on while those messages are scrolling up the console)?

      Yes. When you boot again, only the kernel is booted, which takes about two seconds or so. Then instead of init (all those startup services), it picks up the RAM image from the disk (takes a few seconds on my 512MB machine).

      --
      Escher was the first MC and Giger invented the HR department.
    2. Re:Software suspend: ACPI/APM independent by jonored · · Score: 2, Informative

      The simple answer: Yes. The system never shuts down, it just saves the current state of the machine to disk and stops - when it comes back, it comes back with every process that it stopped with still running, almost like nothing happened. The long answer: stuff that was talking to the outside world will probably have it's open connections dropped, and the network card might need to be restarted or something. Nothing big, nothing that should take much time. Not sure how long it takes to bring the system back, though.

    3. Re:Software suspend: ACPI/APM independent by TheRaven64 · · Score: 2, Informative
      takes a few seconds on my 512MB machine

      Most laptop hard drives are hard pressed to give a 25MB/s sustained read rate. I am not sure exactly how the Linux implementation exists, but you have basically two choices:

      1. You flush everything from user-space RAM to swap. When you are back up, you page things in as required. This is fast to sleep (most of the data is on disk already, just flush dirty pages), fast to wake up (just demand-page everything), but will slow the machine down a lot as all of your applications are now generating large numbers of page faults.
      2. You write the entire contents of RAM to a disk file. This wastes as much disk space as you have RAM (the contents of RAM is going to be in your swap space as well as in your suspend-to-disk file), and can take a long time to sleep and wake. Worst, the amount of time taken is proportional to the amount of RAM you have. Most laptop users try to have as much RAM as possible, since spare RAM acts as disk cache and reducing disk accesses is a really good way of prolonging battery life.
      It sounds like Linux uses the second one, which is far from ideal (oh, it also eliminates encrypted swap as an effective security measure - another big drawback for mobile users). It is particularly bad for laptops, since the slow speed of laptop hard disks makes the suspend / resume time a lot longer than on a comparable desktop. Now, when Flash prices drop to the point that allows putting a suspend file in Flash, then this might suddenly become interesting. Particularly if it were done above the OS layer so it could take the kernel and machine state with it.
      --
      I am TheRaven on Soylent News
  2. WOL by SillyNickName4me · · Score: 3, Informative

    WakeOnLan is basicly a matter of sending a 'magic packet' to the MAC address of the comuter you want to wake up. There is no need ofr the OS on that machine to actually support that functionality (except for there being a few cards around that require WOL to be re-enabled after each boot).

    Sending the 'magic packet' is not difficult, and there is a variety of tools that can do this, including a ready made perl script, on a gentoo system, type 'emerge wakeonlan'. I bet it is available with most other distributions as well.

  3. Re: Convenience by alienw · · Score: 2, Informative

    It's a fallacy to point out the total energy used by such TVs.

    It's not a fallacy. There isn't just one of those TVs, there are hundreds of millions of them. They all use energy. Legislative mandates for more efficient electronics would go a long way. Right now, efficiency is simply not a criterion the manufacturer even attempts to optimize when developing a power supply; cost is a much, much bigger factor. This obviously needs to change.

    Are you basing that on anything but intuition?

    Don't be childish. If you take money out of your bank account at an exponentially growing rate and never put any in, it will run out in only a few decades. Regardless of how much is in there initially. Considering that energy use is growing exponentially, 50 years would be the upper bound for a shortage. I'm willing to bet on 10-20 before energy prices go up a LOT. Not like going to $2.20 per gallon for gas instead of $1.20, more like $20.00 per gallon. If this is to be avoided, the exponential growth has to be stopped.

  4. I'm off-grid. by Anonymous Coward · · Score: 1, Informative

    It's amazing how quickly you learn to understand and control your energy usage when you're running off battery banks replenished by PV panels and wind turbines.

    Every watt, volt and amp becomes precious, which means you must be aware of what is consuming how much and when.

    Cooking and heating is done via as and intelligent construction methods, such as efficient use of insulation. Water gets heated via a thermosyphon, which works very well, even though I'm in an alpine environment (6,200' asl).

    The only things I've given up are electric hotwater heating and clothes-drying, plus one or two other very heavy load devices. I still have my computers, stereo, and basics such as light.

  5. Re:Layer 2 Access Required [Security?!?] by megabeck42 · · Score: 2, Informative

    Getting raw ethernet frames, in Linux, is trivial. For example, to get such a socket from python: (copied from the scapy startup routines)

    self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(ETH_P_ALL))

    Whats that? You want to only get the traffic from a certain ethernet card, or want to transmit out a certain card? Easy. (In C, from my own code.)

            struct sockaddr_ll device_sa;
            int filedes;
            filedes = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
            device_sa.sll_family = AF_PACKET;
            device_sa.sll_protocol = htons(ETH_P_ALL);
            device_sa.sll_ifindex = ifindex;
            bind(filedes, (struct sockaddr *)&device_sa, sizeof(device_sa));

    You can get a device's ifindex with the SIOCGIFINDEX call, or with the rtnetlink RTM_GETLINK request.

    All you need for this is root, or suid root. In fact, I think you can just use CAP_RAW and CAP_NET_ADMIN, I believe.

    --
    fnord.
  6. Re:Stop Blaming Environmentalists (was: Convenienc by Shadow99_1 · · Score: 4, Informative

    Contrary to popular belief not everyone in the US owns a gas guzzling SUV... In fact my american car (Chrysler) gets better MPG than the subaru you mentioned.

    As for everything else...

    I did change my light bulbs, the effect I have to say seems negligable... Either my power company doens't bother to look at my meter to figure out energy use, or my lighting costs are fairly low and therefor the change made to small a difference to notice...

    I don't have solar panels used for hot water... My house is already built (& I didn't build it), so the cost to change things now is to much for my fairly average salary to cover... I could try to get a loan to pay for it, but that would nuke any savings I'd see for years... I also doubt anyone would give me a loan... Winter would also cause some issues for this... Heating bills are largest in the winter and solar isn't very effective in general when the solar panels are covered in snow...

    As for wind.... That's not a change I can make... Even if I did live in a good area (& I think winter would kill any effective use where I live), I'm not likely to be able to put up a tower... First their is the money issue again... Then I think my city would probably frown on it to... When I looked into wireless internet options I found out my area is heavily restricted on building anything over 30" tall... Less would probably not be so good with the number of trees around here...

    Nice ideas, but practicality is questionable...

    --
    we are all invisible unless we choose otherwise
  7. S1 sucks, S3 is great, if it works for you... by evilviper · · Score: 4, Informative

    I've been trying to get power management to work on PCs for over a decade now, and we're still not there...

    S1 (aka. sleep) works on most every system, since it's been around forever, but it'll only save you maybe 2% over the system being normally up and running (doing useful tasks).

    S3 (aka. suspend) is the damn-good one. It only uses about 0.5 watts more power than your computer being completely off (I suppose it might be different with a more effecient power supply like a Seasonic). However, it's damn near impossible to get it to work. Windows XP, Linux, FreeBSD. Tried on dozens of completely different machines, and I've never seen it work, once. The drivers for pretty much ALL the hardware need to be written with APCI in-mind.

    Hell, if I could just find a list of the motherboards, soundcards, and other components that have drivers on FreeBSD6 that will resume successfully from S3, I'd put together a couple systems with just those componets. Electricity in CA isn't cheap, and I'd be saving lots with instant-on from S3. No more boot-up waits, no more opening-up the same apps every time, etc. Just hit a button, and start working (as soon as the monitor can warm up).

    S5 (aka. hibernate) writes out RAM to disk, and reads from disk upon restart. I'm not a particular fan of this method, as it would take quite a while to resume on a system with a large ammount of RAM. Still, it has the potential to be even lower power provided you're going to be away long enough.

    So, in my experience, you're still screwed... Just shut-off the machine when you're done.

    --
    Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    1. Re:S1 sucks, S3 is great, if it works for you... by TeknoHog · · Score: 2, Informative
      S5 (aka. hibernate) writes out RAM to disk, and reads from disk upon restart. I'm not a particular fan of this method, as it would take quite a while to resume on a system with a large ammount of RAM. Still, it has the potential to be even lower power provided you're going to be away long enough.

      I use Linux's software suspend (which I've already mentioned too many times in this discussion :) It only takes a few seconds to restore 512MB of RAM. One reason it achieves this is that RAM contents are compressed with LZF when written on the disk, to avoid the I/O bottleneck.

      --
      Escher was the first MC and Giger invented the HR department.
    2. Re:S1 sucks, S3 is great, if it works for you... by Trelane · · Score: 2, Informative
      Linux's support for S3 blows.
      Not really. It works; the problem is usually working around little hardware gotchas. This is where having a team of tech engineers do that work for you comes in, which is why it generally works better with Windows than with Linux--with Windows, HP, Dell, and friends do all the work for you (and, notably, for Microsoft. Great scheme for Microsoft!). With Linux, since it's not supported on the hardware, you have to do it yourself.

      It works anywhere between fine out of the box and totally crappy, depending on the particular quirks of your hardware (for example, ATI cards apparently need VBE information saved, whereas other vid cards apparently don't). A friend of mine's laptop worked 100% with S3; my Inspiron (very similar to his) with a newer card (otherwise same laptop) worked great--except the video was useless after resume. I then found VBEtool tricks, and now it works fine (except I have to do funky tricks due to ATI proprietary driver suckage; it works great with the 2d drivers).

      In conclusion, if you want to run Linux, don't buy a notebook "Designed for Windows"--it will only be guaranteed to work with Windows. Now, due to current market conditions, finding a fully-supported Linux notebook can be an exercise in furstration. If you know of a reliable way to get a Linux notebook, please drop me a line!

      --

      --
      Given enough personal experience, all stereotypes are shallow.
    3. Re:S1 sucks, S3 is great, if it works for you... by olman · · Score: 2, Informative

      Short answer: Don't use VIA chipset motherboards.

      Longer answer: I have never got S3 to work on a box running some variety of VIA chipset mobo. I have got it to work beautifully in every setup I have used that had SIS/Intel/Nvidia/AMD chipset on various W2k/XP boxes at work and home.

      Note that "beautifully" does not imply that getting initially working setup was painless operation. But with correct combination of (WHQ) drivers it has always been doable. On current version of home/work boxes it was pretty much plug + play.

  8. Re:ACPI ? What ACPI ? by arivanov · · Score: 2, Informative

    Same here. But they have both ACPI and CPU frequency scaling (aka centrino, powernow, longrun, longhaul) enabled.

    The reasons are fairly simple.

    • Keeping the servers cooler decreases the electricity bill by up to 20% from ACPI and up to 75% from cpufreq for an average Pentium/Xeon based corporate install when idle. Athlon/Opteron numbers are comparable. This also decreases airconditioner wear and tear.
    • If your servers are well designed and have temperature controlled fans (all IBMs and Compaqs fall in this category) this increases fan MTBF by up to 2 times. Most importantly if a fan fails the server usually is cold enough to send out a clean alert and even work until you get around to replace it.
    • Your capacitor deterioration rate (they are the first thing to blow in a server nowdays) is considerably less which means that your overall server MTBF goes up and reliability increases considerably

    There is only one case where power management is unnecessary. It is if you are running a computational load which requires your servers to work 365x24x7 flat out. Running without ACPI and cpufreq (if supported) for an average corporate or ISP load is plain stupid. It results in a less reliable server installation.

    By the way, do not worry, 99.99 of the server sysadmins out there join you in this stupidity. In fact I did 7 years ago when I knew less about server administration.

    --
    Baker's Law: Misery no longer loves company. Nowadays it insists on it
    http://www.sigsegv.cx/
  9. Re:Convenience by Anonymous Coward · · Score: 1, Informative
    I just don't get it why many people see things often so black and white. Turning off is too hard and thinking stops right there.

    Well, it's darn easy to get one of those timer switches + powerstrips/adapters with multiple sockets. Connect the equipment that don't need power (TV-set, non recording dvd-player, etc set-top boxes) all the time and program it turn off devices at least based on your habbits when not watching (like overnight, the time in work/school etc.). Connect devices losing clock and doing recording directly to power. Leave the timer easily accessible to be able to override toggle.

    I've had this kind of setup past 4 years, the timer is leftover 20+ years old Theben Timer, still works perfectly and it takes only about stretch a day to reach the timer behind TV-set when back from work.

    It's not a fancy high-tech solution but cut's standby waste easily 30-60% (estimate of hours not spent watching or turned on), which was enough for me to implement it. It's not huge savings here per person/family, but accumulated total for a nation it's quite a bit, like the BBC article claims.

    Cheers,

    :-) riku

    ps. IMHO, it's oversimplification to claim that it does not matter trying to save excess power
                  consumption if you have thermostatic control or have electrical heating. It assumes that
                  all energy is equal in all ways which it isn't. The production price of power fluctuates and
                  is very much expensive on peak hours. The heating peak need is usually overnight, AC:s
                  cooling peak is afternoon etc. Lowering the peaks will lower the need of reserve kept. The
                  idea of avoiding all unnecessary consumption pays off in many ways globally and nationally.

  10. Re:Compact Flourescent by brunes69 · · Score: 2, Informative

    I haven't checked, but I suspect he also leaves his TV and amp on standby.

    I don't know what model TV you have, but if I unplug mine to get it out of standby, I lose all the programmed in channels and settings. Next time I plug it back in I have to reprogram it all. Same with my reciever.

    No thanks, it's worth the $1 a month.

  11. Kill-a-Watt by TClevenger · · Score: 2, Informative
    If you are truly concerned about what your equipment uses, get a Kill-a-Watt meter. Very easy to use, includes a KWh counter as well as an instant wattage display. You can find it around the 'Net for $27 or less.

    Some things I've tested recently:

    My PC speakers use 40 watts, even when "turned off". Result: they're on a power strip with a switch.
    My HP Laserjet 2100N uses 12-16 watts (depending on the fan), when in Power Saver. Result: it gets turned off when not in use.
    My PIII-650 desktop server consumed about 50 watts when idle. Result: replaced it with a Toshiba Tecra PIII-650 (with a broken screen, cheap on eBay), which draws 14 watts when idle.

    I also realized that my Powerbook power supply consumes less than 1 watt when plugged in but no laptop is connected, or about 2 watts when the laptop is plugged in and fully charged, so I'm not as concerned about unplugging it anymore.

    My next checks: the TV's, older transformer-based clock radios, wall warts and the deep freeze. I will also take running "baseline" checks of my major appliances (fridge, furnace, washer), so I can recheck them once a year and identify when an appliance is running too hard (bad motor bearing, etc.)