Laptop
From Gentoo Linux Wiki
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.
Contents |
[edit] Before installing
[edit] 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.
[edit] 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"
[edit] 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):
| Code: /boot/grub/grub.conf |
title Maintenance Partition
unhide (hd0,3)
rootnoverify (hd0,3)
chainloader +1
|
More info in this post.
[edit] 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.
[edit] 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.
[edit] Kernel Settings
| Linux Kernel Configuration: Touchpad: Synaptics |
Device Drivers --->
Input device support --->
--- Mouse interface
<*> Event interface
[*] Mice
<*> PS/2 mouse
|
[edit] Touchpad Configuration
Add "synaptics" to the INPUT_DEVICES variable in /etc/make.conf. Example:
INPUT_DEVICES="evdev keyboard mouse synaptics"
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).
[edit] X11 Configuration
The following modifications are needed to X.Org's configuration:
Section "Module"
Load "synaptics"
EndSection
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:
EndSection
Section "ServerLayout"
InputDevice "Touchpad" "CorePointer"
EndSection
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.
[edit] PC-card
See this guide.
[edit] Infrared Port
See this guide.
[edit] 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:
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 ./xorg.conf.tv-out). 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:
TODO: Enable external monitor support: Tv-out is not supported by the xorg radeon driver.
- Nvidia (proprietary) driver settings:
TODO
- Nvidia (open source) driver settings:
TODO
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:
Modes "640x480"
todo: Monitor / serverlayout definition, acpi event scripts for pushing the switch-display button.
Related documents:
[edit] Hardware sensors
See this guide.
[edit] SD and MMC card reader
See this guide.
[edit] Troubleshooting
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:
[edit] Networking
Wireless devices (WiFi, Bluetooth etc.) consume a lot of power. Consider turning these off when running on battery.
[edit] 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.
[edit] 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/
[edit] 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
[edit] Troubleshooting
[edit] 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).
[edit] Links
- Generic Help at OpenLaptops.org
- Gentoo Power management guide
- Mini-HowTo Battery Powered Linux
- Collection of laptop howtos for various distributions
- How to make ACPI work - contains up to date tips.
- Gentoo Linux on the PACKARD BELL ipower 7000 series
- Intels website with a bunch of tips for power saving