Simulate "battery mode" for windows desktop even though it is not connected to battery

Is there a way to fool windows desktop to think that it is running off a battery (like in a laptop) ?

I need to do this to do some testing in battery mode, but I don't have a laptop on hand to do this.

I tried to find utilities on the net that could do this but I had no luck. What do you think guys?


Solution 1:

I actually discovered that I can use my UPS to do it. So my machine is connected to a "smart" UPS which has a communication port (not sure what the cord type is) which then you connect to your computer using USB. This then tells the computer to use the UPS as the power source instead of the power outlet, which is treated just like running from a battery on a laptop. You can also use this to determine how long the UPS will last for when you lose power so you have enough time to close down and save all your work before the UPS runs out of power as well.

Solution 2:

This is tricky to pull off. The on-battery/on-power flag is provided by ACPI in the BIOS, and the flags are handled in the kernel as part of the ACPI driver. Near as I can figure, lying to this driver layer is not exposed in any way. However, it does look like Microsoft has a discrete device for the battery and AC adapters themselves, so a special AC Adapter driver may allow you manually select your power state. I don't know of one, but it is a place to look. Alternately, a special 'power development' ACPI layer may be lurking somewhere.