• Aucun résultat trouvé

Configuring Power Management

As mentioned in the previous section, the “Screensaver Preferences” dialog also provides a “Power Management” button that starts the Power Management Preferences application. A more common (and more intuitive) way of configuring power management and related activities is by selecting the System ➪ Preferences ➪ Power Management menu item. Selecting either of these displays the dialog shown in Figure 5-23.

Figure 5-23

Configuring power management on your system

The “Power Management Preferences” dialog provides two or three tabs: the On AC Power tab, which enables you to configure how your system behaves after significant periods of inactiv-ity when it is running from AC power (i.e., when it is plugged in, which should be always for a desktop or server system but occasionally for a laptop or netbook); On Battery Power, which is displayed only on laptop systems and which enables you to configure how your system behaves after significant periods of inactivity when it is running from battery power; and the General tab, which enables you to configure how your system reacts when the Power or Suspend buttons are pressed, and whether a power management icon is displayed in the notification area at the upper right of the top GNOME panel.

The On AC Power tab displays when you first start the Power Management Preferences application:

Put computer to sleep when inactive for:

L

L A dropdown list that enables you to

con-figure your system to go to sleep if it has been inactive for a specified period. (For an explanation of what “putting your computer to sleep” means, see the discussion of Suspend mode later in this section.) The default setting for this option is “Never,” which means that your system will never go to sleep, regardless of how long it has been inac-tive. If you do not need to access your system remotely (via a network connection or modem), you should probably set this to a lower value by selecting an appropriate value from the list. If you need to access your system remotely and will be accessing it over a network, you can still safely set this to a lower value if your system has a BIOS con-figuration option that tells it to wake up if network activity to the machine is detected.

Otherwise, if you need to be able to access your system remotely, you should leave this setting at its default value so that it is always awake and available for access.

Spin down hard disks when possible:

L

L A checkbox that instructs the power management

system to spin down the disks whenever no activity has been detected for 60 seconds Put display to sleep when inactive for:

L

L A dropdown list that enables you to configure

your system to put your monitor into a low-power mode if it has been inactive for a specified period. To resume regular use (known as waking your monitor), you can sim-ply move your mouse or press any key on your keyboard. Putting your monitor to sleep is very different from simply blanking your monitor, as the default GNOME screensaver does. In the latter case, the monitor is simply blank, but is still using a normal amount of power. In sleep mode, the monitor is actually consuming less power. The default set-ting for this option is 30 minutes, but something like 10 minutes is probably a better selection in most cases.

The On Battery Power tab displays only if you are using a laptop, netbook, or other portable com-puter that can run on battery power. This tab offers similar settings to those on the On AC Power tab, adding options that are specific to battery-powered systems with integrated screens, such as the actions that your system should take when battery power is critically low. These options are the following:

Put computer to sleep when active for:

L

L A dropdown list that enables you to configure

your laptop or netbook to go to sleep if it has been inactive for a specified period. See

the explanation of this option on the AC Power tab, earlier in this section, for more information.

When battery power is critically low:

L

L A dropdown list that enables you to

config-ure how a laptop or netbook system reacts when battery power is almost exhausted.

Possible values are Hibernate (the default), Sleep, Shutdown, and Ask Me. The latter simply displays a warning on your screen and prompts you for the action to take, while Shutdown terminates all processes and turns off your system. See the discussion of Suspend and Hibernate later in this section for detailed information about the differ-ences between them.

Spin down hard disks when possible:

L

L A checkbox that instructs the power

manage-ment system to spin down the disks whenever no activity has been detected for 60 sec-onds. This can be extremely valuable on laptop systems.

Put display to sleep when inactive for:

L

L A dropdown list that enables you to configure

your system to put your monitor into a low-power mode if it has been inactive for a specified period. See the explanation of this option on the AC Power tab, earlier in this section, for more information. The default value for this option is 10 minutes when on battery power, as opposed to 30 minutes for desktop systems.

Reduce backlight brightness:

L

L A checkbox that enables you to configure the screen to

automatically reduce brightness after being inactive for 60 seconds

The most interesting settings on the General tab are in the Actions area, which defines how your system reacts when you press the Power or Suspend buttons on your system. (All systems have a Power button; not all systems have a Suspend button.) Your choices for the Power button are

“Ask me” (the default), which displays a dialog that prompts you to ask what you want to do,

“Hibernate,” and “Shutdown.” Your choices for the Suspend button are Hibernate and Suspend.

The differences between suspending, hibernating, and shutting down your computer are as follows:

Suspend

L

L (also known as sleep mode) is a reduced-power mode in which all active appli-cations, associated documents, and the current state of the kernel are saved to RAM, which enables the system to power down most of the devices on your system (such as the hard drive, display, network interfaces, etc.) while waiting for some activity. Your system’s processor and memory are still using power while your system is in sleep mode, but these use substantially less power than your system normally does. Be care-ful when using this mode for an extended period of time on laptop computers. If you are using suspend mode on a laptop without being connected to AC power, you will still lose any unsaved work when your battery is depleted.

Hibernate

L

L mode saves all active applications, associated documents, and the current state of your kernel to your hard drive and then actually shuts down the system. When you power the system back on, the system detects the saved state information on your hard drive and restores it to memory, enabling you to pick up exactly where you left off.

No power is consumed while the computer is hibernating because it is actually turned off, but restoring the system from the hard disk (known as resuming the system) requires

that a large file be read and restored to memory, which takes longer than waking up from suspend mode. By default, system images are saved to swap space, so the amount of swap space available on your system should be equivalent to the amount of memory on your system. See the /etc/acpi/hibernate.sh script for detailed information about what happens when your system hibernates.

Shutdown

L

L terminates all active applications, unmounts all filesystems, and turns your system off. Restarting your system takes longer than waking from suspend mode or resuming from hibernation mode because your system must go through the entire startup process, check your filesystems for consistency, and so on.

You can use the Notification Area preferences in the Power Management Preferences applica-tion to configure whether a power management icon is always shown in the Notificaapplica-tion Area or whether it is never displayed. Normally, the power management icon is displayed only when your system is running on battery power.

After changing any of these values, click Close to save the new settings and close the Power Management Preferences application.

Tip

always save any modified files if you know that you are going to be away from your computer for an extended period of time. While the suspend and hibernate modes usually work correctly, you shouldn’t take the chance that they do not restore in-progress documents correctly. Your boss, publisher, or thesis advisor probably will not accept “suspend mode ate my homework” as a valid excuse for being late or losing critical data. as a pub-lic service, I have personally tested this excuse for you, and it does not work. n