In order to hibernate or suspend successfully, the drivers for all of the devices attached to the system must be able to save and restore the device state. There's no simple way to predict if this will be the case, so it's best to try suspend and resume operations when you have nothing critical happening on the system. For hibernation, it's also necessary to have a swap partition instead of (or in addition to) swapspace on a logical volume.
To manually provoke a suspend or hibernate operation, right-click on the power-management icon in the status bar and use the menu options that appear. To resume from a suspend, use the wake-up key defined for your system (you may have to consult the system documentation or experiment to find this). To resume from hibernation, turn your system power on with the power button, then let it start a normal boot cycle. The kernel will recognize the hibernation state and attempt to resume; if this fails, a normal boot will take place (but you may lose changes to any files that were opened when you hibernated your computer, so it's a good idea to save changes before you hibernate).
A password is required to unlock the screen after a resume if passwords are configured in the screensaver (which is the default).
Resuming from hibernation will fail if the kernel has been upgraded since the last boot.
3.1.1.2. Viewing power information
If your system has a battery, gnome-power-manager provides a number of interesting graphs showing your power state. To view them, right-click on the power management icon on the panel, then select Information. The window shown in Figure 3-3 will be presented.
Figure 3-3. Power Information window
The tabs across the top provide access to the available information and graphs:
Device Information
Displays the current battery state. Clicking on More presents the battery technology, serial number, and a capacity rating showing the percentage of the original design capacity that the battery is now capable of holding (the higher the number, the better the battery condition).
Charge History
This graph shows the battery charge (as a percentage of its current maximum) over time. The graphs are automatically scaled horizontally.
Power History
Displays the battery charge and discharge rates over time, as shown in Figure 3-4 . If the battery is fully charged and the system is on external power, the discharge rate will be shown as zero, but if the battery is charging, the system will show the rate at which it is charging. When running on battery power, this graph shows the rate of discharge. Power events are marked on this graph, including transitions to and from AC power, suspend and hibernate events, lid closures, and display idle periods. You can use the information in this graph to see the impact of your usage patterns on the system's power consumption.
Figure 3-4. Power History graph
Estimated Time History
Shows the history of the calculated time to charge the battery, when you're on AC power, or to discharge the battery, when you're running only on the battery. Power events are also shown on this log.
Event Log
Displays a more verbose listing of the same power events shown on the graphs.
On an AC-only system, the graphs will all be flat lines, but power events will still be displayed.
3.1.1.3. Changing the CPU speed
If CMOS semiconductors were perfect, they would consume power only when they changed state. They're not perfect, so they leak energy and consume power when idle, but that's a tiny fraction of the power they consume when changing state.
The system clock is a pulse generator that controls the speed at which the CPU changes state, and therefore controls the amount of energy used by the CPU and related system components. Therefore, there is a trade-off between performance and power consumption.
Fedora can balance power usage against performance automatically according to system workload. This feature is provided by the cpuspeed service and is enabled by default.
The default parameters used by this service work well in most cases, but can be adjusted by editing the file /etc/cpuspeed.conf , which looks like this:
VMAJOR=1
VMINOR=1
# uncomment this and set to the name of your CPUFreq module
#DRIVER="powernow-k7"
# Let background (nice) processes speed up the cpu
OPTS="$OPTS -n"
# Add your favorite options here
#OPTS="$OPTS -s 0 -i 10 -r"
# uncomment and modify this to check the state of the AC adapter
#OPTS="$OPTS -a /proc/acpi/ac_adapter/*/state"
# uncomment and modify this to check the system temperature
#OPTS="$OPTS -t /proc/acpi/thermal_zone/*/temperature 75"
Usually the DRIVER, VMAJOR, and VMINOR lines should not be changed.
Uncomment the OPTS lines that contain additional options you wish to use. The pre-configured lines have these meanings:
-n
Allow processes that have been marked as low priority using the nice command to run at full speed. The default is to slow down the processor when only low-priority processes are running.
-s 0 -i 10 -r
Manages only CPU 0 ( -s 0 ), making speed change decisions once a second instead of the default of once every two seconds ( -i 10 ), and restore the original speed when cpuspeed exits ( -r ).
-a /proc/acpi/ac_adapter/*/state
Monitors the AC adapter and switches to minimum speed when AC power is removed. Adding -C will force the system to operate at maximum speed when AC power is connected.
-t /proc/acpi/thermal_zone/*/temperature 75
Watches the system temperature and slows down the CPU when the temperature exceeds 75 degrees Celsius (167 degrees Fahrenheit).
To see a list of all available options, run this command:
$ /usr/sbin/cpuspeed --help 2>&1|less
After editing /etc/cpuspeed , restart the cpuspeed service:
# service cpuspeed restart
Stopping cpuspeed: [ OK ]
Starting cpuspeed: [ OK ]
You can monitor the CPU speed by installing a monitor on your panel. Right-click on your GNOME panel, then select "Add to Panel." Choose the CPU Frequency Scaling Monitor and click Add. The icon shown in Figure 3-5 will appear; the bar graph will rise and fall as the CPU clock speed is adjusted, and hovering your mouse cursor over the display will show the current frequency setting (the box that appears below the icon in Figure 3-5).
Figure 3-5. CPU Frequency Scaling Monitor