Toshiba Tecra M2 and Fedora Core 2

tux and wine  

History

2004-10-13 First Release
2004-11-09 Synaptics Touchpad driver
2004-11-10 Philips/Logitech webcam
2004-12-25 revised cdrecord and k3b
2005-08-17 migrated to Fedora Core 4

Click here for Fedora Core 4 install

Intro

Hope this helps others to overcome the hurdles installing Linux on your favorite notebook. Most of what I learned will be applicable for other notebook brands and Linux distribution.

Be advised, most of the comments made here, are based on some crippled notes I made thruout the days of setup. My apologies in advance for any missteps. Let me know should things not make sense at all! Hopefully corrections will follow.

Hardware

DownSizing

The Toshiba M2 came pre-installed with Mindows XP. (Toshiba provides a recovery CD only, which is using the entire harddrive). For other reasons, I intended to setup this machine with XP and Mindows 2000.

Resizing the XP partition is/was a very time consuming operation. (I was that close in changing plans and remove XP). I was weak and gave in, XP won (for now!) over 2000. Biggest problem was to shrink the existing partition (hda1) down to 10Gb. Impossible, at least for now. (Hopefully I have another go later). Tried my best, but all I could get was getting down to 13Gb.

XP install itself is something around 4-5GB or so, then a gap of 8GB followed by a couple MB file. I'll assume XP's defrag protects these data/file section and does not relocate them.

So I settled for 20Gb for now with the hope I can break it in half in the future to install 2000 (if necessary).

