Laptop

Running Gentoo on a laptop is the same as any other Linux distribution.

This is not a complete Gentoo installation guide. It will only focus on laptop-specific issues, and even then not on specific models. First read the handbook, then refer to this guide for specific laptop information. The Gentoo Linux Wiki also offers specific model guides that augment this guide. Power Management is addressed in it's own guide.

The instructions here are very minimal. Extended guides can be found in the hardware index.

Backup restore partition
Some laptops come with a hidden partition to reset the laptop to factory settings (reinstall Windows to the state the laptop was bought with). If you want to remove that partition, it is recommended you back it up. In some cases the drivers or utilities for the laptop are hard to find and are only available on the restore partition or by requesting a CD from the manufacturer.

Example backup method
Once you've booted a Linux, you can backup the Recovery Partition (about 5 GB) and burn it into a regular DVD-R or 6 CD-Rs.

To save the original partition layout, do:

Move the PARTLAYOUT file to another local PC on the network (using scp). Next, on that other PC, run

On the ThinkPad, run

The dd process might not quit when finished, you can cancel it after it tells you how many blocks were copied with CTRL+C.

Next, compare checksums on both the ThinkPad and the other Host:


 * Other Host


 * ThinkPad

The recovery image is too big to be burnt onto a DVD, so we need to gzip it:

Unfortunately, that file was about 4.1 GB for me and it is too big for a DVD filesystem to handle, so I split it up to be CD sizes:

Notice: You can burn in UDF filesystem on DVD. It supports files bigger than 2GB. Remember to add UDF support to your kernel.

Burn the *_part* and the PARTLAYOUT files onto a DVD or CDs.

To revert the recovery partition, do the following:


 * Restore partitioning layout using "cat PARTLAYOUT | sfdisk /dev/sda"
 * Put all _part files back into one directory
 * Run "cat *_part* > recovery.img.gz"
 * gunzip
 * revert the netcat calls, on the ThinkPad do "netcat -q 5 -l -p 1042 | dd of=dev/sda1"

Booting restore partition
Access to the rescue partition during BIOS POST may be destroyed due to renumbering partitions with fdisk (f option in extra menu). It can still be booted via the bootloader. example grub configuration (change (hd0,3) to the appropriate partition):

/boot/grub/grub.conf

More info in this post.

Common laptop hardware
This section will cover hardware common to most, if not all laptops. There may be variations of the same hardware in different models. Additional info is in the model specific guides.

Touchpad
Most touchpads support the Synaptics standard. The following is the minimum required to get it working. For more details read the Synaptics Touchpad Guide.

Touchpad Configuration
Add "synaptics" to the INPUT_DEVICES variable in /etc/make.conf. Example:

If you already installed Xorg then only emerge the synaptics driver:

If you didn't install Xorg yet, the driver will be added when you do. The driver includes a command line utility (synclient) to control the touchpad. Graphical utilities area also available (ksynaptics, gsynaptics).

X11 Configuration
The following modifications are needed to X.Org's configuration:

PC-card
See this guide.

Infrared Port
See this guide.

Display adapter (Video Card)
Many laptops are equipped with a "mobile edition" video card, with the same chipset but reduced performance as their desktop counterparts.

One of the characteristics of mobile edition video cards is the support of 3 displays: the laptop’s build-in LCD, an external monitor and TV-out. Most laptops will also have a function key (FN+Fx) for switching between these displays (see the Special Keys section). Note that some laptops support more than one display at the same time, such as with an extended desktop while others only support mirroring the display, and others again can only use one display at a time.

Choose a graphics driver from those available for your card and follow the linked guide. Read Dual Monitors for more information on setting up an external monitor or TV-out.

Hardware sensors
See this guide, but keep in mind that some (most?) laptops deliver their thermal monitoring through ACPI.

SD and MMC card reader
See this guide.

Troubleshooting
Freeze on startup

Try disabling "Symmetric multi-processing" support.

Related documents:


 * ACPI/Fix common problems

Networking
Wireless devices (WiFi, Bluetooth etc.) consume a lot of power. Consider turning these off when running on battery.

Network profiles
When using a laptop at different locations regularly, you will notice that you have a lot of different network environments. An example situation:


 * At home: Fixed ip network and ip based network shares.
 * At work: DHCP network and samba shares.
 * While traveling: no network.
 * At a hotel: Dial-up using modem, or Wireless network, and a connection to work or home using VPN.

This would require multiple network profiles that would regulate used network cards, your IP-addresses, network shares, route to the network and internet, etc.

Network Selection
todo: How to setup multiple profiles to be selected at boot time (in grub/lilo) so you can set what network devices to start, use dhcp or manual settings, routing, network shares, what services to start, etc.

Some options:


 * QuickSwitch: http://muthanna.com/quickswitch app-admin/quickswitch
 * HProfile: http://hprofile.sourceforge.net/

User Environment
todo: How to setup multiple profiles in kde/gnome/xfce/etc. so you can set what network shares to mount and what applications should be started automatically (IM and mail software, etc.). Maybe these can be linked to the profiles that are available at boot time?

Rewrite properly: Xfce, see http://www.xfce.org/documentation/4.2/manuals/xfce4-session

Slow compile
One major problem brought up when discussing Gentoo on laptops is long compile times. Most laptops tend to have slower CPUs than desktops. If you have a fairly recent or just powerful enough laptop, this won't be a problem. If your laptop isn't fast enough, you have two options. Either just let it compile and wait for it to finish, or use distcc or Icecream to distribute the compiling to faster computers (such as your home desktop).

Links

 * Per make/model laptop guides


 * Gentoo Power management guide
 * TLDP: Mini-HowTo Battery Powered Linux
 * Linux on Laptops - Collection of laptop howtos for various distributions
 * Think Wiki: How to make ACPI work
 * Intels website with a bunch of tips for power saving
 * Vga switcheroo (Using two graphics cards)