In this recipe, we will use simple bash commands to access sleep modes supported by a Linux system running in QEMU (short for quick emulator).
- Run the Raspberry Pi QEMU as described in Chapter 3, Working with Different Architectures.
- Log in as user pi, using the password raspberry.
- Run sudo to gain root access:
$ sudo bash
#
- To get the list of supported sleep modes, run the following command:
# cat /sys/power/state
- Now switch to one of the supported modes:
# echo freeze > /sys/power/state
- The system goes to sleep, but we have not instructed it as to how to wake up. Close the QEMU window now.