https://wiki.archlinux.org/api.php?action=feedcontributions&user=AI221&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:33:28ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Laptop&diff=410365Laptop2015-11-27T22:41:29Z<p>AI221: added additional info the screen brightness section</p>
<hr />
<div>[[Category:Laptops]]<br />
[[cs:Laptop]]<br />
[[es:Laptop]]<br />
[[it:Laptop]]<br />
[[ja:ノートパソコン]]<br />
[[ru:Laptop]]<br />
[[zh-CN:Laptop]]<br />
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.<br />
<br />
== Power management ==<br />
<br />
{{Note|You should read the main article [[Power management]]. Additional laptop-specific features are described below.}}<br />
<br />
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.<br />
<br />
=== Battery state ===<br />
<br />
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.<br />
<br />
==== ACPI ====<br />
<br />
Battery state can be read using ACPI utilities from the terminal. ACPI command line utilities are provided via the {{Pkg|acpi}} package. See [[ACPI modules]] for more information.<br />
<br />
* {{Pkg|cbatticon}} is a lightweight and fast battery icon that sits in the system tray.<br />
* {{AUR|batterymon-clone}} is a simple battery monitor that sits in the system tray, similar to batti.<br />
<br />
==== hibernate on low battery level ====<br />
<br />
If your battery sends events to [[udev]] whenever it (dis)charges by 1%, you can use this udev rule to automatically hibernate the system when battery level is critical, and thus prevent all unsaved work from being lost.<br />
<br />
{{hc|/etc/udev/rules.d/99-lowbat.rules|<nowiki><br />
# Suspend the system when battery level drops to 5% or lower<br />
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl hibernate"<br />
</nowiki>}}<br />
Batteries can jump to a lower value instead of discharging continuously, therefore a udev string matching pattern for all capacities 0 through 5 is used.<br />
<br />
Other rules can be added to perform different actions depending on power supply status and/or capacity.<br />
<br />
===== Testing events =====<br />
<br />
One way to test udev rules is to have them create a file when they are run. For example:<br />
<br />
{{hc|/etc/udev/rules.d/98-discharging.rules|<nowiki><br />
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", RUN+="/usr/bin/touch /home/example/discharging"<br />
</nowiki>}}<br />
<br />
This creates a file at {{ic|/home/example/discharging}} when the laptop charger is unplugged. You can test whether the rule worked by unplugging your laptop and looking for this file. For more advanced udev rule testing, see [[Udev#Testing rules before loading]].<br />
<br />
=== Suspend and Hibernate ===<br />
<br />
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.<br />
<br />
See the main article [[Suspend and hibernate]].<br />
<br />
=== Hard drive spin down problem ===<br />
<br />
Documented [https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695 here].<br />
<br />
To prevent your laptop hard drive from spinning down too often, set less aggressive power management as described in [[hdparm#Power management configuration]]. Even the default values may be too aggressive.<br />
<br />
== Hardware support ==<br />
<br />
=== Screen brightness ===<br />
<br />
{{Note|You should read the main article [[Backlight]]}}<br />
<br />
Since laptops usually use software to adjust their brightness, they will be 100% by default. One method of adjusting this is the {{Pkg|xorg-xbacklight}} package. Once installed, you can run:<br />
<br />
$ xbacklight -set 50 # sets brightness to 50% of maximum<br />
<br />
to set the brightness to 50, or<br />
<br />
$ xbacklight -inc 10 # increase brightness by 10%<br />
$ xbacklight -dec 10 # decrease brightness by 10%<br />
<br />
to increase or decrease the backlighting by 10%,<br />
<br />
Additional backlight control methods can be found on the main article [[Backlight]]<br />
<br />
<br />
=== Touchpad ===<br />
<br />
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.<br />
<br />
=== Fingerprint Reader ===<br />
<br />
See [[Fingerprint-gui]], [[fprint]] and [[ThinkFinger]] (for ThinkPads).<br />
<br />
=== Webcam ===<br />
<br />
See [[Webcam setup]].<br />
<br />
=== Hard disk shock protection ===<br />
<br />
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.<br />
<br />
Currently, two projects, named [[HDAPS]] and [[Hpfall]] (available in the [[AUR]]), support this kind of protection. HDAPS is for IBM/Lenovo Thinkpads and hpfall for HP/Compaq laptops.<br />
<br />
=== Hybrid graphics ===<br />
<br />
The laptop manufacturers developed new technologies involving two graphic cards in an single computer, enabling both high performance and power saving usages. These laptops usually use an Intel chip for display by default, so an [[Intel graphics]] driver is needed first. Then you can [[Hybrid graphics|choose methods]] to utilize the second graphics chip.<br />
<br />
== Network time syncing ==<br />
<br />
For a laptop, it may be a good idea to use [[Chrony]] as an alternative to [[NTPd]] or [[OpenNTPD]] 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.<br />
<br />
== Laptop sleep error ==<br />
; Error description<br />
The laptop screen will go to sleep about 10 seconds after displaying the TTY/Login Screen.<br />
[[Edit]]<br />
{{hc|/etc/systemd/logind.conf|<nowiki><br />
HandleSuspendKey=ignore<br />
HandleLidSwitch=ignore<br />
</nowiki>}}<br />
N.B. Make sure jou remove the # at the beginning of those two lines. There may/will also be other enteries, just change those two.<br />
<br />
== See also ==<br />
<br />
; General<br />
* [[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.<br />
* [[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).<br />
* [[Wireless network configuration]] provides information about setting up wireless connection.<br />
* [[Extra keyboard keys]] describes configuration of Media keys.<br />
* [[acpid]] which is a flexible and extensible daemon for delivering ACPI events.<br />
<br />
; Pages specific to certain laptop types<br />
* See [[:Category:Laptops]] and its subcategories for pages dedicated to specific models/vendors.<br />
* Battery tweaks for ThinkPads can be found in [[TLP]] and the [[tp_smapi]] article.<br />
* [[Acer Aspire One#acerhdf|acerhdf]] is a kernel module for controlling fan speed on Acer Aspire One and some Packard Bell Notebooks.<br />
<br />
; External resources<br />
* [http://www.linux-on-laptops.com/ http://www.linux-on-laptops.com/]<br />
* [http://www.linlap.com/ http://www.linlap.com/]</div>AI221