Gentoo Wiki


This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related


Running gentoo on a laptop is the same as any other linux.

This is not a complete gentoo install guide. It will only focus on laptop specific issues, and even then not on model specific. First read the Gentoo install handbook, then refer to this guide for laptop specific 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 on the hardware index.

Before installing

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 partitoning layout, do:

sfdisk --dump /dev/sda > PARTLAYOUT

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

netcat -q 5 -l -p 1042 > recovery.img

On the ThinkPad, run

dd if=/dev/sda1 | netcat IP.OF.OTHER.HOST 1042

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
sha1sum recovery.img
# ThinkPad
sha1sum /dev/sda1

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

gzip recovery.img

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:

split -b 695mb -d recovery.img.gz recovery.img.gz_part

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:

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 apropriate partition):

Code: /boot/grub/grub.conf
title Maintenance Partition
    unhide (hd0,3)
    rootnoverify (hd0,3)
    chainloader +1
Warning: If grub's MBR-Code is written to a partition instead of the hdd's MBR (to avoid destroying the original MBR), do not use grub makeactive command for any entry. This will cause grub not to load on startup. If grub fails to boot as a result of this, fdisk's a command can be used to toggle the active partition.

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.


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

Kernel Settings

For best results, Use a recent enough kernel (version above 2.6.11)

Linux Kernel Configuration: Touchpad: Synaptics
Device Drivers  --->
   Input device support  --->
      --- Mouse interface
      <*> Event interface
      [*] Mice
      <*>   PS/2 mouse

Touchpad Configuration

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

File: make.conf
INPUT_DEVICES="evdev keyboard mouse synaptics"

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

# emerge -1 x11-drivers/synaptics

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:

File: xorg.conf
Section "Module"
   Load "synaptics"
Section "InputDevice"

Minimum required settings:

   Identifier "Touchpad"
   Driver "synaptics"
   Option "SendCoreEvents"
   Option "Protocol" "auto-dev"

Required by configuration tools (includes turning the trackpad on and off):

   Option "SHMConfig" "on"

If automatic detection of the trackpad did not work specify the following protocol instead, and manually specify the trackpad's device file (may vary by laptop):

   Option "Protocol" "event"
   Option "Device" "/dev/input/event0"

End the input section:

Section "ServerLayout"
    InputDevice "Touchpad" "CorePointer"

The "CorePointer" setting makes the touchpad your primary input device (This makes sure X11 can start without an external mouse connected). If udev or hotplug is enabled an external mouse will be activated, when plugged in, on the fly while running X11.


See this guide.

Infrared Port

See this guide.

Display adapter (Video card)

Many laptops are equipped with a "mobile edition" video card. ATI, nVidia and intel cards all seem to be supported by the same driver that you would use for their desktop counterpart. This can be said for both the proprietary driver and the open-source drivers. Check the wiki for details on various display adapters.

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 Special Keys section). The following settings are required in xorg.conf to setup multiple displays. (NOTE: some laptops support using more than one display at the same time, as an extended desktop. Some only support mirroring or using one display at a time):

  • ATI fglrx (proprietary) driver settings:
File: xorg.conf

Enable external monitor support:

   Option "MonitorLayout"              "LVDS,AUTO"

For TV-out use the following: Caution: this will deactivate your LCD display and only use your TV. It is advised to use this in an alternative Xorg configuration file and start the X-server using that configuration file from the command line (startx -- -config ./ That way you can kill your X-server using ctrl+alt+backspace and return to the command line on your LCD display. Also, make sure you do not have an external monitor attached.

   Option "MonitorLayout"              "NONE,STV"

TV Specific settings:

   Option "NoTV"                       "yes"
   Option "TVStandard"                 "NTSC-M"
   Option "TVHSizeAdj"                 "0"
   Option "TVVSizeAdj"                 "0"
   Option "TVHPosAdj"                  "0"
   Option "TVVPosAdj"                  "0"
   Option "TVHStartAdj"                "0"
   Option "TVColorAdj"                 "0"
   Option "GammaCorrectionI"           "0x00000000"
   Option "GammaCorrectionII"          "0x00000000"
  • Radeon (open source) driver settings:
File: xorg.conf

TODO: Enable external monitor support: Tv-out is not supported by the xorg radeon driver.

  • Nvidia (proprietary) driver settings:
File: xorg.conf


  • Nvidia (open source) driver settings:
File: xorg.conf


On most TV's you will experience problems reading text. To solve this, either increase font size, or set a lower resolution. this can be done in most DE's, or in xorg.conf in the "Screen" Section's "Display" Subsection:

File: xorg.conf
   Modes       "640x480"

todo: Monitor / serverlayout definition, acpi event scripts for pushing the switch-display button.

Related documents:

Hardware sensors

See this guide.

SD and MMC card reader

See this guide.


Freeze on startup

Try disabling "Symmetric multi-processing" support.

Linux Kernel Configuration: Disable Symmetric multi-processing
Processor type and features --->
   [ ] Symmetric multi-processing support

Related documents:


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:

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


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.


Last modified: Sat, 11 Oct 2008 06:00:00 +0000 Hits: 99,457