I've been having a small case of my screen not turning on at times. It happens on a 1 out of 100 basis. Anyway, I can confirm that the phone did not shut down because I can take screenshots (via power button + volume down key) and hear the screenshot sound. However, the display remains turned off. What I found to be the fix is to remove the battery to force shutdown the phone and re-insert it and open again.
That would have been an OK solution but my phone has 2 layers of battery cover so it's kinda tedious to do when the random screen problem occurs (especially if I'm outside or on the road). What I want to happen is that if I hold down the power button for some time (5 seconds maybe?), it will power off the device thus, saving me the trouble of having to remove and re-insert the battery.
How do I make holding down the power button for some time turn off the phone?
Phone is Sony Xperia Active ST17i, running MiniCMSandwich Lite rom with RaGe kernel.