On an IBM X31 laptop I want to use a Debian sarge, along with many 'testing' packages, under optimized kernels (fast and lean).
I use it since mid-december 2003 w/o any problem not related here, but your mileage may vary. If you are not experimented please DO NOT use this material (use Ubuntu). If you are a beginner buy a Knoppix CD (Ikarios is a reseller in Europe).
This document evolves, please refer to URL instead of copying it. If you copy a part of in it state the complete URL leading to it (http://www.makarevitch.org/debian/kernel_2.6.html)
Please do not send any trivial question to me, I just cannot take time to tackle your problems but you may use the Linux31 mailing list (if you have interesting material please publish it there)
keycode 234 = Escape keycode 233 = Control_R add Control = Control_RThe backspace key location is weird, one has to set the 'DontZap' option in the X server's configuration in order to avoid killing it unintentionally. The X31 keyboard puts the X on X :-)
The spacebar re-insertion in the keyboard proves to be very difficult.
fetch the driver on the Smlink site (not tested here. An older version worked under 2.4 but impeded kernel stability). After 2.6.5 the modem chip seems recognized by the snd_intel8x0m driver but I did not test it.
Install the 'sl-modem-source' and 'sl-modem-daemon' packages, then compile a kernel and use 'module-assistant -f a-i sl-modem')
The 'sl' driver was not very stable. apparently this is fixed after 2.6.7. One may use the snd_intel8x0m kernel module instead
Detail: the 'sl' driver used to (after being used for approx 30 minutes) freeze 2.4.2x kernels and also freezes 2.6.5. This may be related to some APM event. You may try 'apt-cache search slmodem' to limit the bad effects of any crash I let all filesystems mounted in 'sync' mode while using it. Example (root fs):
mount -o remount,sync / (use the slamr module and slmodemd deaemon) mount -o remount,async /
There was a bug in the USB driver, fixed in Linux 2.6.5
Detail: when I plug an USB memory stick the EHCI (USB version 2) driver sometimes hangs the kernel.
Explanation (thx to Dimitris Kogias): the EHCI driver doesn't like suspend/resume cycles. Linux 2.6.5 fixes this problem.
Not using the EHCI driver is not a workaround because it considerably
reduces the transfer rate of the USB port (no more USB version 2.0!).
adding the appropriate apmd suspend/resume scripts ('modprobe [-r] ehci_hcd' for APM events 'suspend or standby' and 'modprobe ehci_hcd' when resuming) is not sufficient because it does not fix the X problem.
USB peripherals used: Genius and Logitech mice, Logitech Quickcam, low-end Epson scanner, i-Bead
Simplified version: when a running software need work memory (RAM!) the
kernel must recover some occupied RAM. For this it can throw away (forgot)
a piece of cache or store (on virtual memory) some data sleeping (not
frequently used) in RAM, effectively freing. But any choice can be
expensive a few seconds later, if the very cache content which was thrown
away is requested by a program (implying a real disk read) or a program
accesses to the very data stored on virtual memory.
As root you can give a hint to the kernel by placing a value into /proc/sys/vm/swappiness.
I experimented a -ck (Con Kolivas) kernel but after a few hours and/or some APM events it was not as snappy under loads than a standard kernel (the mouse cursor was stuck for a few seconds).
(Linux 18.104.22.168) For network QoS (with the 'wondershaper' Debian package) I
used the 'CPU cycle counter' as a packet scheduler clock source
(CONFIG_NET_SCH_CLK_CPU, in "Device Drivers"/"Networking
support"/"Networking options"/"QoS and/or fair queueing"). It does NOT work
properly whenever the CPU frequency changes but I don't care as it only
changes when the laptop is not plugged in (for power), which in most cases
implies that it is not plugged to any nw.
I experienced a complete freeze when invoking 'wshaper.htb eth0 102400 102400 (the 'M' in '100Mbps' is expressed at a power of two, therefore 100Mbps are 102400Kbps), may be related to the fact that the sound chip was active.
Install the laptop-mode-tools and check that /proc/sys/vm/laptop_mode contains '0' when the power line is plugged and '2' when the laptop runs from battery power.
APM (I don't use ACPI nor suspend-on-disk), using this APM script (name it /etc/apm/scripts.d/ibmx31):
#!/bin/sh # this is /etc/apm/scripts.d/ibmx31 #flush all caches sync /sbin/hdparm -f /dev/hda sync ; sync ; sync # ;-) /sbin/hdparm -f /dev/hda case "$1" in suspend|standby) rmmod psmouse #USB resume. it is useles under 2.6.5 (and above) #modprobe -r ehci_hcd #paranoid mode implies no write-back cache nor IRQ unmasking #to be pretty sure that we will resume gracefully. #on some laptops this helped me to overcome some random problems during the #awakening process, especially after a suspend made during a disc I/O. #dunno if the X31 can live w/o that /sbin/hdparm -W0 -u0 /dev/hda #I often resume in a new network context but don't want to restore a #parameter (IP, gateway...) which may be inadequate locally and therefore #cause some glitch (for example triping a NIDS) ifdown eth0 # Wifi adapter ifdown eth1 rmmod ipw2100 ;; resume) modprobe psmouse #restoring the HD parameters /etc/init.d/hdparm restart #USB resume. it is useles under 2.6.5 (and above) #modprobe ehci_hcd ;; esacThen symlink it appropriately:
chmod +x /etc/apm/scripts.d/ibmx31 cd /etc/apm/event.d ln -s ../scripts.d/ibmx31
XFree (with or w/o hardware-assisted OpenGL (GL))
No Suspend to Disk, Bluetooth, IrDA nor FireWire (I don't use them for now) but the necessary modifications in the kernel config are AFAIK easy
According to Kevin Krause: suspend to disk works under APM. created a partition (Type 16), formatted as FAT12, made a hibernation file using tphdisk, rebooted, pressed Fn+F12
Compact Flash: invoke 'modprobe ide_cs'. not tested.
I2C and I2O seem useless
ATAPI: here my /etc/hdparm.conf
(-A1 -c3 -d1 -m16 -u1 -W1 -X69)
hdparm -t: approx. 25 MB/s
hdparm -T: approx 650 MB/s
amixer set 'Line Jack Sense' off amixer set 'Headphone Jack Sense' off alsactl storeA properly configured kernel (the configuration published in this document does the job) can automagically load the necessary module(s) whenever you access to a given special file (something in /dev/, tied to some kernel code). The '/etc/modprobe.conf' file stores the nitty gritty details: what module must be loaded but also how (load order, parameters passed ...).
/etc/modprobe.d/thinkpad. You may install it then run (as root) 'update-modules' (the 'vmmon' module is for VMWare)
Some driver codes are built inside the kernel because I always use them
on my box I mainly edited /etc/apt/sources.list in order to fetch at least
the 'stable' and 'testing' packages.
in France (metro) on my particular site it leads to this content (do not copy it, please adapt it for example by using apt-spy):
#stable deb http://security.debian.org stable/updates main contrib non-free deb http://ftp.fr.debian.org/debian-non-US stable/non-US main contrib non-free deb http://ftp.fr.debian.org/debian stable main contrib non-free #sarge deb http://security.debian.org sarge/updates main contrib non-free deb http://ftp.fr.debian.org/debian-non-US sarge/non-US main contrib non-free deb http://ftp.fr.debian.org/debian sarge main contrib non-free #testing deb http://security.debian.org testing/updates main contrib non-free deb http://ftp.fr.debian.org/debian-non-US testing/non-US main contrib non-free deb http://ftp.fr.debian.org/debian testing main contrib non-free # unstable deb http://ftp.fr.debian.org/debian-non-US unstable/non-US main contrib non-free deb http://ftp.fr.debian.org/debian unstable main contrib non-freeThen I invoked:
$ apt-get update $ apt-get install -t apt testing kernel-image-2.6.6-1-686 hotplug \ kernel-doc-2.6.6 kernel-source-2.6.6 fxload ifrename coreutils \ fileutils initrd-tools module-init-tools kernel-package \ libncurses5-dev locales manpages-dev gcc-3.3 gcc-3.3-base gcc make \ binutils procps e2fsprogs nfs-common nfs-kernel-server binutils-doc \ cpp-doc cpp-2.95-doc e2fsck-static autoconf automake1.8 libtool flex \ bison gcc-doc laptop-mode-tools
* */5 * * * ~/bin/utis/auto-rmmod.sh 'ci_hcd\|hid\|psmouse\|vm'Note: 'vm' is for VMWare (if you don't know what it is just neglect it, use the proposed line)
In order to open terminals: xterm, rxvt.. you need the 'devpts' driver in
the kernel. It is now mounted by /etc/init.d/mountvirtfs (installed by the
Note: it used to be mounted by /etc/init.d/devpts.sh which was in the 'libc6' package
'sysfs' is mandatory
My /etc/fstab contains:
tmpfs /dev/shm tmpfs defaults,nosuid,nodev,size=128M,noatime 0 0 sysfs /sys sysfs default 0 0 none /proc/bus/usb usbfs defaults 0 0Note: 'usbdevfs' (for 2.4 kernels) is obsolete (albeit recognized by 2.4.26) and replaced (on 2.6) by 'usbfs'
The new kernel modules suffix is '.ko'. To load a module use 'modprobe' instead of 'insmod'
kernel: warning: process `update' used the obsolete bdflush system call kernel: Fix your initscripts?
Here is my interrupt lines setup:
root@nataf:~ # cat /proc/interrupts CPU0 0: 587939841 XT-PIC timer 1: 676437 XT-PIC i8042 2: 0 XT-PIC cascade 5: 1463100 XT-PIC Intel 82801DB-ICH4 Modem, yenta, Intel 82801DB-ICH4 7: 3587327 XT-PIC parport0 8: 28 XT-PIC rtc 9: 329034 XT-PIC uhci_hcd:usb1, uhci_hcd:usb3, yenta 10: 3443786 XT-PIC uhci_hcd:usb2 11: 42439627 XT-PIC ehci_hcd:usb4, eth0 12: 897852 XT-PIC i8042 14: 4025735 XT-PIC ide0 NMI: 0 ERR: 0
Invoke 'dpkg-reconfigure xserver-common' and set the X server niceness to 0
To use an OpenGL-enabled server: use my kernel config and load some pertinent kernel modules (agpgart, i830, intel_agp, radeon), for example by putting their names in /etc/modules.
Launch X. Remember that you need DRI, therefore as long as you get:
root@nataf # grep -i 'Direct.*rendering' /var/log/XFree86.0.log (II) RADEON(0): Direct rendering disabledyou are stuck.
root@nataf # grep -i drm /var/log/XFree86.0.log [ ... blah ... ] (II) RADEON(0): [drm] Initialized kernel agp heap manager, 5111808And must be able to read '/dev/dri/card0'.
Invoke 'glxinfo |grep -i renderer' which produces here:
"OpenGL renderer string: Mesa DRI Radeon 20020611 AGP 1x x86/MMX/SSE NO-TCL"
the total memory footprint of GL (on top of XFree's footprint) is, under use, approx 11 MB
xengine ticks at approx 14800 RPM
Related problem: I use an (external) USB mouse. The X Window server
(xfree) does looses it after each (unplug-plug) or (APM suspend-resume)
Solution: declare 'X11_USBMICE_HACK=true' in '/etc/default/hotplug' and use at least a 2.6.5 kernel (or 2.6.4 patched with http://www.clarkson.edu/~evanchsa/software/kernel/patches/usb_resume-2.6.4.patch)
Using the old XFree86-debug server (XFree86 Version 22.214.171.124 (Debian (static) 4.3.0-0woody4+4.0pre1v3 20031004135351 rnolden@) and Xorg 6.8.
DRI et GLX are working (thx to Mathias Brossard!)
Use the appropriate conf file: XF86Config-4 or xorg.conf.
Then invoke "X :1 -layout dualhead" to obtain a dual-headed server
[server-Xdualhead] name=Double affichage pour videoprojecteur command=/usr/X11R6/bin/X -layout dualhead -audit 0 flexible=trueHere is Dom's gdm.conf.
To obain a new Xinerama visual invoke 'gdmflexiserver' (under KDE, menu K -> System -> New connection)
Debug 4.1 server w/o fb and the DRM driver: GLX works but glxgears peakses at 320 FPS and drains all the CPU power: it is in fact done by MESA (soft GLX emulation), as revealed by invoking 'glxinfo|grep -i mesa'. I need to put the hardware at work, therefore this is not adequate :-(
There is a fglrx-glc22-4.3.0-3.2.8 X server downloadable from ATI website. It is an alien'isable RPM but its content (for example /usr/X11R6/lib/libGL.so.1.2) conflicts with useful other things and I don't want to uninstall completely XFree to let it run
I then installed a 4.3 server (apt-get -t experimental install xserver-xfree86, which now installs 'xserver-xfree86_4.3.0-0pre1v4_i386'), w/o fb. it speeds the thing up (xengine reaches 7100+ RPM) but OpenGL is not there, even w the DRM and export MESA_FORCE_SSE=1, even with the XFree 'ati' (instead of 'radeon') driver (glxgears just hangs and stays black as soon at it is mapped, the complete server does not react to mouse or kbd events albeit the mouse cursor moves as I fiddle with the mouse)
xserver-xfree86_4.3.0-0pre1v4_i386 w/o the DRM and any GLX declaration in
the XF86Config-4 works fine. no GLX but the speed seems ok (xengine ticks
at 4500 RPM) and the working set is 28 MB (approx 21MB shared), therefore I
keep this setup.
'vga=0x314' is ok for me
Here is my .config, check the version (comment at the top).
BEWARE: install (make modules, GRUB/LILO ...) this new kernel w/o destroying the old (working) modules or kernels files (or the corresponding declarations in the LILO/GRUB config files)
OPTIONS="-q -p 200 -u 60 -l 40"5 times per second (200 millisec) the CPU frequency is raised to the max if the load is above 60% and reduced by 100 MHz if it is below 40%
# watch grep '^cpu.MHz' /proc/cpuinfo
Dunno, for now, if it is useful. let me know
Jaime Towns documents this as follows:
For example, you can enable "Press to select" which lets you press on the trackpoint, which emulates a mouse button (you now have four buttons in total!) If you compile the patch as a module, try adding the following to /etc/modprobe.conf:
options psmouse speed=120 sens=240 pts=1then:
modprobe -r psmouse (to remove the module) modprobe psmouse (to insert the module again, with the new parameters)Here is a Documentation
I don't use it as a module - I just modify the defaults in the patch (near the bottom of the patch) and compile them into my kernel.
I use the Wi-Fi adapter as eth1. In order to only enable it when needed I disabled it at boot time by adding to the /etc/modprobe.d/blacklist (and /etc/hotplug/blacklist ?) file a line containing 'ipw2100'.
On WEP mode the /etc/network/interfaces (used to activate the interface with 'ifup') file is something along those lines:
iface eth1 inet dhcp pre-up DO SOMEHTING HERE IN ORDER TO BRING YOUR FIREWALL UP pre-up modprobe ipw2100 pre-up iwconfig eth1 key PutYourWEPKeyHere open # 'open' or 'restricted' up iwconfig eth1 essid PutYourESSIDHere down ifconfig eth1 down down rmmod ipw2100For WPA (more secure than WEP) you will need the 'wpasupplicant' (probably in 'testing' instead of 'stable') and a /etc/network/interfaces:
iface eth1 inet dhcp pre-up DO SOMEHTING HERE IN ORDER TO BRING YOUR FIREWALL UP pre-up modprobe ipw2100 pre-up /usr/sbin/wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf -Dwext down ifconfig eth1 down down rmmod ipw2100Don't forget to set adequate parameters in /etc/wpa_supplicant.conf