= Mobile computers == Battery, buttons, thermal management Notebook users are usually interested in the state of their battery. Getting the power button and the lid's sensor of its closed state to emit events is also nice. Some notebooks only shut down their continously running fans and operate only if needed if the thermal module is loaded. Usually these modules are automatically loaded by `udev`. If it does not do so for you, then add the following lines to '/etc/sysconfig/modules' to get modules loaded at system startup: ------- battery ac button thermal ------- The next task is to enable the acpid service: ------------------- # service acpid add ------------------- Then the easiest way is to reboot, or if you don't want do do so: -------------------- # modprobe battery # modprobe ac # service hald stop # service dbus stop # service acpid start # service dbus start # service hald start -------------------- The only remaining task is to start a client: if you're on console, try the 'acpi' command, or the relevant applet of your favorite window manager. == Conserving power The major consumers of power in a notebook are the LCD (differences in size and brightness level can mean a lot), the CPU, hard drives, wireless transceivers like WiFi, Bluetooth, Infrared and the GPU if you have a powerful one. You can conserve a fair amount of power if you lessen the brightness level of the LCD screen. Some notebooks can remember two settings of this level, one when the equipment operates from battery and another when powered from AC. The CPUs have some sort of power saving capabilities, the most basic is "CPU throttling". Common on Intel mobile Celeron CPUs, only ACPI is needed. Klaptop has a setting for it, where you can specify the level. //FIXME governors, Intel Centrino/Core, AMD Letting the HDD spin down gives little extra battery operating time, but frequent spinups (data access) and spindowns wears the disk. This is only useful in situations where there is no frequent need for data on HDD like holding a presentation. == Hibernation Hibernating your computer can cause data loss or severe filesystem damage if things go wrong. It's highly advised that first, you should consider if hibernating is worth the effort at all. Try it on a fresh installation first, instead of a production system. From kernel/suspend.c: --------------------------------------------------------------------------- * BIG FAT WARNING ********************************************************* * * If you have unsupported (*) devices using DMA... * ...say goodbye to your data. * * If you touch anything on disk between suspend and resume... * ...kiss your data goodbye. * * If your disk driver does not support suspend... (IDE does) * ...you'd better find out how to get along * without your data. * * If you change kernel command line between suspend and resume... * ...prepare for nasty fsck or worse. * * If you change your hardware while system is suspended... * ...well, it was not good idea. * * (*) suspend/resume support is needed to make it safe. --------------------------------------------------------------------------- You have been warned. If you are still not discouraged, read on! First, you need to create a swap partition (if you don't have any yet). You have to add an extra resume=/dev/swappart kernel parameter to '/boot/grub/menu.lst'. For example, on my machine the old line was: `kernel (hd0,2)/boot/vmlinuz ro root=/dev/hda3 quiet` The new line: `kernel (hd0,2)/boot/vmlinuz ro root=/dev/hda3 quiet resume=/dev/hda2` After the above are done, you must reboot. The hibernation can be started with: `echo shutdown > /sys/power/disk; echo disk > /sys/power/state` and next time you boot your kernel it should resume. For more info, look at '/usr/src/linux/Documentation/power/swsusp.txt'. It requires the kernel documentation, which can be installed issuing the `pacman-g2 -S kernel-docs` command as root.