Sharedwww / t42p / :Open in CoCalc
<html>
<title>Debian GNU/Linux on a Thinkpad T42p</title>
</html>

<body>
<h1><font color="#990101">Debian GNU/Linux on a Thinkpad T42p</font></h1>
<h2><a href="/">William Stein</a></h2>

<h3>Configuration</h3>
I purchased a Thinkpad T42p for $2389 through Harvard's
educational discount program:
<br><br>
<table align=center width=70% border=1 cellpadding=10 bgcolor="#FFFFDD">
<tr><td>
<ul>
<li> Thinkpad T42p 2373
<li> 15 inch 1600x1200 flexview display 
<li> 1.8Ghz "Dothan" Pentium-M 745 processor 
<li> 1GB RAM internal (leaving one slot free)
<li> 128MB ATI Mobility FireGL T2
<li> 802.11 a/b/g 
<li> Two USB 2.0 ports
<li> Gigabit ethernet 
<li> 60GB 7200RPM drive
<li> Nine-cell long-life battery
</ul>
</td>
</tr>
</table>
<br>
I've owned a 2Ghz Thinkpad T30, a 1.6Ghz T40, and now this T42p.  The
T42 weighs less than the T30, and in size is somewhere between the T40
and T30.  It's thinner than the T30, but wider.  The T42p is definitely
noticeably larger than the T40, but not much heavier (I think it's
just over a half pound heavier).

<p>This page records some of my thoughts and experiences using the T42p with
Linux.  It is not supposed to be a systematic Debian installation guide.

<p>My T42p is currently running Linux Kernel 2.6.6, which I downloaded from www.kernel.org, and was the only kernel version in which I could
get everything working that I need.
Here is <a href="config">my configure file.</a>

<h3>Other Pages</h3>
There are several other pages on installing Linux on the T42p:
<ul>
<li><a href="http://toys.lerdorf.com/archives/22_IBM_Thinkpad_T42p.html">Lerdorf's page</a> is a short diary about installing <i>Debian</i> on his T42p.
<li> <a href="http://www.icemark.net/beh/misc/T42P/">Heinen's page</a> is
about installing and configuring <i>Debian</i> on the T42p.
<li> <a href="http://pmw.org/~gardnerj/Thinkpad/Install.html">Gardner's page</a> is a fairly complete discussion of installing <i>Fedora Core 2</i> on a T42p.  He emphasizes fixes for a major bug.
<li> <a href="http://www.flaminglunchbox.net/articles/GentooOnT42P.html">This</a> was an article on installing <i>Gentoo</i> on the T42p, but it disappeared, so
here is a <a href="gentoo.html">local copy of the google cache of that page</a>.
<li> <a href="http://www.stanford.edu/~sanjiv/thinkpad/thinkpad.html">Sanjiv's page</a> is a systematic discussion of installing
<i>Fedora</i> on a T42 (not the T42p).
</ul>


<h3>Unresolved Problems</h3>
If you have any idea how to solve one of these problems, or you do
not have the same problem with whatever Linux distribution you are
using, <a href="mailto:[email protected]">please send me an email</a>.
<ul> 

<li> After swsusp2 hibernate the e1000 ethernet card doesn't work.  Removing
(by using "modprobe -r e1000") first sometimes fixes the problem, but
<i>sometimes it doesn't</i>.


