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.

2 comments:

Julian AR said...

Excellent article. Have you manage to modify the ACPI ASL? if not, have you found any workarround?

Regards,
Julián

Xca][ibur said...

No this is the one outstanding issue that still bugs me. I decided to wait until after Windows 7 was officially released and see if Apple did the work for me. However i highly doubt this will happen. Ultimately i have not found it reduces my experience dramatically - i am getting 4+ hours even with reasonably heavy usage which allows me to get by each day just fine. Keep posted though, i will hopefully be addressing this issue further in the future as i have some leads that i gained from some Linux dev work that im following.