Hi. I'm developing an application to control the sleep of your machine
(like insomniax).
The problem is that I can't find a way to power off the screen by
coding. I've found this code
io_registry_entry_t r = IORegistryEntryFromPath(kIOMaster****tDefault,
"IOService:/IOResources/IODisplayWrangler");
if(!r) return;
int err = IORegistryEntrySetCFProperty(r, CFSTR("IORequestIdle"),
kCFBooleanTrue);
IOObjectRelease(r);
On my Macbook 10.5 and other 10.4 it works. But on a Powerbook it
causes a Kernel Panic.
Is there any other way to do it?
Thanks