Patent ID: 8028177

Claim:
A method for changing power states of a computer, comprising: receiving a first power command to change a power state of the computer from a work state to a sleep state; sending a shutdown event to all running applications of the computer; storing a system memory image of the computer into a flash memory of the computer, and storing the system memory image into a hard disk of the computer; changing the state of the computer from the work state to the sleep state by executing a series of going-to-sleep instructions; receiving a second power command to change the power state of the computer from the sleep state to the work state; identifying hardware configuration of the computer and checking if the hardware configuration of the computer has been changed in the sleep state; and restoring the system memory image from the hard disk or directly loading an operating system image from the hard disk if the hardware configuration of the computer has been changed, comprising: instructing the computer to exit the sleep state; initializing the system memory and creating a system memory map; checking if the system memory image exists in the hard disk; and loading the system memory image from the hard disk according to the system memory map, in response to a determination that the system memory image exists in the hard disk and is intact; or loading the operating system image from the hard disk, in response to a determination that the system memory image does not exist in the hard disk or the system memory image is not intact.