7.3. ACPI

With the default options in the gentoo-sources kernel, ACPI is working quite well out of the box. These are the options that matter:

Power Management and ACPI options  --->
[*] Power Management support
[*]   Power Management Debug support
[ ]     Verbose Power Management debugging
[*] Suspend/resume event tracing
[*] Suspend to RAM and standby
[ ]   Test suspend/resume and wakealarm during bootup
[*] Hibernation (aka 'suspend to disk')
()    Default resume partition
[*] ACPI (Advanced Configuration and Power Interface) Support  --->
    [ ] Deprecated /proc/acpi files
    [ ] Deprecated power /proc/acpi directories
    [*] Future power /sys interface
    [ ] Deprecated /proc/acpi/event support
    <*> AC Adapter
    <*> Battery
    <*> Button
    <*> Fan
    -*- Dock
    <*> Processor
    <*>   Thermal zone
    (0) Disable ACPI for systems before Jan 1st this year
    [ ] Debug Statements
    < > PCI slot detection driver
    -*-   ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)
    < >   Smart Battery System
< > APM (Advanced Power Management) BIOS support  --->
    CPU Frequency scaling  ---> 
-*- CPU idle PM support

As you can see, I have turned off most of the deprecated /proc interfaces. It's a new system, and I can well afford to use userspace applications that support the new stuff.

7.3.1. Suspend

When you suspend the laptop, everything needed to wake up the machine is copied to RAM, power consuming devices like the hard disk, monitor, graphics chip are turned off, and finally the CPU is put into a very low power state. Resuming goes in the opposite order.

That said, it should be clear that you cannot remove the battery from your Dell Latitude E5400, while the machine is suspended.

In order to make suspend work, make sure that you have the use flags "acpi" (=turned on), "laptop" (=turned on) and "-apm" (=turned off) in your USE variable in /etc/make.conf. Check if you have to recompile anything after that with:

# emerge --update --deep --newuse --ask world

For debugging purposes it is handy to emerge pm-utils (should be done automatically if you have emerged hal with the "laptop" use flag. You may have to unmerge powermgmt-base for that first.

Now, as the superuser "root" try the command pm-suspend. The screen should become black, you here how everything is turned off, and then you only see the LED in the power switch quietly blinking. Press the power switch, and after a few seconds you should be back where you came from.

If you want to use suspend functionality integrated into your desktop, make sure that hal is running and has been compiled with the "acpi" use flag. Turn "apm" off!

7.3.2. Hibernation

I did not give hibernation a try yet. From what I read, it is not really in the state of being of great help. I rather wait for the TuxOnIce patch set to be properly integrated in the kernel.

7.3.3. CPU Scaling

CPU scaling or CPU throttling adapts the frequency of your CPU to the current computing requirements. That saves energy resp. battery power, and also improves the lifetime of the hardware because of the lower heat emission.

The Linux kernel supports multiple "governors" (strategies for scaling the CPU power). The "performance" governor always selects the maximum performance, "userspace" allows userspace programs to change the frequency, "powersave" minimizes the power consumption by selecting the minimum frequency, "ondemand" switches between the available frequencies depending on the current system load. The "conservative" governor does the same as the "ondemand" governor, but instead of jumping between frequencies, it gradually increases or decreases the frequency. The "conservative" governor is therefore the ideal governor for mobile hardware like the Dell Latitude.

Power management and ACPI options  --->
       CPU Frequency Scaling
       [*] CPU Frequency scaling
       [*]   Enable CPU Frequency scaling debugging
       < >   CPU frequency translation statistics
             Default CPUFreq governor (conservative)  --->
       <*>   'performance' governor
       <*>   'powersave' governor
       <*>   'userspace' governor for userspace frequency scaling
       <*>   'ondemand' cpufreq policy governor
       -*-   'conservative' cpufreq governor
              *** CPUFreq processor drivers ***
       <*>   ACPI Processor P-States driver

I have disabled all the rest on this page. After recompiling and rebooting (if necessary) you should have cpu frequency scaling up and running.

You can check whether things have worked out by monitoring the files /proc/cpuinfo or the files in /sys/devices/system/cpu/cpu0/cpufreq and /sys/devices/system/cpu/cpu1/cpufreq.

watch -n 1 -d cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

You may stumble upon pages telling you to install things like cpufreqd and do all kinds of configuration, boot scripts or the like in order to get throttling running. I didn't find anything of that necessary.

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones