Gentoo Linux on IBM/Lenovo Thinkpad Z61p
1.
Precise type and components
Code listing 1.1 |
Product: ThinkPad Z61m 9453-A12 Original description: Based on
9453-9NG: T2500(2GHz), 1GB RAM, 100GB 5400rpm HD, 15.4in 1920x1200
LCD, 256MB ATI FireGL V5200, CDRW/DVDRW, Intel 802.11abg wireless,
Modem, 1Gb Ethernet, UltraNav, Secure chip, IEEE 1394, Fingerprint
reader, 9c Li-Ion batt, WinXP Pro
# NOTE: no bluetooth!
|
2.
Setting up the base Gentoo system
Moving Windows to the far side of the disk
A.s.a.p. I shoved Windows to the outer rim: created a boot CD and a
restore DVD using the IBM ThinkVantage tools. I installed Partition
magic which I had lying around and deleted the restore partition (5 GB
wasted!!!), schrinking and moving windows all the way to the far side
of the disk (inner sectors physically). I would be interested if
anyone has a howto for doing this in a 99% reliable way with
open-source tools.
Note:
A performance gain in disk access is
reported and discussed: basically sector density on outer tracks is
higher. On the other hand seek times are shorter on inner tracks
i.e. random access may be faster. I didn't have time to install Linux
on outer disks and compare but there is probably a reason why disks
start writing data from the outer tracks inward...
|
Prepping the BIOS
Before you do anything, go into the BIOS! Actually, the basic
settings were fine for installation. Below I did switch of some boot
options from network and USB devices. Ofcourse, set primary boot
devices to CD/DVD when you are going to install...
Code listing 2.1: Bios information |
Bios version 1.10 (7FET50WW) Bios date
2006-06-20 Embedded controller 1.04
|
Code listing 2.2: Bios sections with configuration settings: #=my comments |
# VERY IMPORTANT !!!
Config Network
Wake on Lan Enabled
Flash over Lan Disabled
Internal Network Option Enabled
Hard drive DMA Enabled
Internal Network Devices Enabled
Internal Wireless Device Enabled
Internal Bluetooth Device Enabled # This model has no bluetooth chip!!! Bogus BIOS option...
Internal Wireless WAN Device Enabled
Serial Port Serial Port Disabled
Infrared Infrared
Device Enabled
Infrared Enabled Modem Modem Enabled
Parallel Port Parallel Port Disabled
Mode Bidirectional PCI Config INTA PCI IRQ 11
#1 INTA PCI IRQ 11 INTA PCI IRQ 11 INTA PCI IRQ 11 INTA PCI IRQ 11
INTA PCI IRQ 11 INTA PCI IRQ 11 INTA PCI IRQ 11 #8 USB
USB BIOS Support Disabled # Boot from USB diskette or CD-ROM, frees 16KB of
high memory for loading drivers
Keyboard/Mouse Trackpoint Automatic # If PS/2 mouse is attached,
Touchpad Automatic # built-in pointing devices are disabled
Fn Key Lock Disabled
Thinkpad Numlock Independent
Display Default
Primary Video Device Internal
Boot Display Device Analog (VGA) # Thinkpad LCD, Analog(VGA), VGA+LCD,Digital(DVI), DVI + LCD, VGA+DVI
HV expansion On # Control LCD Horiz/Vert expansion state
Brightness Normal
Power Timer Wake with Battery Operation Disabled
Intel(R) SpeedStep Technology Enabled
Mode for AC Automatic # demand based
Mode for Battery Battery optimized Adaptive Thermal Management
Scheme for AC Maximize Performance Scheme for Battery Balance
CDROM Speed Silent # Normal, Silent, High # Silent mode works fine e.g. with
DVD play
CPU Power Management Automatic # stop microprocessor clock when there is no activity
PCI Bus Power Management Automatic # stops PCI clock when there is no activity
Alarm Power Control Beep Enabled # beep when suspend,wake,hibernate,AC
(dis)connect Low Battery Alarm Enabled
Volume Beep Disabled
Password Beep Disabled # system waits for power-on,hard-disk, supervisor password, # match/non-matching password
Memory Extensive Memory Test Disabled
Serial ATA (SATA) SATA
Controller Mode Option: AHCI # or Compatibility: NOTE changing this AFTER install of OS # makes system UNBOOTABLE (linux, windows)
CPU Core Multi-Processing Enabled
Security Password Using Passphrase - Current setting
Disabled Supervisor Password Lock BIOS Settings - Current setting
Disabled Set Minimum Length #Password length - Current setting
Disabled Power-On Password Disabled Hard Disk1 Password Disabled
Require password after hibernate Disabled Password Reset service -
Current setting Enabled - States In Process Fingerprint Predesktop
Authentication - Current setting Enabled Reader Priority - Current
setting External Security Mode - Current setting Normal # Normal
Power-on OR supervisor password to boot if no fingerprints
authenticated # High Supervisor password to boot if no fingerprints
authenticated Erase Internal Fingerprint Data Security Chip - Current
setting Inactive Predesktop Area Access Predesktop Area - Current
setting Normal # Secure (no user/SW changes) # Normal (change, but
content hidden from OS) # Disabled (not usable, visible and
reclaimable) BIOS Update Option Flash BIOS Updating by End-Users -
Current setting Enabled Memory Protection - Current setting Enabled #
Data Exection Prevention if OS supports it: # prevent virus/worms from
creating memory buffer # overflows by running code where only data is
allowed
Startup Boot
Boot priority order [ATA HDD0 number one, all other entries excluded]
Network Boot priority order [I deleted all entries, don't want anyone booting from the network]
Boot Mode Quick # Diagnostics for trouble shooting
Boot device List F12 Option - Current setting Enabled
|
Gentoo Installation - Overall experience
Ofcourse installing Gentoo is fun as allways. The novelty
of the hardware presented a few hurdles which were easily overcome.
First: the Gentoo 2006.1 minimal cd has a 2.6.17 kernel which
doesn't play nice with the network card driver (tg3 module). The
Broadcom NIC was recognized and net-config and manual configuration I
both tried. So I reverted to the Gentoo 2006.0 minimal install cd with
2.6.15 kernel.
Secondly: during 2006.0 installation I could
then set the profile to 2006.1 to get latest stuff anyway. To be sure
I forced the installation of an older kernel which has no problems
with the tg3 driver: emerge
"=sys-kernel/gentoo-sources-2.6.15-r1" I configured the kernel to
get basic system stuff working (see details below at each topic).
Booting then went fine until ALSA started and kept looping forever:
azx_get_response_timeout So I took out soundcard support from
kernel: then I could boot the system.
With the basic system
up, I configured and installed the latest 2.6.17-r8 kernel which
actually solved both above problems.
Next I set everything
in make.conf correctly (see below) and then did a emerge --deep
--update --newuse world to get most of the basic stuff installed.
Finally, I copied the
/etc/portage/package.keywords file (see below) from my
previous laptop and then piped the old
/var/lib/portage/world file to let every package not yet
present (-n) be installed: emerge -a -n $(cat old_world |
xargs) Only a few packages (experimental ones) didn't compile so I
had to emerge --skipfirst --resume a few times. Meanwhile I
wrote this document, and then I was basically done.
Disk
Warning:
I moved the Windows
partition to the far end of the disk before doing anything else to get
the max performance with Linux. Do this before anything else (see
above). |
Code listing 2.3: Output fdisk /dev/sda |
Disk /dev/sda:
100.0 GB, 100030242816 bytes 240 heads, 63 sectors/track, 12921
cylinders Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 10890
12921 15361888+ 7 HPFS/NTFS /dev/sda2 * 1 5 37768+ 83 Linux /dev/sda3
6 271 2010960 83 Linux /dev/sda4 272 10889 80272080 5 Extended
/dev/sda5 272 4147 29302528+ 83 Linux /dev/sda6 4148 8023 29302528+ 83
Linux /dev/sda7 8024 10889 21666928+ 83 Linux
Partition table entries are not in disk order |
Code listing 2.4: /etc/fstab |
### NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0
### glibc 2.2 and above expects tmpfs to be mounted at
/dev/shm for POSIX shared memory (shm_open, shm_unlink). ### (tmpfs
is a dynamically expandable/shrinkable ramdisk, and will use almost no
memory if not populated with files) shm /dev/shm tmpfs
nodev,nosuid,noexec 0 0
# NOTE: If your BOOT partition is ReiserFS, add the notail
option to opts.
### Harddisk: Partitions in disk-order: ### Linux /dev/sda2
/boot reiserfs noatime,notail 0 0 /dev/sda3 none swap sw 0 2 ###
/dev/sda4 = extended partition containin /dev/hda5-7 /dev/sda5 /
reiserfs noatime,notail 0 1 /dev/sda6 /home reiserfs noatime,notail 0
0 /dev/sda7 /media reiserfs noatime,notail 0 0
### Windows partition = located at end of disk ###
(preinstalled, was moved there before linux was installed) /dev/sda1
/mnt/win ntfs noauto,noatime,user 0 0
### Other systems
/dev/hda /mnt/cdrom iso9660 noauto,user,ro 0 0 # USB Stick:
noatime prevents updating timestamp i.e. wear of your NAND memory! #
/dev/sdb /mnt/usb auto noauto,noatime,user,exec,sync 0 0 # /dev/sdb
/mnt/pcmcia vfat noauto,user,noatime,exec,sync 0 0
|
Configuration files:
/etc/fstab
Memory and swap
The swap
partition is advised to be 2 x RAM size but less than 2048MB, so I set
it to 2048MB. To be able to use all the RAM on a 1GB machine (or
better) I set the kernel option:
To use all of the memory for
the installation be sure to check:
Code listing 2.5 |
Processor type and
features High Memory Support (4GB) --->
|
See section
Gentoo Optimization below for swappines tweaking. Check that all
memory is available: running top reports 1 GB.
Bootloader Configuration - GRUB
Basically nothing to it, just follow installation manual. There
is a catch, however: grub partition number follows the same order:
(hd0,0) is a end of disk in my case. Only fdisk /dev/sda, and then p
(see below) reveals that /dev/sda1 actually is at end of disk.
Configuration files:
/boot/grub/grub.conf
Link: Think Wiki -
Kernel parameters at boot time
3.
Configuring all devices
Hardware Specifications
Machine type: IBM - Z61- 9453-A12
CPU and frequency scaling (Intel Enhanced
Speedstep IES)
Install a SMP (multiprocessor)
kernel. If you compile your own kernel, add SMP support to it. It's
advisable also to add RTC (device drivers->character support). (NOTE:
Multi-core scheduler support was not present in 2.6.15 kernel config).
The Yonah core (first generation Cure Duo) doen't have Hyperthreading,
so disable SMT. Centrino is Pentium M line.
Code listing 3.1: Kernel configuration .config |
Processor type and features
[*] Symmetric multi-processing support Subarchitecture Type
(PC-compatible) ---> Processor family (Pentium M) ---> [*] HPET Timer
Support (8) Maximum number of CPUs (2-255) [ ] SMT (Hyperthreading)
scheduler support [*] Multi-core scheduler support Preemption Model
(Preemptible Kernel (Low-Latency Desktop)) ---> [*] Preempt The Big
Kernel Lock [*] Machine Check Exception [*] MTRR (Memory Type Range
Register) support [*] Enable kernel irq balancing [*] Enable seccomp
to safely compute untrusted bytecode Timer frequency (1000 HZ) --->
[*] Support for hot-pluggable CPUs (EXPERIMENTAL) |
Large memory (1 GB)
Code listing 3.2: Kernel configuration .config |
Processor type and features
High Memory Support (4GB) ---> Memory model (Flat Memory) ---> [
] Allocate 3rd-level pagetables from highmem ## TODO
|
SATA Hard-disk
Code listing 3.3: lspci -v |
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02) (prog-if 01 [AHCI 1.0])
Subsystem: Lenovo Thinkpad R60e model 0657
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 218
I/O ports at 18c8 [size=8]
I/O ports at 18ac [size=4]
I/O ports at 18c0 [size=8]
I/O ports at 18a8 [size=4]
I/O ports at 18b0 [size=16]
Memory at ee404400 (32-bit, non-prefetchable) [size=1K]
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
Capabilities: [70] Power Management version 2
Kernel driver in use: ahci
|
Code listing 3.4: Kernel configuration .config |
Device Drivers --->
SCSI device support --->
SCSI low-level drivers --->
<*> Serial ATA (SATA) support
<*> AHCI SATA support
|
During installation I did a benchmark of the disk
Code listing 3.5: SATA disk benchmark |
hdparm -tT /dev/sda cached reads 2440 MB/s buffered reads 37.7 MB/s
|
AHCI = Advanced Host Controller Interface Specification for Serial ATA The Advanced Host
Controller Interface (AHCI) specification describes the register-level
interface for a Host Controller for Serial ATA 1.0a and Serial ATA
II. The specification includes a description of the hardware/software
interface between system software and the host controller hardware
IDE - DVD reader/writer
Code listing 3.6: Kernel configuration .config |
[*] Use multi-mode by default
|
I had to set the above option since I received the
errormessage (documented in the Help of this option) when accessing
the DVD hda:
Code listing 3.7 |
hda: set_multmode: status=0x51 { DriveReady
SeekComplete Error } x hda: set_multmode: error=0x04 {
DriveStatusError }
|
Link:
Gentoo Wiki - hdparm and IDE Performance
I tried out
hdparm -c1 /dev/hda and found no difference using hdparm -tT.
Most (but not all) newer chipsets work fine with option 1.This setting
changes how the data is moved from the PCI bus to the controller. It
can double your throughput.
Graphics: ATI Mobility FireGL V5200 - Xorg
Configuration
Code listing 3.8: PCI bus info: lspci -v |
01:00.0 VGA compatible controller: ATI Technologies Inc M56GL [Mobility FireGL V5200] (prog-if 00 [VGA controller])
Subsystem: Lenovo Unknown device 202b
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at d0000000 (32-bit, prefetchable) [size=256M]
I/O ports at 2000 [size=256]
Memory at ee000000 (32-bit, non-prefetchable) [size=64K]
[virtual] Expansion ROM at ee020000 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Express Legacy Endpoint, MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Kernel driver in use: fglrx_pci
Kernel modules: fglrx
|
Code listing 3.9: Kernel configuration .config |
Graphics support <*>
Support for frame buffer devices
[*] Enable firmware EDID
[ ] Backlight &
LCD device support --->
Character devices <*>Intel/AMD/VIA HW Randow Number
Generator support <*>/dev/nvram support # required by # NB: no
agpgart or direct rendering manager!
|
Configuration files:
/etc/X11/xorg.conf
This card is not yet supported by
open source DRI project (since it is very new).
However, to
my surprise the ATI drivers worked out of the box once I got the
settings right. I followed the guide: Gentoo Wiki - HOWTO ATI Drivers
. I did a emerge ati-drivers ati-drivers-extras (version
8.27.10-r1). and loaded the module: modprobe fglrx. Next I
made a basic xorg.conf file using the basic
xorgconf tool. Note: using Xorg -configure doesn't work
since it doesn't recognize the card etc. It doesn't produce a
xorg.conf file from which the ATI configuration tool can start from.]
Next I let the ATI configuration tool use the resulting file and add
its stuff: /opt/ati/bin/aticonfig --initial
--input=/etc/X11/xorg.conf I then deleted double entries produced
by xorgconf in xorg.conf (e.g. Monitor and Device sections).
The resulting file allowed Xorg to start, automatically at maximum
1920x1200 resolution, yummy.
NOTE: I forgot to add
opengl to my USE flags in make.conf. Recompling
with this flag added Planet Pinguin Tuxracer ppracer (former tuxracer)
screamed across my WUXGA TFT @ 1920x1200 without a hitch ..... smooth.
The LCD shows no ghosting on the screen in games or with DVD play,
very nice!
NOTE: the ATI driver automatically finds the
refresh rates which I actually couldn't find (yet) for my WUXGA LCD
screen (if you have them, let me know).
Configuration files:
/etc/X11/xdm/xdm-config
/etc/X11/xdm/Xresources
/usr/lib/X11/xdm/Xsetup_my
/usr/lib/X11/xdm/GiveConsole_my
I let /usr/lib/X11/xdm/pixmaps/background_my be a link to
the background I use on my desktop.
I checked the messages
for warnings, Xorg.0.log |grep WW and errors, Xorg.0.log
|grep EE. Warnings: (WW) `fonts.dir' not found (or not valid) in
"/usr/share/fonts/freefont/". (WW) `fonts.dir' not found (or not
valid) in "/usr/share/fonts/libdockapp-fonts". (WW) Open ACPI failed
(/var/run/acpid.socket) (Connection refused) (WW) fglrx(0): board is
an unknown third party board, chipset is supported (WW) fglrx(0): Only
one display is connnected,so single mode is enabled (WW) LoadModule:
given non-canonical module name "glesx.so" (WW) fglrx(0): Option
"DynamicClocks" is not used (WW) fglrx(0): Option "VendorName" is not
used (WW) fglrx(0): Option "ModelName" is not used (WW) fglrx(0):
Option "AllowGLXWithComposite" is not used
Graphics: ATI Mobility FireGL V5200 - Compiz-Fusion Configuration
Overview: Compiz-fusion works flawlessly and smooth on this machine.
Currently, I'm running compiz-fusion with ATI fglrx drivers using AIGLX
(desktop-effects overlay + latest ATI binary drivers).
This works fine apart form some slight performance lapses
with certain compiz animation, which I'm sure will be ironed out
(ATI driver issue with AIGLX).
Image quality is superb and the setup is much easier.
IMPORTANT: AIGLX is the office
Basically follow the guides (I will post details later on)
and look at my xorg configuration file.
Note: suspend to RAM works pretty good from within X as well!
Previously, binary ATI
drivers (fglrx) required one to use the Xgl x-server in order to use
the compiz-fusion compositing window manager.
Before you get started with either GLX or AIGLX,
you need direct rendering or DRI to work
in X. So in a regular e.g. xfce session, check by running glxinfo
|grep direct. If it is not working see above. Be sure that you
ran eselect set opengl ati.
XGL setup: Ofcourse, I assume
you boot into the console. Using the following steps you can set Xgl
with compiz-fusion up in a clean way, fully independent of the default
Xorg with xfwm4, by running either startxgl-xfce4 or
startxfce4. In fact, if you run these commands from two
different terminals (accessible via
Ctrl-Alt-F1,Ctrl-Alt-F2,..Ctrl-Alt-F5), then you get two sessions
running, and you switch between them using Ctrl-Alt-F7 (Terminal 0 = X
/ xfwm4) and Ctrl-Alt-F8 (Terminal 1 = Xgl / compiz-fusion). This is
very handy for e.g. reading documentation while testing!
-
Set up the layman overlay manager (skip if you got it already).
(Note that the Gentoo Wiki pages differ on where layman configuration
resides). Therefore I add my consistent, up-to-date setup here.
First emerge -av layman. Add to the end of your
/etc/make.conf: source
/usr/local/portage/layman/make.conf Then layman -L|grep
xeffects should list xeffects (don't take xeffects-experimental).
Get it with layman -a xeffects (later on you update this
overlay using layman -s xeffects and them emerge -uav
xgl).
-
Install Xgl, following the guide Gentoo Wiki - HOWTO XGL up
to the section Running Xgl.
-
Install compiz-fusion from the
xeffects overlay, following the Gentoo Wiki - HOWTO
compiz-fusion . Use the stable branch for all packages with the
sole exception of using the development version of fusion-icon (which
is not in the stable branch yet).
-
Set up a script /usr/bin/startxgl-xfce4 somewhere
in your executable path (e.g. /usr/bin). This script starts the Xgl
server (rather than X) and then runs xfce4, using a separate
configuration directory for xfce4 (by setting the XDG_CONFIG_HOME
variable).
-
Create a separate configuration directory for
xfce4 for use with compiz. cp -r ~/.config ~/.config-compiz
Configure xfce4 to start the compiz compositing manager: cp
/etc/xdg/xfce4-session/xfce4-session.rc
~/.config-compiz/xfce4-session/xfce4-session.rc Replacing only the
line starting the window manager Client0_Command=xfwm4 with
Client0_Command=compiz-manager It is actually usefull to to
keep separate configurations for xfce4 when using compiz or xfwm4, I
tend to set things up differently.
-
Now you run
startxgl-xfce4. Once xfce4 is up, the window decorations are
still missing. Start compiz-fusion, either from a terminal run
fusion-icon, or via the xfce4 menu (System, Compiz Fusion
Icon). It should now work. Make this permanent by going to Settings,
Autostarted Applications, Add. Add fusion-icon to the list and select
it. Now exit and check that upon next startxgl-xfce4
compiz-fusion starts immediately.
[Obsolete]
Sometimes, when fooling around for a long time, it is usefull to
deleting cached information from previous sessions, before starting
xfce4: rm -rf ~/.cache/sessions/* The removal of sessions files
fixed my mousecursor one time.
[Obsolete] XGL seemed to crash
when pressing Shift Backspace. Actually it tries to restart Xgl and
then fails (dunno why), which is a feature, not a bug :). Workaround
put in in .Xmodmap: keycode 22 = BackSpace BackSpace
Sound - ALSA
Code listing 3.10: PCI bus info: lspci -v |
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
Subsystem: Lenovo ThinkPad T60/R60 series
Flags: bus master, fast devsel, latency 0, IRQ 22
Memory at ee400000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [100] Virtual Channel <?>
Capabilities: [130] Root Complex Link <?>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel
|
Code listing 3.11: Kernel configuration .config |
<*> Sound card support Advanced Linux
Sound Architecture---> Open Sound System--->
<*> Advanced Linux Sound Architecture <*>
Sequencer support < > Sequencer dummy client <*> OSS Mixer
API <*> OSS PCM (digital audio) API [*] OSS Sequencer API [ ]
Verbose printk [ ] Debug Generic devices---> PCI devices---> ALSA USB
devices---> PCMCIA devices--->
PCI devices---> <*> |
The problem during
initial install was solved by using a newer kernel 2.6.17-r8. Used
ALSA kernel modules (not alsa-drivers package), emerge
alsa-utils and then did alsaconfig. Finally, rc-update
add alsasound boot
DVD and video playback, video out
Code listing 3.12: Kernel configuration .config |
<M> Video For Linux Video For Linux--->
[*] Enable Video For Linux API 1 (DEPRECATED)
I2C support
<M> I2C support
|
Playback was
with xine and mplayer initially hung up after opening scene of dvd.
hdparm -i /dev/had revealed that DMA (direct memory access) was
not turned on. I had not compiled the PCI controller driver (see
elsewhere in document) and hence DMA was not turned on automatically
(nor manually). After fixing this DVD and video plays very
smooooth with xine dvd:// and mplayer dvd://. During DVD
play, the drive apparently buffers data and then spins down. Movie
then pauses when it buffers the next chunk of data. Will try the
Silent BIOS setting. UltraNav trackpoint
ThinkWiki HOWTO: Configure Trackpoint UltraNav - Synaptics Touchpad
emerge tpconfig utility. Linux touchpad driver home
External monitor and beamer My
previous IBM Thinkpad A31 with Radeon 7500 had trouble with many
beamers (wrong resolution etc). I will report my experience with new
card here.
Network card - internal
Code listing 3.13: Kernel configuration .config |
[*] Network device support
<M> Dummy net driver support Ethernet (1000 Mbit) --->
<M> Broadcom Tigon3 support
|
Code listing 3.14: PCI bus info: lspci -v |
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752M Gigabit Ethernet PCI Express (rev 02)
Subsystem: Lenovo Unknown device 2020
Flags: bus master, fast devsel, latency 0, IRQ 217
Memory at ee100000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [48] Power Management version 2
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 Enable+
Capabilities: [d0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Virtual Channel <?>
Kernel driver in use: tg3
Kernel modules: tg3
|
As stated
above: the tg3 module for this card has a problem with 2.6.17 kernel
(on Gentoo 2006.1 minimal install CD), but this was patched in (at
least) 2.6.17-r8 so it worked fine once I had the system setup and
compiled this newer kernel.
Wake On Lan (WOL) Can be set in
the BIOS (above). TODO: test WOL
Network card - Intel Pro/Wireless 3945ABG (kernel 2.6.22 and below)
Works fine, but note the workaround for the suspend to RAM below.
NOTE: you need to re-emerge the drivers after each kernel compilation.
Trivial point: don't forget to switch on the wireless card
with the switch on the left front of the laptop...
I use the driver package (the one in kernels > 2.6.22 has some troubles and these kernels didn't play nice yet for me..):
emerge ipw3945
Note: this adds a daemon / service ipw3945d which has to be stopped to unload the module.
Followed the chapter
Wireless Networking (Gentoo Handbook)
.
Basically all you need to do is:
emerge wpa_supplicant wireless-tools
To easily switch wireless networks I followed
NetworkManager HOWTO
In Xfce Configuration, Sessions and Startup, Advanced tab, select
Launch Gnome services at startup.
Then start the gnome applet from a terminal:
nm-applet --sm-disable
and it is added to the Xfce toolbar and stays there after logout.
User needs to be in plugdev group?
xfapplet: can not select nm-applet from list?
Code listing 3.15: Kernel configuration .config |
Networking --->
[ ] Generic IEEE 802.11 Networking Stack
Device Drivers --->
Network Device support --->
Wireless LAN (non-hamradio) --->
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
Cryptographic options ---> [*] Cryptographic API
<*> AES cipher algorithms
<*> ARC4 cipher algorithm
<*> Michael MIC keyed digest algorithm
|
Code listing 3.16: PCI bus info: lspci -v |
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
Subsystem: Intel Corporation Thinkpad X60s, R60e model 0657
Flags: bus master, fast devsel, latency 0, IRQ 22
Memory at edf00000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [e0] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?<
Capabilities: [140] Device Serial Number 1f-82-b8-ff-ff-02-13-00
Kernel driver in use: ipw3945
Kernel modules: ipw3945
|
Code listing 3.17: Output |
# dmesg
ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)
# ipw3945d
ipw3945d - regulatory daemon
Copyright (C) 2005-2006 Intel Corporation. All rights reserved.
version: 1.7.18
Intel PRO/Wireless 3945ABG Network Connection found at:
/sys/bus/pci/drivers/ipw3945/0000:03:00.0
Daemon launched as pid 6441. Exiting.
|
Code listing 3.18: Output: dmesg |
ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.2.2mpr
ipw3945: Copyright(c) 2003-2006 Intel Corporation
--
ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection
ipw3945: Radio Frequency Kill Switch is On:
Kill switch must be turned off for wireless networking to work.
|
For kernel > 2.6.23 the drivers are in the kernel package.
Didn't get these kernels to play nice yet.
Link:
Gentoo Wireless Networking
and
Gentoo
Wiki - HARDWARE ipw3945
USB 2.0 and 1.1 general setup
NOTE: initially I didn't compile the options
SL811HS HCD support below. It is not that obvious that they are needed.
The USB mouse would not work (no light went even on when I plugged it in).
Now it works excellent: during Xorg operation I can plug and
unplug and mouse works immediately.
Code listing 3.19: Kernel configuration .config |
<*> Support for Host-side USB
--- Miscellaneous USB options
[*] USB device filesystem
--- USB Host Controller Drivers
<*> EHCI HCD (USB 2.0) support
[*] Root Hub Transaction Translators (EXPERIMENTAL)
<*> OHCI HCD support
<*> UHCI HCD (most Intel and VIA) support
<*> SL811HS HCD support
< > CF/PCMCIA support for SL811HS HCD
--- USB Device Class drivers
<*> USB Printer support
--- NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
--- may also be needed; see USB_STORAGE Help for more information
<*> USB Mass Storage support
<*> USB Human Interface Device (full HID) support
[*] HID input layer support
[ ] /dev/hiddev raw HID device support
[*] USB Monitor
|
Code listing 3.20: PCI bus info: lspci -v |
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI])
Subsystem: Lenovo ThinkPad T60/R60 series
Flags: bus master, medium devsel, latency 0, IRQ 16
I/O ports at 1800 [size=32]
Kernel driver in use: uhci_hcd
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) (prog-if 00 [UHCI])
Subsystem: Lenovo ThinkPad T60/R60 series
Flags: bus master, medium devsel, latency 0, IRQ 22
I/O ports at 1820 [size=32]
Kernel driver in use: uhci_hcd
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) (prog-if 00 [UHCI])
Subsystem: Lenovo ThinkPad T60/R60 series
Flags: bus master, medium devsel, latency 0, IRQ 23
I/O ports at 1840 [size=32]
Kernel driver in use: uhci_hcd
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) (prog-if 00 [UHCI])
Subsystem: Lenovo ThinkPad T60/R60 series
Flags: bus master, medium devsel, latency 0, IRQ 21
I/O ports at 1860 [size=32]
Kernel driver in use: uhci_hcd
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI])
Subsystem: Lenovo ThinkPad T60/R60 series
Flags: bus master, medium devsel, latency 0, IRQ 21
Memory at ee404000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port: BAR=1 offset=00a0
Kernel driver in use: ehci_hcd
|
USB stick
The stick is recognized by USB drivers.
dmesg output:
Warning:
Set mount option "noatime" in /etc/fstab to reduce wearout of your memory stick
|
PCMCIA Cardbus
Code listing 3.22: Kernel configuration .config |
|
Note:
I heard you need ISA PNP selected in your kernel for PCMCIA
to work?.
/etc/initd/pcmcia start
seems screwed up!
mkdir /mnt/pcmcia
mount /dev/hde /mnt/pcmcia
|
Biometric chip - Fingerprint reader
Code listing 3.23: PCI bus info: lspci -v |
|
Code listing 3.24: Kernel configuration .config |
|
emerge bioapi pam_bioapi tfm-fingerprint
after putting packages in
/etc/portage/package.keywords
and adding flag qt for bioapi in
/etc/portage/package.use.
I had trouble emerging bioapi with USE=qt flag, some sandbox violation.
FEATURES="-sandbox" emerge bioapi
Next I ran (after finding) /opt/bioapi/bin/QSample and
got.
BioAPI Error Code: 0x3
This doesn't appear when I run it as root.
here
As root I did a
export PATH=$PATH:/opt/bioapi/bin
to get the mod_install script in my path which the
install.sh script of the driver needs.
sh install.sh /usr/lib
Next I ran /opt/bioapi/bin/QSample
and tried couple of times. Swipe slowly.
After 3 succesfull scans it was satisfied.
Now you can proceed with installing the .bir-file(try as
root, if you get an "BioAPITest: command not found", take
your user account. you will have to copy the
SERIAL={5550454b-2054-464d-2f45-535320425350} into the root
console for editing a file in /etc later on)
HDAPS Hard-Disk Active Protection System a.k.a. motion detector
Code listing 3.25: PCI bus info: lspci -v |
|
Code listing 3.26: Kernel configuration .config |
Device Drivers > Hardware Monitoring Support > IBM Hard Drive Active Protection System (hdaps)
|
Simply loading the hdaps module:
#modprobe hdaps
FATAL: Error inserting hdaps (/lib/modules/2.6.18-gentoo-r2/kernel/drivers/hwmon/hdaps.ko): No such device
# dmesg
hdaps: supported laptop not found!
hdaps: driver init failed (ret=-19)!
So wait probably until it will be recognized by standard
kernel, don't want to be patching kernels ...
The Z61p is not mentioned in the list in /usr/src/linux/drivers/hwmon/hdaps.c.
#
Your kernel has NOT been patched for blk_freeze
* The ebuild can attempt to patch your kernel like so
* emerge --config =hdapsd-20060409
Configuring pkg...
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 2.6.18-gentoo-r2
* We don't have a patch for kernel 2.6.18 yet
# Edit /etc/conf.d/hdapsd (change your harddrive if neccessary: mine is sda, and change the value from 5, 5 is to sensitive, 12 is a good value in my opinion).
# start deamon with: # /etc/init.d/hdapsd start
# Optional: add to default runlevel: # rc-update add hdapsd default, rc-update add hdapsd battery
Hard-disk parking
ThinkWiki - Protect harddisk through APS
Theft-alarm
ThinkWiki - Theft alarm using HDAPS
Slaptop
Wave-correction
IEEE 1394 - Firewire
Code listing 3.27: PCI bus info: lspci -v |
15:00.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394
Host Controller (prog-if 10 [OHCI])
Subsystem: Lenovo Unknown device 207f
Flags: medium devsel, IRQ 11
Memory at e4302000 (32-bit, non-prefetchable) [disabled] [size=2K]
Memory at e4304000 (32-bit, non-prefetchable) [disabled] [size=16K]
Capabilities: [44] Power Management version 2
|
Code listing 3.28: Kernel configuration .config |
|
Texas Instruments 5-in-1 Multimedia Card Reader
Code listing 3.29: PCI bus info: lspci -v |
15:00.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader
(SD/MMC/MS/MS PRO/xD)
Subsystem: Lenovo Unknown device 207c
Flags: bus master, medium devsel, latency 0, IRQ 11
Memory at e4301000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
15:00.3 Class 0805: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Con
troller (prog-if 01)
Subsystem: Lenovo Unknown device 207d
Flags: bus master, medium devsel, latency 0, IRQ 11
Memory at e4302800 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
|
Code listing 3.30: Kernel configuration .config |
|
IRDA Connection
Code listing 3.31: PCI bus info: lspci -v |
|
Code listing 3.32: Kernel configuration .config |
|
Probably never going to do that.
If you know how to, send me the infos and I will try and
document it here.
4. Powermanagement using ACPI
Overview
Powerconsumption: roughly 20.800 W
Capacity: 80.0 W hour
Effect of:
ACPI throttling
CPUFREQ frequency scaling
ATI GPU powerstate
When X is not running:
This indicates the effect of the LCD backlight.
The first thing I checked is whether the DSDT firmware in the BIOS
is buggy, following the guide
Gentoo Wiki: HOWTO Fix Common ACPI Problems
.
After recompiling the DSDT with the Intel compiler (instead
of shitty Microsoft compiler) I found that there were no
bugs in this DSDT! Good job IBM!
Suspend / hibernate to RAM (ACPI S3 state)
I started with only basic hardware working (video,
network, sound).
Kernel configuration essentials to get acpi sleep to work.
"Hotpluggable CPU" (see CPU above)
I emerge hibernate-script and used the
hibernate -ram command to test out suspend to RAM
a.k.a. sleep or S3 state after configuring:
/etc/hibernate/ram.conf
,
/etc/hibernate/common.conf
,
/etc/hibernate/hibernate.conf
.
I commented out EnableVbetool yes, since trying to suspend
using Vbetool it Segfaulted (version 0.7). Probably not needed.
Suspending from text mode.
hibernate-ram would make the machine sleep, but
waking up the screen is blank.
Next I tried acpi_sleep=s3_bios,s3_mode boot
parameter.
See the grub bootloader configuration
/boot/grub/grub.conf
.
Here s3_bios and s3_mode calls the video BIOS
during resume to initialize the video card and reset the
text mode, respectively.
When resuming
the screen now did not blank anymore!
ThinkWiki Problems with ACPI suspend-to-ram
However, I did get permission denied errors when doing a simple ls
as root.
This was reported to be related to SATA drivers not supporting
powersaving correctly (or at all). The first disk access
hangs system.
I Waited some time for SATA drivers in newer kernels which
support powersaving modes.
This fixed the problem.
Kernel 2.6.20 seems to be ok. Now everything works when
suspending from console.
Next, the tg3 NIC module had a bug.
Let it be un- and reloaded by hibernate
-
network didn't work any more.
I did rmmod tg3 and modprobe tg3 to reload the NIC
module.dmesg now reported a BUG:
tg3.c:v3.72 (January 8, 2007)
-
The network card module ipw3945 is in the blacklist
/etc/hibernate/blacklisted-modules
hibernate-ram gives:
Some modules failed to unload: ipw3945
hibernate-ram: Aborting suspend due to errors in ModulesUnloadBlacklist (use --force to override).
http://bugs.archlinux.org/task/7900
To be safe, better leave it blacklisted but add to /etc/hibernate/common.conf
RestartServices ipw3945d
StopServices ipw3945d
-
Currently, I'm running compiz-fusion with ATI fglrx drivers using AIGLX (see above).
Suspend to RAM works pretty good from within X.
A few times the machine boots after resume but no serious problems so far.
# TODO figure out the problem with suspend is when it reboots at resume.
APM (obsolete)
Note:
At present ACPI works flawlessly and is to be preferred.
At first install, I quickly tried but didn't get the machine to suspend to
RAM to with APM (but this may be due to the SATA drivers lack of
powersaving support, which blocks ACPI suspend to RAM at present).
However, I someone had succes, I could report it here.
|
Code listing 4.1: PCI bus info: lspci -v |
|
Code listing 4.2: Kernel configuration .config |
<*> APM (Advanced Power Management) BIOS support
[ ] Ignore USER SUSPEND
[*] Enable PM at boot time
[*] Make CPU Idle calls when idle
[ ] Enable console blanking using APM
[ ] RTC stores time in GMT
[*] Allow interrupts during APM BIOS calls
[ ] Use real mode APM BIOS call to power off
|
Battery monitoring states, powerdrain
Code listing 4.3: Battery info |
# cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charging
present rate: 12185 mW
remaining capacity: 78690 mWh
present voltage: 12511 mV
# cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 84240 mWh
last full capacity: 83920 mWh
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 4196 mWh
design capacity low: 200 mWh
capacity granularity 1: 1 mWh
capacity granularity 2: 1 mWh
model number: 92P1133
serial number: 2862
battery type: LION
OEM info: Panasonic
# cat /proc/acpi/battery/BAT0/alarm
alarm: 4196 mWh
|
I used xfce4 battery plugin which is simple but sufficient
(no configuration required, just works).
The battery reloads quite fast.
TODO see what thinkpad script tp_smapi can do
Independently of APM or ACPI, the battery status is also
accessible through the tp_smapi driver. The tp_smapi kernel
module provides battery status (and other features) via the
sysfs interface in /sys/devices/platform/smapi/BAT{0,1}, and
includes some information not accessible through APM or ACPI
(e.g., cycle count and momentary power draw).
CPU frequency scaling
Frequency scaling:
Enabling the frequency scaling governors (see CPU kernel
config above) did produces the standard entries in /sys/
(at least for kernels > 2.18
the frequency scaling seems to be supported for
the Yonah Core Duo Centrinos).
Default governor in config is userspace.
Added
acpi-cpufreq
to
/etc/modules.autoload.d/kernel-2.6.
Code listing 4.4 |
cpufreq-info
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 1000 MHz and 2.00 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.00 GHz (asserted by call to hardware).
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 1
hardware limits: 1000 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 1000 MHz and 2.00 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.00 GHz (asserted by call to hardware).
|
Gentoo Wiki How to make use of Dynamic Frequency
Scaling#Using Frequency_Scaling_Governors
ACPI CPU throttling (T-states)
Throttling keeps your laptop cool and quiet and saves energy
in this way. The processor does run at full speed.
The ACPI processor states do function already.
Load Processor P states acpi driver module (not possible to
bake into kernel)
modprobe acpi-cpufreq.
Put later in
/etc/modules.autoload.d/kernel-2.6.
After booting new entries appear:
Code listing 4.5 |
# cat /proc/acpi/processor/CPU0/info
processor id: 0
acpi id: 0
bus mastering control: yes
power management: yes
throttling control: yes
limit interface: yes
# cat /proc/acpi/processor/CPU0/limit
active limit: P0:T0
user limit: P0:T0
thermal limit: P0:T0
# /proc/acpi/processor/CPU0/power
active state: C3
max_cstate: C8
bus master activity: 00000000
states:
C1: type[C1] promotion[C2] demotion[--] latency[000] usage[00000010] duration[00000000000000000000]
C2: type[C2] promotion[C3] demotion[C1] latency[001] usage[00007061] duration[00000000000006472973]
*C3: type[C3] promotion[--] demotion[C2] latency[017] usage[01110633] duration[ 00000000001825590135]
# /proc/acpi/processor/CPU0/throttling
state count: 8
active state: T0
states:
*T0: 00%
T1: 12%
T2: 25%
T3: 37%
T4: 50%
T5: 62%
T6: 75%
T7: 87%
|
# NOTE: there is no performance entry to set the ACPI
Processor P states, which are deprecated.
Performance scaling done through cpufreq
Code listing 4.6: Simple powersaving button on XFCE-4 Toolbar |
# Put this on a single line in an XFCE4 Launcher:
xterm -e su -c 'for i in 0 1; do
echo -n "0:7" > /proc/acpi/processor/CPU$i/limit;
done;
/opt/ati/bin/aticonfig --set-powerstate 1'
# This is really maximal throttling state for my machine
|
TODO: play around with acpi scrips in Gentoo's package set
wmacpi wmacpiload-ac wmacpimon
acpi
gkrellm gkacpi (for this package add FontPath "/usr/share/fonts/libdockapp-fonts" in xorg.conf)
acpi_available
acpi_listen
Kernel configuration
Code listing 4.7: |
--- Power Management support
[*] Legacy Power Management API
[ ] Power Management Debug Support
[ ] Software Suspend
ACPI (Advanced Configuration and Power Interface) Support --->
APM (Advanced Power Management) BIOS Support --->
CPU Frequency scaling --->
[*] ACPI Support
[*] Sleep States
[ ] /proc/acpi/sleep (deprecated)
<*> AC Adapter
<*> Battery
<M> Button
<M> Video
< > Generic Hotkey (EXPERIMENTAL)
<M> Fan
<M> Processor
<M> Thermal Zone
<M> IBM ThinkPad Laptop Extras
(0) Disable ACPI for systems before Jan 1st this year
[ ] Debug Statements
<M> ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)
# TODO what is ACPI0004 Containter Driver for?
[*] CPU Frequency scaling
[ ] Enable CPUfreq debugging
<*> CPU frequency translation statistics
[ ] CPU frequency translation statistics details
Default CPUFreq governor (userspace) --->
<*> 'performance' governor
<*> 'powersave' governor
--- 'userspace' governor for userspace frequency scaling
<*> 'ondemand' cpufreq policy governor
<*> 'conservative' cpufreq governor
--- CPUFreq processor drivers
<M> ACPI Processor P-States driver
<*> Intel Enhanced SpeedStep
--- Built-in tables for Banias CPUs
|
Radeon powersaving states
/opt/ati/bin/aticonfig --lsp
Shows powersaving states:
Code listing 4.8 |
core/mem [flags]
-----------------
1: 128/135 MHz [low voltage]
2: 324/135 MHz
* 3: 398/324 MHz [default state]
|
Set the powerstate:
/opt/ati/bin/aticonfig --set-powerstate 1
Setting powerstate 2, just does what it should, but 1 gives:
Code listing 4.9 |
core/mem [flags]
-----------------
1: 128/135 MHz [low voltage]
* 209/135 MHz [low voltage]
2: 324/135 MHz
3: 398/324 MHz [default state]
|
Automating Powermanagement using laptop-mode
Code listing 4.10: PCI bus info: lspci -v |
|
Code listing 4.11: Kernel configuration .config |
|
TODO: create different runlevels and scripts?
I want switch the following:
video card powerstate,
cpu frequency governor,
hard-disk spin-down (SATA driver doensn't support it yet)
screen blanking and screen powerdown.
Configuration files:
/etc/laptop-mode/laptop-mode.conf
/etc/laptop-mode/batt-start/batt-start
/etc/laptop-mode/batt-stop/batt-stop
Hard-disk spindown:
from here I learned...
Desktop hard drives are usually rated for only 40,000-50,000
spinups, and one spinup every 10 minutes will kill your
40,000-spinup HD in 277 days. So this is NOT recommended for
server use, unless you increase the spinup interval
dramatically, to say once every hour or two. Laptop hard
drives are usually rated for around 300,000 spinups, so those
will last about 2083 days or 6 years if you have them powered
on 24-7.
IBM Thinkpad specific tools and tweaking
tpb = ThinkPad Buttons utility
Code listing 4.12: |
tpb --verbose --thinkpad="/usr/bin/xterm"
|
Code listing 4.13: |
Character devices
/dev/nvram support
|
Code listing 4.14: |
tpb --verbose --thinkpad="/usr/bin/xterm"
|
tpctl = ThinkPad Control utility
BTW, I installed the ibm_acpi RPM, added it to /etc/modprobe.preload,
and now I have direct access to many of the Thinkpad's internal
functions directly through /proc/ibm. Neat!
IBM-ACPI Kernel driver
Code listing 4.15: |
Kernel configuration
Powermanagement
ACPI Support
IBM Thinkpad laptop extras
|
UltraBay hotswapping
Hotswap not supported yet stable in 2.6.17 kernel it seems.
5. Gentoo Optimization
The default swappiness is 60. A value of 0 gives something
close to the old behavior where applications that wanted
memory could shrink the cache to a tiny fraction of RAM
For laptops which would prefer to let their disk spin down,
a value of 20 or less is recommended.
As a sysctl, the swappiness can be set at runtime with
either of the following commands:
Code listing 5.1: |
sysctl -w vm.swappiness=30 echo 30 >
/proc/sys/vm/swappiness
|
The default when Gentoo boots can also be set in
/etc/sysctl.conf.
vm.swappiness = 30
Configuration files:
/etc/make.conf
|