Linux Power Management
External
- http://www.thinkwiki.org/wiki/Thinkpad-acpi
- https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt
- http://www.thinkwiki.org/wiki/How_to_make_ACPI_work
- http://www.brighthub.com/computing/linux/articles/13876.aspx
- http://acpi.sourceforge.net/
- http://ibm-acpi.sourceforge.net/
Internal
Overview
Power management is especially important on laptops - we don't want the system to go to sleep because we close the lid. APM (advanced power management), ACPI (advanced configuration and power interface). ThinkPad ACPI is a linux driver for the Lenovo ThinkPad laptops that supports various features of these laptops which are accessible through the ACPI and ACPI EC framework, but not otherwise fully supported by the generic Linux ACPI drivers. Full ThinkPad ACPI documentation https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt.
Installation
Kernel 2.6.32 comes with the driver already installed. To find if ACPI is installed:
dmesg | grep acpi
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] disabled)
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x03] disabled)
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
acpiphp_glue: Slot 1 already registered by another hotplug driver
acpiphp: Slot [1] registered
ACPI: acpi_idle registered with cpuidle
acpi device:01: registered as cooling_device2
acpi device:07: registered as cooling_device3
thinkpad_acpi: ThinkPad ACPI Extras v0.23
thinkpad_acpi: http://ibm-acpi.sf.net/
thinkpad_acpi: ThinkPad BIOS 6FET49WW (1.19 ), EC 7VHT12WW-1.01
thinkpad_acpi: Lenovo ThinkPad T500, model 2081CTO
thinkpad_acpi: radio switch found; radios are enabled
thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
Registered led device: tpacpi::thinklight
Registered led device: tpacpi::power
Registered led device: tpacpi::standby
Registered led device: tpacpi::thinkvantage
thinkpad_acpi: Standard ACPI backlight interface available, not loading native one.
input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input17
Subjects
- systemd-logind (includes configuration to prevent the computer to go to sleep when the lid is closed).
Configuration
Command Line
The driver exports two different interfaces to userspace: legacy procfs-based and new sysfs-based interface (not complete yet).
For more details, see https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt
procfs
/proc/acpi
sysfs
/sys/devices/platform/thinkpad_acpi /sys/devices/platform/thinkpad_hwmon
Generic power management configuration
The power management configuration files (pm) live under
/etc/pm/
GUI
System -> Preferences -> Power Management -> When Laptop Lid is Closed -> Do Nothing.
Turn off Bluetooth
cat /proc/acpi/ibm/bluetooth
To disable:
echo disable > /proc/acpi/ibm/bluetooth
The setting does not survive a reboot, so if I want it there permanently, I need to implement an inet.d script.
Make sure Laptop Does Not Go Down Because of Power Management
TODO
Make Sure Laptop Does Not Go to Sleep when Lid is Closed
Fan Control
TODO