<li> The built-in mouse doesn't work at all if I boot the computer
up with the USB mouse plugged in.  The problem vanished
when I tried [other guy's] kernel config, so perhaps
it's an ACPI vs apm issue.  It might also have gone away
now that I've switched to fglrx?

<li> Printing graphics is very slow. (This means nothing to
anyone but me, since you don't know what printer I have, etc.)

</ul>

<h3>Swapping the Hard Drive</h3>
The first thing I did when I got the T42 was physically swap its 60GB 7200RPM drive
with the 80GB 4800RPM drive in my old T40.  I did this by removing one screw that
holds each hard drive in place, flipping the laptops upright, sliding the drives out, swapping
the mounting brackets, and reinserting.  Note that the mounting brackets <i>look</i>
like they are screwed on, but are not; you just pop them on and off. 
I swapped the drives because I had Debian Linux already installed on the 80GB drive,
and I prefer 80GB to 60GB.  The output of hdparm says that the 80GB drive is plenty fast
<pre>
      sh-3.00# /sbin/hdparm -t /dev/hda1
      /dev/hda1:
      Timing buffered disk reads:   92 MB in  3.06 seconds =  30.08 MB/sec
</pre>

<h3>Very Informal Benchmarks</h3> 

I ran some benchmarks that matter to <i>me</i> with the computer
algebra system MAGMA doing the sort of calculations I do in my
research.  The 1.8Ghz T42p is currently the fastest single processor
machine I have at this benchmark, just barely beating any single processor of
<a href="/meccah">my Athlon 2800MP cluster</a>.  The Athlon 2800MP's are
clocked at just over 2.1Ghz, so that's not bad. 

<h3>Battery</h3> 

Using the 9-cell battery, with the video brightness set at minimum and
"normal usage", gives me about 4 hours battery life (at least when I
boot up on battery power, so the processor is at its slowest speed).
This is about an hour less than my 1.6Ghz T40 would get with exactly
the same battery.  I get just over one hour from 10-month-old my old
6-cell battery, which suggests the 6-cell battery is "worn out".

<h3>Speedstep</h3> 
Michael Clark created <a href="cupfreq-speedstep-dothan-1.patch">a
patch</a> against kernel 2.6.7 that adds speedstep support for
Pentium-M Dothan processors (it also depends on <a href="http://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.7/2.6.7-mm6/broken-out/bk-cpufreq.patch">bk-cpufreq.patch</a>.  
(Michael has also "ported it to 2.6.8-rc3 on top of the 2.6.8-rc3-mm1 cpufreq
patch (these are probably the preferred ones to link too):"
<a href="http://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8-rc3/2.6.8-rc3-mm1/broken-out/bk-cpufreq.patch">bk-cpufreq.patch</a> and
<a href="http://gort.metaparadigm.com/cpufreq/cpufreq-speedstep-dothan-3.patch">cpufreq-speedstep-dothan-3.patch</a>.

<p>Before Michael's patch came out,
I read some of the code of <pre>
/usr/src/linux-2.6.6/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
</pre> 
and rewrote it so that it would work with my processor.  After Michael
sent his patch (which is only to 2.6.7), I corrected the voltages in
<a href="speedstep-centrino.c-version_2.6.6">my 2.6.6 version 
of speedstep-centrino.c</a>.  My 2.6.6 version only adds support
for 1.8GHz Dothan, and nothing else.

<p>For whatever reason cpufreqd
doesn't seem to work for me.  However, directly echo'ing speeds into
<tt>/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq</tt> and
<tt>/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq</tt>
<i>does</i> work for me, and that's enough because it means
I have control (I can make a command or icon that speeds up or
slows down my computer).
For example, to set the computer at maximum:
<pre>
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
</pre>
And, to set it at minimum speed:
<pre>
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
</pre>

<b>Here are some earlier remarks I had about issues with using speedstep.</b>

<p>So far I have not been able to get speedstep_centrino working at
all. If I start the T42p not plugged in, then it runs at 600Mhz, and
will not change speed not matter what unless it is rebooted (or
hibernated).  If I start it up plugged in, then it runs at 1.8Ghz no
matter what, even if I subsequently unplug it.

This is the error I get when trying to use speedstep-centrino:
<pre>
  modprobe -v speedstep-centrino
  insmod /lib/modules/2.6.6/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko
  FATAL: Error inserting speedstep_centrino (/lib/modules/2.6.6/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko): No such device
</pre>

<a href="http://www.ccd.uab.es/~jordicj/linux/inspiron510m.php3">This web 
page</a> discusses a fix.  Here's a verbatim copy of the relevant section
of that web page:
<table align=center width=70% bgcolor="#EEEEEE" cellspacing=20 cellpadding=5><tr><td>
With the kernel 2.6.6 provided by Fedora Core 2 the
"speedstep-centrino" module exits with error "Found unsupported
speedstep CPU". I downloaded the last kernel from Fedora and too
downloaded the last sources (2.6.7) from <a
href="http://www.kernel.org"> kernel.org </a> but I had same
results. Next I email to people that contribute to do this module, but
they didn't give me any immediatly solution. The problem was that
without this module is impossible to throttle the CPU frequency, an
important feature on a mobile system.

<p>
A month later, googling, I found a message in a forum about a person
that had the same problem and that had correct it changing from the
file speedstep-centrino.c of the linux kernel the ".x86mask" assigned
for Dothan CPU. In this file the mask assigned is 1, but according to
the information of /proc/cpuinfo the mask would be 6. This is my CPU
info:

<p>
<font face="Courier">
processor	: 0<br>
vendor_id	: GenuineIntel<br>
cpu family	: 6<br>
model		: 13<br>
model name	: Intel(R) Pentium(R) M processor 1.70GHz<br>
stepping	: 6<br>
cpu MHz		: 1698.751<br>
cache size	: 64 KB<br>
fdiv_bug	: no<br>
hlt_bug		: no<br>
f00f_bug	: no<br>
coma_bug	: no<br>
fpu		: yes<br>
fpu_exception	: yes<br>
cpuid level	: 2<br>
wp		: yes<br>
flags		: fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush<br>
dts acpi mmx fxsr sse sse2 ss tm pbe tm2 est
bogomips	: 3375.10<br>
</font>

<p>
Using 2.6.7 kernel sources I modified the "speedstep-centrino.c". This
is the original code:

<p>
<font face="Courier">
static const struct cpu_id cpu_id_dothan_a1 = {<br>
        .x86_vendor = X86_VENDOR_INTEL,<br>
        .x86 = 6,<br>
        .x86_model = 13,<br>
        .x86_mask = 1,<br>
};<br>
</font>
<p>
And the modified code:
<p>
<font face="Courier">
static const struct cpu_id cpu_id_dothan_a1 = {<br>
        .x86_vendor = X86_VENDOR_INTEL,<br>
        .x86 = 6,<br>
        .x86_model = 13,<br>
        .x86_mask = 6,<br>
};<br>
</font>

<p>
Then I recompiled the linux kernel and the "speedstep-centrino"
recognized my CPU and permits to throttle it's frequency, and
therefore saves up battery and reduce temperature.
</td></tr></table>

<h3>Video</h3>
I had a huge amount of trouble getting the fglrx modules working!
This seems to work for me:
<ol>
<li> Download <a href="fglrx-4.3.0-3.9.0.i386.rpm">this RPM</a> 
directly from ATI for XFree 4.3.0.
<li> Use alien to make <a href="fglrx_4.3.0-4.9_i386.deb">this deb package</a>.
<li> Install the deb.
<li> Build the tainted kernel modules:
<pre>
 cd /lib/modules/fglrx/build_mod
 source make.sh
 cd ..
 source make_install.sh
</pre>
This works perfectly for me with kernel 2.6.x...

<li> But here's where it was really complicated for me personally.  I
had install the xfree86 dri trunk, which makes copies of all the
modules and puts them in /usr/X11R6/lib/modules-dri-trunk/... instead
of /usr/X11R6/lib/modules, which is where the the ATI package puts
them.  Also, for some reason I had fglrx modules in my dri-trunk
version, but those were too old and didn't support my laptop's very
new display.  Not knowing all this, I kept getting tons of errors when
trying to start X (no device found).  So I moved modules-dri-trunk to
modules-dri-trunk.orig and made a symlink from modules to
modules-dri-trunk.  Really I should track down the config file that
points to modules-dri-trunk

<li> Run fglrxconfig to get an XF86Config file.
<li> It works wonderfully.  I have very very very fast 3d graphics, etc.
<li><b>However,</b> swsusp or changing to a text console freeze the
computer when 3d acceleration is enable.  I commented out the 
following lines in XF86Config-4 and swsusp works again, but
of course I have no 3d graphics.  Until this is resolved, if I need
3d graphics, I'll restart X with these extensions enabled.
<pre>
#    Load        "dbe"  	# Double buffer extension
#    Load        "glx"   # libglx.a
</pre>
(Note: I don't know if turning off dbe was necessary.)
</ol>
<b>**BIG WARNING**:</b> The free open source radeon driver "works" with
this laptop.  However, while using it I had literally dozens of
"random" complete freezes of my laptop.  It cost me many hours
to determine the source of the freezes, since there were almost
no clues.  



<h3>Power Management</h3>
I am using APM instead of ACPI.  I would like to use ACPI since APM
is quickly becoming legacy, but I've had serious issues I couldn't
resolve with swsusp2 and ACPI.  For example, removing the usb_uhci
module during swsusp2 suspend crashes the system.  Etc.  

Pressing Fn-F4, which is for apm suspend, causes the laptop
to sort of suspend.  However, the moon light blinks and the laptop
sort of just sits there.  I wish there were a way to disable 
suspend on Fn-F4, since I might accidently hit it. 

Pressing Fn-F3 to blank the screen works perfectly (as long as I
don't accidently bump Fn-F4). 

<h3>Linux Suspend to Disk (Hibernate): swsusp2</h3> 

I have APM and swsusp2 working well, and am able to suspend and resume
even under X11 while using the ATI drivers (but only with 3d
acceleration support off, by removing the glx option from XF86Config).
I have 1GB RAM and a smallish 1GB swap partition, so I'm happy this
actually works, but it does work, and well.

<ol>
     <li> Installed plain vanilla kernel 2.6.6, so I could
        patch it, since the swsusp2 patch didn't work for
        me with Debian kernel 2.6.6.
     <li> I installed swsusp2 for kernel 2.6.6
     <li> I had to remove the CONFIG_REGPARM from kernel config file,
so my <tt>.config</tt> now says
<pre>
           # CONFIG_REGPARM is not set
</pre>
If I didn't do this, then I got errors about stuff not matching on
resume from hibernate.   I also had this problem:
<pre>
5.16 I've suspended and resumed and now I can't open new X
applications and my /tmp directory is empty (on Debian)
       
A recent version of the initscripts package decided to blow
away temporary directories when calling mountnfs.sh (See Bug
#227112). The simple solution is to remove mountnfs.sh from your
SWSUSP_STOP_SERVICES_BEFORE_SUSPEND in /etc/suspend.conf and add your
extra NFS mounts into SWSUSP_UMOUNTS.
</pre>
</ol>

<h3>Getting Software to suspend to work with kernel 2.6.7</h3>
So far I haven't succeeded.  Here are some notes about my attempts.

<p>I patched kernel 2.6.7 with
<pre>
<a href="software-suspend-2.0.0.102-for-linux-2.6.7.tar.bz2">software-suspend-2.0.0.102-for-linux-2.6.7.tar.bz2</a>
</pre>
When I first tried to compile, I had configured the swsusp2 to
not include debugging print support, since I thought I didn't
want that.  I could <i>not</i> get the kernel to compile; there
were many small problems I fixed, but they all were related to
avoiding the debug output.  So I included debug support (by
setting that option in "make xconfig"), and the kernel compiled.

<p>All that said, I still had problems trying to compile. 
There was an error compiling 
<pre>
/usr/src/linux/arch/i386/power/suspend2.c
</pre>
but I was able to fix it by putting
<pre>
#ifdef CONFIG_SMP
</pre>
at the  beginning of <tt>smp_suspend2_lowlevel(void* info)</tt>
and #endif at the end of that function.  I don't understand why
smp_suspend2_lowlevel has to be defined if CONFIG_SMP is not set.

<p>Anyway I can compile as modules, but it cancels suspend.
If I use an initrd (as instructed), then it fails on boot.
If I compile swsusp2 into the kernel (not as a module), then
the kernel crashes on boot.  

<h3>Wireless Networking</h3>
I installed the madwifi drivers from CVS source:
<pre>
cvs -z3 -d:pserver:[email protected]:/cvsroot/madwifi co madwifi
cd <a href="madwifi">madwifi</a>
make
(as root) make install
</pre>

These don't work for me, in sense that freezes at ifconfig ath0 up.
However, I got it to work by using 
<a href="http://sourceforge.net/mailarchive/forum.php?thread_id=4384086&forum_id=33958">this remark</a>.
The ifplugd was causing a kernel fault!  So I had to turn of ifplugd
for the ath0 interface:
<pre>
form:~# more /etc/default/ifplugd    (after I edited it!)
INTERFACES="eth0"
#HOTPLUG_INTERFACES="all"
HOTPLUG_INTERFACES=""
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"
</pre>
Notice that now I'll need to explicitly add any hotplug interfaces
I might use. 

<h3>Thinkpad Buttons</h3>
I installed the tpb package:
<pre>
   apt-get install tpb
   chmod a+rw /dev/nvram
</pre>
To start it I use this script:
<pre>
#!/bin/bash
exec tpb --osd=on --verbose --thinkpad="/usr/bin/konqueror" --wireless="/usr/bin/konsole -e /home/was/bin/hibernate" &
</pre>
I have a script with those lines in my <tt>.kde/Autostart</tt> folder.

<h3>Miscellaneous Software</h3>
<ul>
<li> mplayer: I installed mplayer using debs <a href="http://hpisi.nerim.net/">from here</a>.
I also changed vo to vo=xv in /etc/mplayer/mplayer.conf
since xv rendering is *vastly* faster.

<li>kismet:
   I installed it using 
<pre>
        apt-get install kismet
</pre>
   I also installed 
<pre>
        apt-get install festival
        apt-get install ethereal  
</pre>
   in order to get nice things and libwiretap, which kismet needs.

   In /etc/kismet/kismet.conf I put
<pre>
   #source=cisco,eth0,ciscosource
   #source=madwifi_b,ath0,athsource
</pre>
   I created an application on the desktop that launches kismet as root.

I also had problems with excessive loging by wireless drivers.
Solution: I commented out line 4028 of 
<pre>
/usr/src/modules/linux-wlan-ng-0.2.1pre21/src/prism2/driver/

	/* WLAN_LOG_WARNING("Implement me.\n"); */
</pre>

<li>Correct DPI with KDM.  I changed /etc/kde3/kdm/Xservers as follows:
<pre>
       ::0 [email protected] /usr/X11R6/bin/X -nolisten tcp vt7 -dpi 120
</pre>
Note the added dpi option. 

<li>VMware.

swap caps and ctrl in windows xp (under vmware, though not relevant):

To do this requires some registry hacking. Run regedit and burrow down to 

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

Here you need to add a binary entry called Scancode Map with a value of 00000000 00000000 03000000 3A001D00 1D003A00 00000000.

</ul>

<h3>Freezing ssh shells</h3>
I have a comcast cable modem, and my ssh shells freeze regularly, without
lots of network activity.  This is extremely annoying.  Anyway, the 
following is a workaround for an openssh2 client.  Add to 
/etc/ssh/ssh_config
<pre>
   ServerAliveInterval 20
   ForwardX11 yes  #also useful
</pre>

<h3>My Sprint USB Sanyo 4900 Phone</h3>
<ol>
  <li> Compiled CONFIG_USB_ACM=m the acm.o module.
      (Selected this in the USB section, near the middle.)
  <li> modprobe acm
  <li> Plugin phone:
<pre>
May 29 16:40:01 localhost kernel: Product: SANYO USB Phone
May 29 16:40:01 localhost kernel: SerialNumber: Serial Number
May 29 16:40:01 localhost kernel: ttyACM0: USB ACM device
May 29 16:40:01 localhost default.hotplug[3190]: arguments (usb) env (DEVFS=/proc/bus/usb OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug HOME=/ SHLVL=2 DEVICE=/proc/bus/usb/003/003 PRODUCT=474/701/0 TYPE=2/0/0 DEBUG=kernel _=/usr/bin/env)
May 29 16:40:01 localhost default.hotplug[3190]: invoke /etc/hotplug/usb.agent ()
May 29 16:40:01 localhost default.hotplug[3191]: arguments (usb) env (DEVFS=/proc/bus/usb OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug HOME=/ SHLVL=2 DEVICE=/proc/bus/usb/003/003 PRODUCT=474/701/0 TYPE=2/0/0 DEBUG=kernel _=/usr/bin/env)
May 29 16:40:01 localhost default.hotplug[3191]: invoke /etc/hotplug/usb.agent ()
May 29 16:40:05 localhost usb.agent[3190]: Setup acm for USB product 474/701/0
May 29 16:40:05 localhost usb.agent[3191]: Setup acm for USB product 474/701/0
May 29 16:40:05 localhost usb.agent[3190]:      acm: already loaded
May 29 16:40:05 localhost usb.agent[3191]:      acm: already loaded
</pre>
The following configuration steps are copied 
<a href="http://www.natecarlson.com/linux/sanyo-4900.php">this web page</a>,
and they work perfectly for me. 
<table align=center width=70% border=1 cellpadding=10 bgcolor="#FFFFDD">
 Now that you've got an ACM device, you just need to create a dialup
 connection. Note that the ACM device name may vary - just search
 through /dev for the proper device. On my (default) Debian install,
 it's /dev/ttyACM0. On RedHat 7.3, it's /dev/input/ttyACM0. Once
 you've found that, the number to dial to get a connection to the
 Vision network is '#777' (which is #PPP on the keypad). So, use
 whatever method you prefer to create a dialer that will dial #777. On
 my Debian box, I'm using the standard 'pon' scripts. Here are the
 config files I use:
<pre>
/etc/ppp/peers/sprint:

 # You usually need this if there is no PAP authentication
 noauth
 # The chat script (be sure to edit that file, too!)
 connect "/usr/sbin/chat -v -f /etc/chatscripts/sprint"
 # Set up routing to go through this PPP link
 defaultroute
 # Use remote DNS
 usepeerdns
 # Default modem
 /dev/ttyACM0
 # Connect at high speed
 230400
 local
 novj


/etc/chatscripts/sprint:

TIMEOUT         5
ABORT           '\nBUSY\r'
ABORT           '\nERROR\r'
ABORT           '\nNO ANSWER\r'
ABORT           '\nNO CARRIER\r'
ABORT           '\nNO DIALTONE\r'
ABORT           '\nRINGING\r\n\r\nRINGING\r'
''              \rAT
TIMEOUT         12
OK              ATD#777
TIMEOUT         22
CONNECT         ""

</pre>
</td></tr></table>
</ol> 

<h3>Canon USB 2.0 LIDE 20 CanoScan scanner</h3>
It worked in about one minute.
<ol>
        <li> apt-get install sane xsane
        <li> Run xsane as root.
        <li> It just works!
</ol>
<a href="http://toykeeper.net/reviews/canon_lide_30.php">This page</a> was helpful.
I added was to the scanner group (changed /etc/group).  That should
fix the permissions problems.

<h3>PCMCIA</h3>
<li> After swsusp2 hibernate the pcmcia system doesn't work.  Restarting it
with 
<pre>
/etc/init.d/pcmcia restart
</pre>
as root fixes the problem.

<h3>Writing CD's and DVD</h3>
Writing CD-R's and DVD's works, but I can't erase DVD's from K3B.
I have only tried writing data DVD's, not DVD's to play on a DVD
player.   It takes over 20 minutes to write a full 4.3GB data
DVD.
<ol>
  <li> I followed this advice: "To get CD burning working all you need in
  kernel 2.6.x is to have IDE-CD (CONFIG_BLK_DEV_IDECD) enabled and
  edit /etc/cdrecord/cdrecord to say ?CDR_DEVICE=/dev/cdrom?."

  <li> Install k3b and cdrdao:
<pre>
       apt-get install k3b
       apt-get install cdrdao
</pre>
  
  <li> modprobe ide-cd

  <li> Run k3b (which will fix necessary permissions)

  <li> Burned and verified a sample CD-RW while compiling kernel...

  <li> Created desktop shortcut:
          modprobe ide-cd; k3b

  <li> When I started k3b with a DVD writer, it asked me to
install a few other packages and I did (using apt-get).  
Unfortunately, I don't remember exactly what their names
were.  They were standard dvd authoring packages.
</ol>

<!--
<hr>
<hr>
<h2>The Stuff Below is a Mess</h2>

<h3>No Speedstep</h3>
     * No speedstep_centrino working at all, and starting up on battery
       makes machine very slow, even after plugged in.

Attempt: Enabled the "Relaxed speedstep capability check module 
option under Power management -> Cpu Freq .
Effect:
     Nothing, still get this error:

modprobe -v speedstep-centrino
insmod /lib/modules/2.6.6/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko
FATAL: Error inserting speedstep_centrino (/lib/modules/2.6.6/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko): No such device

this means that speedstep is not detected because my processor is too new.


<h3>Random hangs</h3>
(I think switching to the proprietary ATI fglrx drivers fixed
this problem.)
<ul>
<li> I had repeatable hangs when using vmware in full screen mode.
Now I just have random hangs, that seem to coincide with a disk access,
and have nothing to do with my screen.
<li>
 The T42 just had a random crash after about 15 minutes:
<lu>
       <li> *not* using madwifi at the time, but the madwifi
          modules were loaded...
       <li> straight boot, not resume from hibernate
       <li> I was listening to music.
       <li> no vmware involved anywhere. 
       <li> The freeze occured when I was paging through a kernel
         documentation file in an emacs window. 
       <li> I'm using radeon driver.
</ul>
     
<li>    As a possible remedy I did this in the BIOS:
<ul>
      <li> turned off PCI power management
      <li> turned off the other power management option at the bottom of the
        Power page (?)
      <li> turned off disk dma (which is in the Network section of BIOS).
        Note that the disk is still fricking fast, even with "DMA off",
        i.e., 
         sh<li>3.00# /sbin/hdparm -t /dev/hda1
         /dev/hda1:
         Timing buffered disk reads:   92 MB in  3.06 seconds =  30.08 MB/sec
      <li> I manually removed the madwifi drivers after reboot (they'll
        of course return after suspend or reboot).
</ul>

 <li> After all the above "remedies" and booting into acpi mode, it
     still totally fails.

 <li> I recompiled the whole kernel with somebody else's T42p config
     and it still almost immediately froze.  I'm thinking the latest
     freezes have something to do with my ext3 journaled filing
     system. Hopefully after one or two very clean reboots with
     
     
</ul

<h3>APM vs ACPI</h3>

      I should switch to ACPI, since apm is dead and laptop support
       for it is getting buggier and buggier. 

     Try: compile the acpi modules:
<ul>
       <li> Turn off the Sleep States experimental option.
       <li> Need to look at /proc/acpi stuff
<li> It sort of works, but swsusp2 crashes hard on the usb stuff,
or so it seems.  Maybe not removing usb modules from kernel
on suspend (option in /etc/suspend.conf) would help.  
</ul>

This was a problem with acpi when I used the T40.  Let's
see what happens with the T42p.
<pre>
 * suspend/resume sometimes fails, though it's generally OK. 
   Maybe try using ACPI again?

   ACPI seems to seriously conflict with my internal madwifi wireless
   card.  I get tons of hardware resets.  Yuck!  Also, resuming
   from ACPI messes up the middle mouse button on the Thinkpad T40
   Synaptics touchpad.  So, I'm sticking with APM.
</pre>
      
<h3>Mouse problems</h3>       

      Built-in mouse doesn't work if boot up with USB mouse in. 
       Problem vanishes when I use other guy's config, so I'm betting
       it's an ACPI vs apm issue.



<h3>GL direct rendering</h3>
It doesn't work at all yet, at least with the open source radeon drivers.

For example, 
<pre>
[email protected]:~$ glxinfo |more
name of display: :0.0
display: :0  screen: 0
direct rendering: No
</pre>


 

<h3> Missing spell in emacs.  Install.</h3>
    Fix: 
        apt-get install spell

<h3> Stupid font error messages</h3> whenever I start programs in KDE.
   They should be get-rid-able.

     Solution:  
       These are caused by bad directories under /usr/share/icons.
       So I just tar-balled and deleted the ones causing problems.  
       Since I only use noia_kde_100, which doesn't cause problems,
       this fixed the problem for me.


<li> Mouse too fast under kernel 2.6.6:

  Solution: 
    http://kerneltrap.org/node/view/2199

<p>"You probably have two "mouse" entries there, one pointing to /dev/psaux and
the other to /dev/input/mice, so that you can get both your PS/2 and USB
mouse working on 2.4.

<p>2.6 uses the input subsystem for both PS2 and USB, and thus both devices
will report events from both mice, resulting in doubled events.

<p>Remove either the /dev/psaux or /dev/input/mice entry, depending what suits
you better for 2.4 compatibility should you ever need go back to 2.4."

<p>This fixed the problem for me!   And, strangely enough, the middle mouse
button works now too!   

<li> External Display for presentations:

    <ol>
    <li> works fine, as it is always on.  Do *not* hit Fn-F7,
      as that kills the screen dead. 
    <li> Use Control Center -> Peripherals -> Display to
      set the resolution to one that the external display
      can use.  Resolution switching works fine "on the fly"!
      (Which is pretty cool, by the way.)


<li> installed xhkeys:
<pre>
  http://www.geocities.com/wmalms/xhkeys_manual.html#Using_xhkeys
  http://www.geocities.com/wmalms/#XHKEYS

   -- i don't think this works at all
</pre>

   To start it, I use the following command, and it works!:
<pre>
     tpb --osd=on --verbose --thinkpad="/usr/bin/X11/xterm -T ntpctl -e ntpctl"
</pre>

   (The nvram module is automatically loaded.)
  
   Since I always want this going, I created a command called mytpb in bin,
   and added a link to it in the Autostart folder. 

<li> USB hard drives:  work  fine


<li> USB keyboard, USB mouse -- 
    I removed the ehci_hcd module and the uhci_hcd module
    then inserted ONLY the uhci_hcd module, and the
    USB mouse and keyboard both worked perfectly, and
    I could even just plug and unplug the mouse during
    an X-session without having to restart and it worked
    perfectly.  WOW.
    <p>Subsequently inserting the ehci_hcd module does not break this.
    I might have to just make sure they are insmod'ed
    in the right order.

    PROBLEM: Here's how I got my USB mouse to work with X:
<pre>
Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"PS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"ZAxisMapping"		"4 5"
EndSection

Section "InputDevice"
	Identifier	"Generic Mouse"
	Driver		"mouse"
	Option		"Device"		"/dev/input/mice"
	Option		"CorePointer"
	Option		"SendCoreEvents"	"true"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"false"
	Option		"ZAxisMapping"		"4 5"
EndSection
Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse" "CorePointer"
	InputDevice	"Generic Mouse"  
	#	InputDevice	"Generic Mouse" "AlwaysCore"
EndSection
</pre>

When I had AlwaysCore there, X would hang on resume.

I also used the APM script from
   http://www.newt.com/debian/thinkpad-t40p/#mice
     

<li> 3D GL screen savers -- had to 
    apt-get install xscreensaver-gl

<li> writing CD-R and DVD's works, but I can't erase DVD's from k3b, maybe.
<ol>
  <li> I followed this advice: "To get CD burning working all you need in
  kernel 2.6.x is to have IDE-CD (CONFIG_BLK_DEV_IDECD) enabled and
  edit /etc/cdrecord/cdrecord to say ?CDR_DEVICE=/dev/cdrom?."

  <li> Install k3b and cdrdao:
<pre>
       apt-get install k3b
       apt-get install cdrdao
</pre>
  
  <li> modprobe ide-cd

  <li> Run k3b (which will fix necessary permissions)

  <li> Burned and verified a sample CD-RW while compiling kernel...

  <li> Created desktop shortcut:
          modprobe ide-cd; k3b
</ol>
</ol>
</ol>

<h3>SOUND</h3>
<pre>
  A trick with sound was that it was muted, as always with ALSA.
  I created this script and put it in Autostart:

 [email protected]:~$ more bin/set_volume
#!/bin/bash

amixer sset PCM 23  >/dev/null
amixer sset Master 100  >/dev/null
amixer sset Mic 0 >/dev/null   # mute

  -- However, this really isn't very good sound support.  Only
    one thing can use the soundcard at once, and if more than one
    does than it gets completely messed up!!

  -- I just installed ALSA, but it doesn't seem to work, after
     inserting the right module. I think I need a reboot.  Will
     come back to this.
    
     I'm not going to use this ALSA install, since it just doesn't work.


  * The mouse didn't work after using kernel of 
      http://www.digriz.org.uk/t40p-linux/#kernel-2.6
    and that was because he compiled the psmouse support
    as a module, which wasn't loaded by default.

 
# You usually need this if there is no PAP authentication
noauth
# The chat script (be sure to edit that file, too!)
connect "/usr/sbin/chat -v -f /etc/chatscripts/sprint"
# Set up routing to go through this PPP link
defaultroute
# Use remote DNS
usepeerdns
# Default modem
/dev/ttyACM0
# Connect at high speed
230400
local
novj


 /etc/chatscripts/sprint:
 
TIMEOUT         5
ABORT           '\nBUSY\r'
ABORT           '\nERROR\r'
ABORT           '\nNO ANSWER\r'
ABORT           '\nNO CARRIER\r'
ABORT           '\nNO DIALTONE\r'
ABORT           '\nRINGING\r\n\r\nRINGING\r'
''              \rAT
TIMEOUT         12
OK              ATD#777
TIMEOUT         22
CONNECT         ""
----------------------------------------------           

* GPS crashes VMware Win xp when run under kernel 2.6.6

GPS mapping software for Linux:
   http://www.kraftvoll.at/software/

GPS driver for Earthmate GPS:
   http://trans.civil.nwu.edu/~jay/gpsd.html

 -- also GPS crashes vmware whenever accessed w/ kernel 2.4.26 as
    well, even when just using serial interface. 

 PLAN: * Buy USB -> Serial convert.
       * Config for linux
       * Try to use my Garmin GPS under vmware -- in ms streets or Street atlas
       * Or Try under Linux

* PCMCIA doesn't work at all in 2.6.  Need this for my memory cards.
It works fine in kernel 2.4.26.

   I use cardinfo to correctly remove cards.  I made a desktop shortcut
   to this that runs it as root.

* DVD playing:
    Installed ogle, but it is insanely slow.  Hmm.
    Rebooted and DMA worked (with correct kernel 2.6.6, and
    OGLE was also fast.)
       apt-get install ogle ogle-gui

* VMware USB devices !?
     - gps
   XX  - ipaq  XXX

* Nicely automated networking :
   These scripts

hecke:/home/was/bin# more eth

su -c '/sbin/ifconfig ath0 down; modprobe -r ath_pci;\
  /sbin/ifup eth0; /sbin/route'


hecke:/home/was/bin# more wlan

su -c '/sbin/ifdown eth0; \
modprobe wlan; \
modprobe ath_hal; \
modprobe ath_pci; \
ifconfig ath0 up; \
iwlist ath0 scanning; \
dhclient ath0; \
/sbin/route'


* All my files from old disk, and old debian linux install:
   - be very careful here!!

* ACPI:
   1. Manually modprobed:
     button battery ac fan thermal processor 
   2. installed acpi and acpid unstable package:
     apt-get install acpi
     apt-get install acpid
     These will autoload the above modules...
   ick ... no suspend-to-ram...

* Shared files between Linux and Windows

* Delete old debian from hard drive

* Install Adobe suite in Windows and have it work.
* Copy photos from USB hard drive (progress)



Kernel-bound:
* Laser printer:
   1. Installed printtool, a redhat tool for setting up printers.
   2. Using printtool, I deleted lp, and set up
        Name: lp0
        Spool: /var/spool/lpd/lp0
        Printer device: /dev/usb/lp0
        Input Filter: latex Samsung one.
   3. Install apsfilter, since it's "better".
      Note that apsfilter uninstalls printtool
      It sucked -- so I went back to printtool.
   4. I also installed lprng:
        apt-get install lprng
      and this ...
   5. lprng seems good, so I'm installing lprngtool (GUI)
      and some things it requests:
         apt-get install lprngtool ncpfs recode djtools ifhp ipx xpdf-utils
   6. Waste of time. .. I just installed printtool again,
      and used my old python script to filter stuff.

* Speedstep -- slow down, speed up, etc. as it should
   Seems like maybe unpluging slows it down and a reboot is needed
   to speed it up again, which is horrible!
    1. I have something called tpctl installed "thinkpad control"
   
Now using kernel 2.6.6
   - note that /sys/... is there
     in particular, 
    /sys/devices/system/cpu/cpu0/cpufreq/
   - apt-get install cpufreqd
   - I then edited /etc/cpufeqd.conf
  This really works well.   Edit this file and restart cpufreqd
  if I want hi-speed even when on batteries...

* kismet:
   -- works only for built-in card.  can't get it to work for
      the linksys pcmcia card.  BUMMER.
      I think builtin card just doesn't support it!
   -- form:/usr/share/doc/kismet# zless README.gz
* XD Memory cards don't work in kernel 2.6.6,  microdrive?
   Fix -- I kept STUPIDLY missing the PCMCIA IDE support option
     under Device Drivers -> ATA/ATAPI... -> Enhanced ... support

* 3D VIDEO:
   1. Downloaded and installed debs from 
       http://xoomer.virgilio.it/flavio.stanchina/debian/fglrx-installer.html      2. 
     cd /usr/src/
     tar zxvf fglrx-4.3.0-3.9.0.tar.gz
     fakeroot make-kpkg  --added-modules fglrx-4.3.0-3.9.0 modules_image
     dpkg -i fglrx-4.3.0-kernel-2.6.6_3.9.0-3+Custom.1_i386.deb
   3. Quit X, unload radeon driver, insert fglrx driver:
      modprobe -r radeon
      modprobe fglrx
   4. Modified XF86Config as suggested at above italian web site.
      It was crucial to set the AGPGART option to yes!!
        Option "UseInternalAGPGART" "yes"

Please bear in mind, whenever you ?apt-get upgrade? your system and
the X-libraries are touched even in the slightest, you will find that
mplayer begins to winge like a tart along the lines of ?Unable to find
XF86GetVidModeLine? or something. This is your cue to re-run the
?./install.sh? script in the DRI package folder; there is no need to
restart X though fortunately.

 ---
   This was total crap, since suspend/resume broke. 
   Instead I:
    1. Followed directions at 
      http://www.digriz.org.uk/t40p-linux/#xfree86
    2. Nothing worked until I finally compiled the following modules into my kernel:
      intel_mch_agp          10256  0
      intel_agp              17308  1
      agpgart                32808  3 intel_mch_agp,intel_agp

---
  * Excessive LOG of wifi card:
    Modified
        emacs src/prism2/driver/hfa384x.c


  * Suspend with juk playing screws up audio drivers.  Bummer.
    Fortunately 
       dcop juk Player
    gives list of dcop commands and
       dcop juk Player pause
    pauses playback. 
    So just add dcop juk Player pause to my "off" script.

    Suspend/Resume freezes machine in text console.  No solution.

** 
* win-Modem:
  Works easily, using drivers and README got here!!!
       ftp://ftp.smlink.com/linux/unsupported

* Good backup system -- mirror /home to pocketec using rsync
   + Need to exclude something (some media) and backup / as well.
   + For now just backup /home.

* Setup Orinoco math department card:
     - make sure orinoco_cs.ko module compiled   
     - try to use and fail.
     - Modify end of /etc/pcmcia/wlan-ng.conf
card "I-Gate 11M PC Card"
  #   version "INTERSIL",  "I-GATE 11M PC Card / PC Card Plus", "Version 01.02"
      manfid 0x0156, 0x0002
      bind "orinoco_cs"
   
    - /etc/init.d/pcmcia restart
    - iwconfig eth1 up
    - dhclient eth1
    - unfortunately kernel driver doesn't support monitor mode
      so I downloaded latest driver from CVS and built it:
        export CVS_RSH="ssh"
        cvs -z3 -d:ext:[email protected]:/cvsroot/orinoco co orinoco

* How to get tar file from dpkg:

   dpkg --fsys-tarfile ssh2_2.0.13-7_i386.deb > a.tar

  I had to do this to install both ssh and ssh2 at the same time.

TODO:

* Firewire and downloading of DV
* GPS -- either get it to work, or buy a serial adapter and hope to
  get serial adapter to work!

</pre>
-->
</body>
</html>