My IBM Thinkpad R40 (2681-ELG) has the following specs:
|
![]() |
Disclaimer: You have to know what you do when you follow these instructions. You may destroy your data or warranty or whatsoever. Keep in mind that I can be wrong on some issues. You have been warned. :-)
Since a few days, I run Linux 2.6.15 with a standard kernel as provided by Debian/Etch, however not the latest from there which would not boot for me. Note that you can also find backported kernel-packages for stable/sarge on backports.org. The /proc interface for the acpi-stuff does not exist any more, so I had to adapt my scripts in /etc/acpi/actions/ to use the files in /sys instead, but it worked immediately, both suspend to disk and to ram.
I also bought a wireless card which seems to work flawlessly with the madwifi-driver.
Since the update to kernel 2.6.10 containing the ibm-acpi patches the key Fn-F7 no longer works to switch the external video output on/off. This is needed in principle since I have a truncated image on the external device otherwise. The "echo video_switch > /proc/acpi/ibm/video" also shows no effect. For more information read my question the follow-ups on the linux-thinkpad mailing list.
Wow, I read a line somewhere, that the ibm-acpi patches made it into the main kernel with 2.6.10, so I had to try it. It's f****** amazing! The ACPI sleep states S3 (for suspend to ram) and S4 (suspend to disk) work now. All I had to do was give the kernel option "resume=/dev/hda1" to my bootloader (make this to your swap partition!) and to write "echo -n 4 >/proc/acpi/sleep" into my /etc/acpi/actions/sleep.sh which gets executed when pressing Fn-F4 (sleep-button) and the corresponding with a "3" into /etc/acpi/actions/lid.sh for when I close the lid.
In the meantime I have kernel 2.6.1-mm4 with this config and this /etc/modules.
Information about the 2.6 kernels can be found here (German translation here) and an install guide is here (but it does not describe building it with make-kpkg which works exactly like before). Make sure to have the package "module-init-tools" installed for the new kernel-module handling.
Some more remarks:
It came with XP preinstalled. It may be good _not_ to boot Win XP at all, as the first thing it does is converting the FAT32 file system to NTFS. If you resize it as FAT, you can use for example the well tested parted. Well I did not know this, so I lost.
Then I first checked out XP a little and installed some programs which proved to be a bad idea, too, as Win placed some data in the middle of the hard drive and defragmenting (even with an alternative tool) did not move it to the beginning. So I had to make a smaller Linux partition than initially wanted. In the meantime I wiped out XP entirely anyway...
I downloaded the newest KNOPPIX to get a quite recent tool called ntfsresize. With that I resized my WinXP partition (it complains if you accidentially try to cut away something from the Win data, but nevertheless be careful) and then repartitioned (cfdisk) and already made reiser file systems on the partitions. I also had a look at the output of lsmod while under KNOPPIX.
At the next bootup I experienced a little shock, as the machine complained about a no more existing "predesktop". IBM obviously uses free space at the end of the harddrive (not a separate partition) to save a rescue image to reset the whole disk to initial state. Well, I think I destroyed that one, but first it's an utter waste of disk space, second one can disable the predesktop in the BIOS so that it does boot nicely and third it is possible (I heard/read) to get rescue CDs from IBM anyway, if really needed.
Then I installed woody from a german Linuxtag-CD which held all the necessary packages on one CD. (For the installation process see the Installation Manual.) Then I realized some things not yet supported by the 2.4.18 kernel, so I upgraded from a sarge (testing) CD to a 2.4.20 kernel (i.e. kernel-image-2.4.20-686). Basically everthing went smooth.
For the unpatient, here are my /etc/X11/XF86Config-4, /etc/modules and config-2.4.20-ck6-tom10 (I use the ck kernel patches). As soon as 2.6 gets released you will find the new config here. Note that this works for me but you mileage may vary. Any comments or suggestions for improvements are welcome :-)
It is the e100 kernel-module. Include it into your /etc/modules (or use modprobe) and adjust /etc/network/interfaces to your needs and everything works fine. The e100 did not yet exist in the 2.4.18 kernel and there are some mails of people on the Web who tried with the older eepro100 module without success - beware :-)
Some claim, that this driver works. The module seems to compile and load but I have not tried further so far. See the Modem-HOWTO for further reference.
As easy as networking, it is the module called i810_audio.
I use is an external USB-mouse, and loading the kernel modules usb-uhci, usbmouse and mousedev is everthing one has to do to get it working. Similar for a USB-keyboard (usbkbd, keybdev). Furthermore I got a shiny 200GB external hardisk. Loading the usb-storage kernel module was enough to be able to mount it as /dev/sda1 . It worked with the fast USB2.0 right away. Unfortunately the ehci-hcd needed for fast USB prevents the USB-mouse from working after suspend and removing
and reloading it hangs the machine :-( I hope this will resolve itself with the upcoming 2.6 kernel
Setup as usual, kernel-boot option hdc=ide-scsi, load ide-scsi module, e.g. make symlink /dev/cdrom -> scd0, and adjust /etc/fstab. You do not know what I am talking about? See the CD-Writing HOWTO.
DMA is turned off by default in Debian standard kernels. To turn it on really speeds things up. You can do it by: hdparm -d1 /dev/hda
Add it to roots crontab like this for example: @reboot /sbin/hdparm -d1 /dev/hda > /dev/null 2>&1
One can load the radeonfb kernel-module to get a high resolution on the console but this gives problems with resuming from suspend (see below). Instead I use the vesa fb and the boot option vga=834 which
gives the desired 1400x1050 resolution.
The radeon module gets loaded automatically by the
X server but one has to load the agpgart module to enable 3D acceleration.
Again woody is too old here, so you have to upgrade to the xserver
4.2.1 from sarge to get the card supported by the radeon-driver, see
my config above. There you also see how it has to look like to get
trackpoint, touchpad and an external USB Mouse to work. The middle
button of the touchpad (used for scrolling with the trackpoint under
Win) does not work, but there is some information
from people who configured it successfully to their needs. The
3-button emulation works perfectly.
This proved being a lot more tricky but I
finally got it running. I upgraded once more to
X 4.3 (with the deb-line
"deb http://people.debian.org/~mmagallo/packages/xfree86/$(ARCH)/ ./"
for a backport from www.apt-get.org).
Then I installed the drm-trunk modules from dri.sourceforge.net, there is a deb-line,
too, for the packages drm-trunk-module-src, xlibmesa3-dri-trunk and
xserver-xfree86-dri-trunk.
From the first you have to compile a new radeon.o kernel module.
Last existing flaw: resume from suspend is not possible while
3D-acceleration is activated. See below.
The extra 3 sound-control buttons (louder, less loud,
off) work out of the box so there is no need for the existing tpb package.
The two buttons located over the left- and right-arrow (used for
browsing forward/bachward in Win) can be given arbitrary functions by
finding out the keycode with "xev" and then use xmodmap (it has a good
manpage). I also had some problems with the "< > |"- key and the
NumLock (see also here)
on the swedish keyboard. xev and xmodmap again did the trick.
More keys:
It took me a long time to figure out why the screen did stay black
after a resume from suspend. It is the frambuffer (radeonfb module)
that is causing the problems. Without it I can suspend and resume
nicely most of the time (I got one hangup anyway so far).
There exists a package in the debian archive with the source for
thinkpad kernel-modules. They compile and load alright except the superio module.
With the corresponding tpctl tool (and its ncurses counterpart ntpctl) it is possible to configure some of the PM-behaviour that otherwise sits in the BIOS options. But as one of the modules is unable to load
into the kernel not all features work.
I finally got 3D-acceleration running, but then resuming works no
longer. One can try
the radeon suspend
patch which maybe solves this problem. It did not in my case.
As a workaround I disable the agpgart module by default, and only
throw it in, when needed. One could do this automatically with a
suspend-script, of course.
I also tried ACPI instead of APM, compiled the kernel with the
patch (in fact the collection of patches from
href="http://members.optusnet.com.au/ckolivas/kernel/">here), even
got a BIOS update, because in the newer version IBM's homepage said
"ACPI under Linux supported", all with no success so far. But as suspend with APM works now, I am quite happy.
...I am really happy with the machine, I use it as desktop replacement
at work and it's a pleasure to work with it. It sure took me some
time and reading to figure out everything, but this is half of the
fun, isn't it? The R40 is a great laptop to be freed in the
sense of free software.
If you have questions or comments on this subject, feel free to
contact me or the two mailing lists mentioned below (I am no longer
subscribed).
apart from the ones given in the text, the following may be useful:
Xinerama on R40
I have xinerama mode working on my R40 with an external Samsung Syncmaster 151s flat panel.
You have to hand-edit XF86Config. Here are the pertinent sections from my XF86Config file. If you later run an X configuration tool like SuSE SAX2, it will bugger up your file so be sure to back it up once you get it working. Good luck.
Scott Flowers
(admin note: removed config file due to length - available on request)
thx
hi scott,
thanks, I will try next time I need it. I got some previous comments and config-files as well, so I will remove this question from the text now. :-)
tom
Problems booting Knoppix 3.4 & 3.6, while 3.3 works fine
Hello
I have seen your report on Linux on Laptops. It was not entirely clear
to me which Knoppix version you used:
I had no problems booting and installing Knoppix 3.3, however when
trying to boot 3.4 or 3.6 the Laptop hangs after
PCMCIA found starting cardsmgr
Did you suffer similar problems?
Thanks
Uwe Brauer
Re: Knoppix
Hi Uwe,
I cannot remember, unfortuneately.
It was spring 2003 when I got it and set it up, so I suppose it was whatever version that was new at that time.
I think I experienced some hang-ups with knoppix, but don't know right now if it was that laptop :-)
However, there the problem was hanging after it tries to access the cd-drive via scsi-emulation. Turning that off and fiddling a little more with Knoppix' boot parameters made the hang-up disappear...
hope that helped
cheers
tom
Number of hits
hi folks,
I finally found the time to grep a little in the apache log-files of this server and was pleasantly surprised that this page gets around 13 hits per day, i.e. around 100 per week. So, at least I don't have to wonder anymore if writing this was a waste of time. :-)
Thank You
Thank You
Skriv ny kommentar