Showing posts with label acpi. Show all posts
Showing posts with label acpi. Show all posts

Saturday, September 5, 2009

Wake On LAN (WoL) – Saving the World 1kW At A Time

When i was running Windows Vista i never even considered setting my computer to go to sleep for a number of reasons:

  • Vista’s recovery time was too long
  • I use my computer as a server for a number of services, which i frequently use remotely
  • My son likes to use the PC as a media box

Now that i have Windows 7 installed, i have taken to using the sleep feature since it wakes up in a matter of seconds.  By default Windows 7 uses the Balanced power profile which puts the computer to sleep after 30 minutes when running on power.  This caused me to think about how much power my computer had been using over the past few years.  In Perth, the cost of power is currently 12.67c/unit so we can use the following formula to calculate the amount of power a device is using:

Cost ($) per day = (wattage) / 1000 x ($$/kWh) x (hours used per day)

The power supply in my computer is 500W.  Until i get a cheap energy power meter that can accurately measure the utilisation accuracy, lets assume an average 300W usage (based on the components in my computer).  Plugging this into the above equation means that my computer is costing $1.06 a day to run!!  I really should have done this calculation a few years ago.  Its pretty easy to see that any down time on the computer is going to save some serious $$ over the year.  This is why I’ve started to use WoL as described in my previous post.

I recommend following this guide on Lifehacker to setup WoL on your network. I’ll be writing in the near future on some issues i found with using WoL, in particular the miriad of utilities out there that don’t work, why they don’t work and present a little utility i wrote for my own use while on the train the other day.

This means that for the majority of the day the PC is not running and consuming power, but is available whenever i need to use it.  Since the price of power is only going to rise in the near future, this is going to save me more and more money.  As humans with a growing energy problem, we should all be looking at solutions like this to save power when its not required.  Gone are the days when we can just be lazy and not think about it.

Tuesday, September 1, 2009

Macbook Pro Unibody 2009 LCD Display

This is the next piece of my MBP Unibody to receive my attention.  I am dismayed at the support for the LCD under Windows.  No driver is provided for the monitor so it using the Generic PnP Display driver.  As i have previously posted, it seems the ACPI support is almost missing.  Because of this, Windows is unable to adjust the brightness of the screen as is apparent from its absence in the Mobility Centre:

image

This also means that some of the cool new power management features of Windows 7 like the idle screen dimming feature are unavailable.  I really like this feature in OSX and would love to see it working under Windows.  I decided tonight to investigate this further and the first step was to find out some useful information about the panel.  Running the following command in an OSX terminal window gives you the model of your display:

ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings –6

Finding the model information under Windows is even easier:

  1. Open device manager
  2. Expand the Monitors node and double-click the display to bring up its properties dialog
  3. Change to the Details tab and select Hardware Ids from the drop down list

The model can be seen in the last 4 digits of the hardware ID.  For example mine is MONITOR\APP9CA4 which means i have the 9CA4 screen.  A quick Google search reveals that this means i have the Samsung LTN154BT08 LCD panel.  You can also use the trial version of the excellent Everest application to get even more detailed information:

image

Now that i know the panel specifications i can continue my hunt for a driver that will hopefully provide better control of the screen.  In the meantime, i highly recommend running the Calibrate display colour wizard included with Windows 7 as a minimum.  When i ran the wizard, i found the gamma to be WAY too high, which was leading to a washed out image.  I ended up following the fantastic guide and lowering the as low as it would let me.  Admittedly, up to that point i had not noticed the high gamma since the screen is so damned nice, but after making the adjustment, i can honestly say the colours are much richer.  It seems a lot of other people have come to the same conclusion even compared to the standard OSX colour profile.

Oh by the way, if you are thinking of purchasing the matte display option, read this article first.  While it does reduce glare to a certain extent, you do sacrifice quite a lot of colour richness.  I personally dont find the glare distracting at all, but i guess its personal opinion.

Tuesday, August 18, 2009

Windows 7 on Macbook Pro Unibody - ACPI Support is Screwed

So Windows 7 has some great new power management features, like idle timeout screen dimming and such - see here for excellent information outlining the available power management features and how they can be used.

Unfortunately it seems again the Apple have not provided drivers to fully support the ACPI specification that allows a lot of these features to work. I suspect this is a large part of why i only get 4 hours of battery life under Windows 7 when i get around 7-8 under OSX.

You can start to get a picture of what is not supported by running the new powercfg command-line utility with the argument -energy. This runs a 60 second test to profile how the system is using power. Doing this on my MBPU 15" showed the following issues:
  • USB Suspend:USB Device not Entering Suspend - None of my USB devices are supporting being suspended, which means they are unnecessarily always on. This is probably not a huge concern but sucks considering my power profile says to suspend all USB devices when not in use
  • CPU Utilization:Processor utilization is high - When you run this test you are supposed to shut down all applications, etc to get a realistic perspective of your idle computer power usage. My results showed my idle CPU usage was fairly high (4.92%!) which will consume power. Guess what the culprit was? - yep KbdMgr.exe, the Apple BootCamp application that allows keyboard shortcuts, etc to work - this is constantly using 2% CPU! An indication that this app should be seriously profiled and optimised
  • Platform Power Management Capabilities:Adaptive Display Brightness Support - This is by far the biggest concern for me, as it means that the display cannot be automatically dimmed and controlled depending on the power profile is set. I suspect this is due to ACPI not being properly supported by the provided drivers

To confirm the suspicions with ACPI support, i turned to the excellent Notebook Hardware Control utility. This tool allows a driver to be written in C# (my language of choice!) for a specific hardware configuration (notebook). After mucking around for many, many hours i managed to work out how to dump my ACPI SDST file from the registry and decompile it into ACPI ASL (ill describe this process in another post), which is a descriptive language that shows what ACPI features are supported on my notebook. Ive yet to master what this file is exactly trying to tell me, but initial findings to seem to indicate that the required screen brightness entries (as defined in the official ACPI specification) are not available, which is why Windows is unable to control the screen brightness.

Now if i understand what i am reading correctly, i can actualy modify the ASL, recompile it and enable these features. I know they are available hardware-wise because OSX is able to dim the screen after 30 seconds. I also know Windows 7 supports this out of the box, so the only remaining step is the SDST definition being correct!

I originally thought that i would not bother with this since surely Apple will fix it when Windows 7 is released right? Hmm after seeing the amount of time it is taking them to fix their touchpad, sound, video, bluetooth, etc drivers im not so sure.