Difference between revisions of "Laptop"

From ArchWiki
Jump to: navigation, search
m (moved links into #See also section)
m (See also: link to Category:Laptops instead of just Acer Aspire One, better description of acerhdf)
(12 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
[[ru:Laptop]]
 
[[ru:Laptop]]
 
[[zh-CN:Laptop]]
 
[[zh-CN:Laptop]]
== Setting up for laptops ==
+
This page should contain links to pages needed for configuring a laptop for the best experience. Setting up a laptop is in many ways the same as setting up a desktop. However, there are a few key differences. Arch Linux provides all the tools and programs necessary to take complete control of your laptop. These programs and utilities are highlighted below, with appropriate tips tutorials.
  
This page should contain links to pages needed for configuring a laptop for the best experience. Setting up a laptop is in many ways the same as setting up a desktop. However, there are a few key differences. When setting up a laptop with Arch Linux, the following points should be taken into consideration:
+
== Power management ==
  
* [[#Power management]] Power Management for laptops refers to optimizing the system to last as long as possible on a single battery charge. This can be accomplished by a variety of tweaks.
+
{{Note|You should read the main articles [[Power Management]] and [[Power saving]]. Additional laptop-specific features are described below.}}
** [[#Suspend and Hibernate]] : the operating system can be manually suspended either to memory or to disk, allowing for an (almost) complete shutdown of other hardware.
+
** Hard drive spindown : the system can be configured to automatically turn off the hard disk after a specified interval of inactivity.
+
** Screen shut off : the laptop screen can be configured to automatically turn off after a specified interval of inactivity (not just blanked with a screensaver but completely shut off).
+
** CPU frequency scaling : the processor(s) can be configured to automatically step down to a lower frequency at lower loads.
+
 
+
* [[#Screen brightness]]. How do I manage screen brightness?
+
* Network and wireless setup is described in [[Wireless Setup]].
+
* Media buttons can be configured as described in [[Extra Keyboard Keys]].
+
* [[#Touchpad]] sensitivity, acceleration, button function and scroll borders can be configured for some (Synaptics or Alps) touchpads.
+
* [[#Hard disk shock protection]]
+
 
+
All of these points are important to take into consideration when getting a laptop set up the way you like. Fortunately, Arch Linux provides all the tools and programs necessary to take complete control of your laptop. These programs and utilities are highlighted below, with appropriate tips tutorials.
+
 
+
== Power management ==
+
  
 
Power management is very important for anyone who wishes to make good use of their battery capacity. The following tools and programs help to increase battery life and keep your laptop cool and quiet.
 
Power management is very important for anyone who wishes to make good use of their battery capacity. The following tools and programs help to increase battery life and keep your laptop cool and quiet.
Line 55: Line 41:
 
Manually suspending the operating system, either to memory (standby) or to disk (hibernate) sometimes provides the most efficient way to optimize battery life, depending on the usage pattern of the laptop.
 
Manually suspending the operating system, either to memory (standby) or to disk (hibernate) sometimes provides the most efficient way to optimize battery life, depending on the usage pattern of the laptop.
  
See [[Suspend to RAM]] for more information.
+
See the main article [[Suspend and Hibernate]].
 
+
=== Power saving ===
+
 
+
{{Merge|Power saving|describes the same topic more generally}}
+
See the main article, [[power saving]].
+
 
+
==== Wireless ====
+
 
+
{{Deletion|I think this script is quite useless, enabling power-save mode on the interface should be enough. This is described in [[Power saving#Network interfaces]], so I think this section can be deleted.}}
+
 
+
When working on your notebook/laptop without wireless access, here is a little script for your system startup that turns off your WLAN-Hardware to keep it from wasting power searching for an Access Point:
+
{{Note|Edit if {{ic|wlp2s0}} is not your WLAN-device.}}
+
 
+
{{bc|<nowiki>#!/bin/bash
+
+
essid="$(iwconfig wlp2s0 | grep ESSID | awk {'print $4'})"
+
if [ "$essid" == "ESSID:off/any" ] ; then
+
sudo iwconfig wlp2s0 txpower off
+
fi</nowiki>
+
}}
+
Start the script according to your DE/WM options by {{ic|sleep xx && /path/to/script}} depending on how long it usually takes to connect to your Access Point, 60 seconds are a good default value. It checks if you're connected, turning off the device if not. {{ic|# iwconfig wlp2s0 txpower on}} brings it back up, as well as a reboot.
+
 
+
{{Tip|It may also be prudent to prevent your wireless interface from starting at boot if it is not used often.}}
+
 
+
==== Disk-related tweaks ====
+
 
+
You might want to use the {{ic|noatime}} option, see [[Fstab#atime options]] for more information.
+
 
+
To allow the CD/DVD rom to spin down after a while using [[udisks]]:
+
 
+
# udisks --inhibit-polling /dev/sr0
+
  
 
==== Hard drive spin down problem ====
 
==== Hard drive spin down problem ====
Line 111: Line 66:
 
There are several laptops from different vendors featuring shock protection capabilities. As manufacturers have refused to support open source development of the required software components so far, Linux support for shock protection varies considerably between different hardware implementations.
 
There are several laptops from different vendors featuring shock protection capabilities. As manufacturers have refused to support open source development of the required software components so far, Linux support for shock protection varies considerably between different hardware implementations.
  
Currently, two projects, named HDAPS and hpfall, support this kind of protection.
+
Currently, two projects, named [[Hard Drive Active Protection System|HDAPS]] and {{AUR|hpfall}} (available in the [[AUR]]), support this kind of protection. HDAPS is for IBM/Lenovo Thinkpads and hpfall for HP/Compaq laptops.
HDAPS is for IBM/Lenovo Thinkpads and hpfall for HP/Compaq laptops
+
 
+
Just Check [[HDAPS|Hard Disk Active Protection System]].
+
{{AUR|hpfall}} can be installed from the [[AUR]].
+
  
 
== Network time syncing ==
 
== Network time syncing ==
Line 123: Line 74:
 
== See also ==
 
== See also ==
  
* [http://www.linux-on-laptops.com/ http://www.linux-on-laptops.com/]
+
; General
* [http://www.linlap.com/ http://www.linlap.com/]
+
 
* [[CPU Frequency Scaling]] is a technology used primarily by notebooks which enables the OS to scale the CPU frequency up or down, depending on the current system load and/or power scheme.
 
* [[CPU Frequency Scaling]] is a technology used primarily by notebooks which enables the OS to scale the CPU frequency up or down, depending on the current system load and/or power scheme.
* [[Powertop]] is a handy utility from Intel that displays which hardware/processes are using the most power on your system, and provides instructions on how to stop or remove power-wasting services. Works great for mobile Intel CPUs; provides the current CPU state and suggestions for power saving. Also works on AMD systems, but does not provide as much information about the CPU state.
+
* [[Display Power Management Signaling]] describes how to automatically turn off the laptop screen after a specified interval of inactivity (not just blanked with a screensaver but completely shut off).
 
+
* [[Wireless Setup]] provides information about setting up wireless connection.
The following options are specific to certain laptop types:
+
* [[Extra Keyboard Keys]] describes configuration of Media keys.
  
 +
; Pages specific to certain laptop types
 +
* See [[:Category:Laptops]] and its subcategories for pages dedicated to specific models/vendors.
 
* [[Asus_G1#The_Lapsus_daemon_.26_KDE_applet|Lapsus]] is a set of programs providing easy access to many features of various laptops. It currently supports most features provided by asus-laptop kernel module from ACPI4Asus project, such as additional LEDs, hotkeys, backlight control etc. It also has support for some IBM laptops features provided by IBM ThinkPad ACPI Extras Driver and NVRAM device.
 
* [[Asus_G1#The_Lapsus_daemon_.26_KDE_applet|Lapsus]] is a set of programs providing easy access to many features of various laptops. It currently supports most features provided by asus-laptop kernel module from ACPI4Asus project, such as additional LEDs, hotkeys, backlight control etc. It also has support for some IBM laptops features provided by IBM ThinkPad ACPI Extras Driver and NVRAM device.
 
* Battery tweaks for ThinkPads can be found in [[TLP]] and the [[tp_smapi]] article.
 
* Battery tweaks for ThinkPads can be found in [[TLP]] and the [[tp_smapi]] article.
 +
* [[Acer Aspire One#acerhdf|acerhdf]] is a kernel module for controlling fan speed on Acer Aspire One and some Packard Bell Notebooks.
 +
 +
; External resources
 +
* [http://www.linux-on-laptops.com/ http://www.linux-on-laptops.com/]
 +
* [http://www.linlap.com/ http://www.linlap.com/]

Revision as of 11:29, 14 August 2013

This page should contain links to pages needed for configuring a laptop for the best experience. Setting up a laptop is in many ways the same as setting up a desktop. However, there are a few key differences. Arch Linux provides all the tools and programs necessary to take complete control of your laptop. These programs and utilities are highlighted below, with appropriate tips tutorials.

Power management

Note: You should read the main articles Power Management and Power saving. Additional laptop-specific features are described below.

Power management is very important for anyone who wishes to make good use of their battery capacity. The following tools and programs help to increase battery life and keep your laptop cool and quiet.

Battery state

Reading battery state can be done in multiple ways. Classical method is some daemon periodically polling battery level using ACPI interface. On some systems, battery sends events to udev whenever it (dis)charges by 1%, this event can be connected to some action using udev rule.

ACPI

Battery state can be read using ACPI utilities from the terminal. ACPI command line utilities are provided via the acpi package. See ACPI modules for more information.

  • batterymon-cloneAUR is a simple battery monitor that sits in the system tray.
  • batti is a simple battery monitor for the system tray, similar to batterymon-clone. Unlike the latter batti uses UPower, and if that is missing DeviceKit.Power, for it's power information.

Udev events

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Describe way to check if the events are sent. (Discuss in Talk:Laptop#)

If your battery sends events to udev whenever it (dis)charges by 1%, you can use this udev rule to automatically suspend the system when battery level is critical, and thus prevent all unsaved work from being lost.

/etc/udev/rules.d/lowbat.rules
# Suspend the system when battery level drops to 2%
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="2", RUN+="/usr/bin/systemctl suspend"

Likewise, the rule can be customized to perform other action on different status.

Suspend and Hibernate

Manually suspending the operating system, either to memory (standby) or to disk (hibernate) sometimes provides the most efficient way to optimize battery life, depending on the usage pattern of the laptop.

See the main article Suspend and Hibernate.

Hard drive spin down problem

Documented here

To prevent your laptop hard drive from spinning down too often:

/etc/udev/rules.d/75-hdparm.rules
ACTION=="add", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", RUN+="/usr/bin/hdparm -B 254 /dev/$kernel"

See hdparm(8) for documentation of hdparm parameters. If you use pm-utils, you might be interested in these examples.

Screen brightness

See Backlight.

Touchpad

To get your touchpad working properly, see the Touchpad Synaptics page. Note that your laptop may have an ALPS touchpad (such as the DELL Inspiron 6000), and not a Synaptics touchpad. In either case, see the link above.

Hard disk shock protection

There are several laptops from different vendors featuring shock protection capabilities. As manufacturers have refused to support open source development of the required software components so far, Linux support for shock protection varies considerably between different hardware implementations.

Currently, two projects, named HDAPS and hpfallAUR (available in the AUR), support this kind of protection. HDAPS is for IBM/Lenovo Thinkpads and hpfall for HP/Compaq laptops.

Network time syncing

For a laptop, it may be a good idea to use Chrony as an alternative to NTPd to sync your clock over the network. Chrony is designed to work well even on systems with no permanent network connection (such as laptops), and is capable of much faster time synchronisation than standard ntp. Chrony has several advantages when used in systems running on virtual machines, such as a larger range for frequency correction to help correct quickly drifting clocks, and better response to rapid changes in the clock frequency. It also has a smaller memory footprint and no unnecessary process wakeups, improving power efficiency.

See also

General
  • CPU Frequency Scaling is a technology used primarily by notebooks which enables the OS to scale the CPU frequency up or down, depending on the current system load and/or power scheme.
  • Display Power Management Signaling describes how to automatically turn off the laptop screen after a specified interval of inactivity (not just blanked with a screensaver but completely shut off).
  • Wireless Setup provides information about setting up wireless connection.
  • Extra Keyboard Keys describes configuration of Media keys.
Pages specific to certain laptop types
  • See Category:Laptops and its subcategories for pages dedicated to specific models/vendors.
  • Lapsus is a set of programs providing easy access to many features of various laptops. It currently supports most features provided by asus-laptop kernel module from ACPI4Asus project, such as additional LEDs, hotkeys, backlight control etc. It also has support for some IBM laptops features provided by IBM ThinkPad ACPI Extras Driver and NVRAM device.
  • Battery tweaks for ThinkPads can be found in TLP and the tp_smapi article.
  • acerhdf is a kernel module for controlling fan speed on Acer Aspire One and some Packard Bell Notebooks.
External resources