Details:

  • I used 'ntfsresize' from the Knoppix CD to resize the Mindows NTFS partition from 60GB to 10GB.
    The remaining 50GB I intended to use for Min2000, Fedora C2, and big, huge data partition.
  • On the first go with ntfsresize (ntfsresize -i /dev/hda1) I only could shrink it down to ~16GB. Rebooting back into XP service mode, I disabled 'virtual memory' and 'hibernation' (control panel->performance/maintenance->power option). Defrag helped to shave of another gig or two. Though a big unused gap of ~8GB still remains.
  • Rebooting back into Knoppix, I run ntfsresize for real and settled for 20GB. Don't forget to re-initialize your partition table (e.g. fdisk) after running ntfsresize!
  • If familiar with fdisk I suggest to setup the partition table prior to the install of FC2 (personal preference). Be careful, you'll need to know what you are doing there! Note 2004-10-27,mk: Started playing with suspend to disk. Learned that you need to have a dedicated partition to do that. With the layout above it is not achievable. A partition layout like this should work though: Guess, when I have some time I will/have to re-install FC2!
  • Booting Knoppix

    The biggest difficulty was to get the Tecra M2 to boot from the CD. There is no BIOS access available. Finally I figured out what it takes: Simply boot into XP and use the provided "toshiba tools" to change the boot order.

    Initially I used Knoppix V3.3, just for the purpose of ntfsresize. Booted sucessfully V3.6. With the hope to get access to ntfsresize v1.9x (offers add. control of blocks XP's defrag can't move). Unfortunately Knoppix v3.3 is still using ntfsresize 1.73.

    FC2 Install

    Installing Fedora Core 2 went by the book. The only gotcha was the LCD screen could not be autodetected. So you have to opt manually for an LCD 1024x768.
    Here a list I found working out of the box: Things that did not work (out of the box): Overall I consider this install a huge success though. It is remarkable how Linux distributions have matured over the last years.

    Following the FC2 installation I upgraded to the latest and greatest from atrpms.net.
    Using apt-get makes it so much easier to upgrade and install rpms and/or packages and deal with all dependencies. There is even a GUI app 'synaptic' available. Starters go here first: ATrpm kickstart

    SpeedStep and Pentium M 'Dothan A6'

    The standard FC2 kernel 2.6.5 works out of the box, but is unable to utilize the 'SpeedStep' features of the latest Pentium M 'Dothan A6'. SpeedStep IMHO is one of the most important things to take advantage of the power conserving functions of the Tecra M2 (Basically stands for all Notebooks powered with Pentium M/Centrino)

    Put Linux 2.6.8-1 into gear was pretty much the same expirience (with this kernel configuration. )
    Unfortunatley still no speedstep. Doing some research I finally figured that the current kernel does not recognize a Pentium M 'Dothan A6'. Ended up patching './arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c' (see patch for 2.6.8-1 here).
    Note!! later I learned some -mm kernel might already support 'Dothan A6'. If lucky 2.6.9++ kernels will include support for 'Dothan A6'.

    Still it showed that 'cpuspeed' had some issues. (cpuspeed is the tool responsible for switching the CPU frequency. This happens basically by monitoring the CPU idle speed. If beyond a certain idle percentage it puts the CPU into a higher gear.)
    Everytime waking up from suspend mode, the cpu freq remained at the highest level. Just noticed the fan rattling around more often. cat /proc/cpuinfo shows you what freq the cpu is at. There is a bug in cpuspeed v1.1. Waking up from suspend, the BIOS (i'll assume) swicthes the CPU into higear. Cpuspeed never looks up the real cpu speed, it just goes by the value it remember before going into suspend. A simple workaround is to restart cpuspeed after every resume.

    I ended up modifying cpuspeed (part of kernel-utils-2.4-9.1.131 in FC2). Cpuspeed patch here or binary.

    And guess what, these patches really paid off. On my last trans-atlantic flight I used the extended Toshiba batterie (8800mAh) plus the drivebay battery (3300mAh) and on my way back I still had 2+ hours left after my 15 hour journey. That was quite impressive. Thanxs to Intel & SpeedStep. Not that SpeedStep is something new on this planet. I used to own a AST notebook in the early 90, back in the days of 386es. AST already used a very similiar technic to enhance the batterie lifetime. Though it was manually. On push of a button you could change the CPU freq and lower the power consumption! Something I never saw again until the Pentium M came along.

    ACPI and Toshiba

    By default FC2 installs and activates ACPI, rather than APM. I recommend the use of ACPI. I got it to work quite handily.

    There is no need to install the socalled Toshiba Linux Utilities Linux Utilities . I tried toshutils-2.0.1 to no avail.

    The main ingridients to get ACPI working properly is to have the kernel module toshiba_acpi loaded. Once loaded you should be able to browse thru /proc/acpi/toshiba. You should be able to run echo 3 > /proc/acpi/sleep (suspend to memory). It will most likely fail. There is a bug in 2.6.8-1 currently, which will prevent the suspend. Check /var/log/messages. You will see a message "kernel: Could not suspend device 0000:00:1d.7: error -5" (or similiar). The problem is the usb module 'ehci_hcd'. Run rmmod ehci_hcd and try the the suspend command again. After a short moment the screen will go dark and the M2 will fall asleep. Push the power button and it will wake up again. Both modes X and console work fine. The screen could flicker for a while, don't worry, just be patient and the screen will be completely restored.
    Have not tested echo 4 > /proc/acpi/sleep (sleep-to-disk) yet. It is my understanding you need to have a seperate partition to make this work. See my partition proposal above.

    The major work lies in setting up the /etc/acpi configuration. FC2 just deliver some basic sample. Will post my script here soon.

    ACPI and FnFx

    All the above requires to run the appropiate command with root access. Not very practical though. I found the fnfx package. It basically works out of the box. You only need the daemon part. I didn't bother with the client at all. FnFx intercepts most of the important Fn keystrokes and maps them to all kind of actions. One downside with the FnFx V0.2 daemon is, it does not support any call a script. Pretty unfortunate I think, especially since the FnFx user client is supporting such feature.

    To get ACPI properly to work with the Tecra M2 and suspend mode, it requires 2 important steps: removing/reloading the USB module and working around the power button at startup (see above). FnFx is calling suspend directly. It is not using the /etc/acpi scripts. Didn't feel like implementing the workaround into FnFX, so I opted for patching FnFx and make it execute scripts. (see patch here).

    Now I can use Fn-F3 and the Tecra M2 is suspending to memory on a keystroke. Pretty cool. There are more feature you get with FnFx. e.g. Fn-F6 and F7 to change the lcd brightness or Fn-Esc for mute, ... see package for further details.

    Wireless and IPW2200

    Getting the built-in wireless to run is fairly easy. Download the latest and greatest ipw2200 driver package from ipw2200.sf.net. I am currently using V0.11. Unpack, compile and install (see README for details). For me it worked out of the box. To integrate it into the FC2 startup procedure I created my own /etc/rc.d/init.d/ipw2200 and linked it into runlevel 5 'rc5.d'. If you use my script, edit IPW2200PATH to point to your source installation path. Simply issue service ipw2200 start and now use the FC2 system tool 'Network Device Control' to complete the setup.

    cdrecord and k3b

    Do not attempt to add the boot option 'hdc=ide-scsi', like you had to do with with older 2.4 linux kernel. With linux kernel 2.6 this is history. See Fedora Core 2 Release Notes
    file:///usr/share/doc/HTML/index.html for more details on this subject.

    The command line for 'cdrecord'   has changed too:

    Once in while I can not use 'cdrecord'. Something seems to lock the device. Haven't found yet what the cause is. Presumably some KDE function/app or so.

    Never seen this problem with 'k3b'   ;-)), which should be your burning app by choice anyway.

    KDE as default

    I like KDE much better. It seems there is no option available anylonger to set KDE as default (as there used to be in older Redhat versions). Though you can still do it by manipulating the file /etc/sysconfig/desktop. Just change "GNOME" to "KDE".

    Touchpad

    The default mouse driver that comes with FC2 and X11 works fine. Though to utilize all features of Toshiba built-in touch pad (supposely it is an Alps touchpad or at least compatible to it), you need to upgrade. Get the latest driver from Peter Osterlund's
    synaptics touchpad page.

    Follow the INSTALL instructions and the README.alps. It is important to apply the alps-patch to your current kernel. Don't miss out on modifying your X11 XConfig file (FC2: /etc/X11/xorg.conf).
    Recompile and reinstall kernel. (make; make modules; make install; make modules_install).I used synaptics-0.13.6, which caused a hickup when recompiling the 2.6.8-1 kernel. I had to add the following line to drivers/input/mouse/psmouse.h:

    After that everything worked fine.

    Philips/Logitech webcam

    The 2.6.8-1 kernel still supports Philips/Logitech webcam. Though there is a drawback. No more compression support for higher resolution since
    Nemosoft pulled out. Kudos to NemoSoft for his past support though.

    For all those who still own a Philips and/or Logitech webcam, there is a new solution available. Complete with compressor and support up to 640x480. Readup here and get one of these downloads.
    Unpack, compile and enjoy.

    Kontact

    If you have any questions, suggestions and fixes please let me know at