Installing Slackware Linux on a Toshiba Tecra M2

Posted August 1st, 2007 by Maarten

At first I installed Slackware 10.1 on the Tecra M2, but when Slackware 10.2 was made available I decided to reinstall because I wanted to have different partition sizes. I got everything to work pretty well with the 2.6.16.16 kernel, including ACPI, which probably took most of the effort. I got a lot of info from the pages listed on the bottom. Model specific info: PM 745/512/60G54/14XT/DS/LM/W. This page is listed on TuxMobil.

01/08/07 Notice: although I wrote this guide installing Slackware 10, it still works about the same way with Slackware 12. I'm using kernel version 2.6.18 in stead of the default, because I encountered problems getting suspend to memory to work properly. You can have a look at my 2.6.18 config file, but I have patched the source to work with the bootsplash screen, so if you want to use it verbatim, you'll have to install that too (bootsplash package available on LinuxPackages.net).


My Toshiba Tecra M2.


Partitioning

I removed all existing data on the hard disk. I created a partition table looking like this:

/dev/hda1 / 10GB  
/dev/hda2 /home 50GB  

The root partition contains the system, the games and the additional programs. The home partition is intended for documents and media. I didn't create a swap partition, but decided to go with a swap file. This way I can increase and decrease the swap space as I please.
Back to contents


Wireless network

To use the Wireless network the driver, the firmware and the ieee80211 subsystem are needed from http://ipw2200.sourceforge.net/ and http://ieee80211.sourceforge.net/ respectively, unless you are using one of the newer kernels (I think post 2.6.14), because the ipw2200 driver and ieee80211 subsystem are included in those.

Next you need to make sure the right options are enabled in the kernel configuration:
CONFIG_NET_RADIO=y
CONFIG_FW_LOADER=y
CONFIG_CRYPTO=y

You can then compile the drivers using the usual make and make install. Don't forget to copy the *.fw files to the /lib/firmware/ directory. Be sure that the module is loaded and edit your network configuration files accordingly. In Slackware this means /etc/rc.d/rc.inet1.conf, and if you are using an encryption key you'll need to edit /etc/rc.d/rc.wireless.conf. You could also use KWiFiManager to take care of this.
Back to contents


Internal modem

Although using a dial-up connection may be next to obsolete, it can very well be used as an emergency option in case of no broadband. First get the most recent version of the SmartLink drivers. They should compile and install fine using make and make install. The drivers used to compile fine for me, but since I started using kernel 2.6.16.16 I got a make error because the usb version of the driver wouldn't compile. The internal modem driver will however compile and install successfully if the usb related parts are removed from drivers/Makefile. You could try my modified version (see attachments) of the source files if you encounter this problem.

Once the drivers and the executable are installed, the driver needs to be loaded (modprobe slamr). Make creates the device in the /dev directory, but if you restart your laptop and are using udev, the device will disappear. Execute mknod -m 600 /dev/slamr0 c 242 0 to recreate the device. If everything works /sbin/slmodemd will be started without error messages. The modem can then be used with wvdial or kppp. After googling I found out that I needed to lower the baud rate to 24000 and add the init string AT+MS=34 for the modem to work properly. wvdial Also needs Carrier Check = no in the wvdial.conf file. Take a look at my configuration file (see attachments) if you need an example. I haven't made an attempt at making the modem sound work yet because that's not a priority to me.
Back to contents


Graphics

Making the NVIDIA card work is easy, just get the most recent NVIDIA driver and add the proper line to /etc/X11/xorg.conf (see attachments):

Driver "nvidia"
And optionally:
Option "NoLogo"

I get about 2350 FPS running glxgears while running KDE and 2400 FPS without running KDE. Also the external video port works when a monitor is connected to it, though it shows the laptop's original 1024x768 screensize in stead of the 1280x1024 that it can do, this can be fixed by modifying the xorg.conf file. I'm not sure how to switch between the laptop screen and the external monitor (manipulating /proc/acpi/toshiba/video doesn't work for me), but restarting X does the trick.
Back to contents


DVD player/ writer

At first I wasn't able to play DVD's using Xine, although I did install libdvdcss. I couldn't figure out what went wrong until I got a hint from Susanna Gross. Apparently because I hadn't played DVD's from Windows, the DVD region hadn't been set either. Setting the region was easily done using regionset. Be sure to install the NVIDIA driver as well because DVD's will play very slowly without it.

For Slackware 10.1: K3b won't notice the writer when using it as a user and not root. If the user is added to the group 'cdrom', the writer is shown in K3b. If this doesn't help try editing /etc/udev/permissions.d/udev.permissions, checking the optical devices section.
Back to contents


Touchpad and accupoint

The touchpad and the accupoint work fine after Slackware's default installation, but to enable scrolling and special actions for the corners, the Synaptics touchpad driver must be installed. To install it just extract, make, make install and modify the xorg.conf file. The module section needs to be modified and a new input device needs to be added, check my Xorg config file (see attachments) or the documentation that comes with the tar file to find out how. I stuck to the 2.6.14.7 kernel for a while until I tried 2.6.16.16, because between those the touchpad driver just didn't make anything scroll.
Back to contents


Special keys

By installing FnFX I got the keys to do this:
I-button (next to the power button): Start Firefox.
Monitor-switch-button (next to the I-button): Start Kontact.
Fn-ESC: Mute/ unmute sound.
Fn-F1: Lock KDE session (start screensaver).
Fn-F2: Log off.
Fn-F3: Suspend to memory (by starting a script).
Fn-F4: Reboot.
Fn-F5: Toggle fan on/ off.
Fn-F6: Decrease screen brightness.
Fn-F7: Increase screen brightness.
Fn-F8: Decrease mixer volume.
Fn-F9: Increase mixer volume.
Back to contents


ACPI (and such)

Since kernel 2.6.16.16 suspend to memory has been working perfectly. When I tried to use it with kernels 2.6.12 and 2.6.14 the tty's got messed up, this might have been solved because I now use a newer NVidia driver. I put the laptop to sleep by pressing Fn+F3 (see above) or by closing the lid. Closing the lid envokes /etc/acpi/acpi_handler.sh (see attachments), in which I specified to execute echo mem > /sys/power/state (alternatively you can do echo 3 > /proc/acpi/sleep). The acpi_handler.sh also creates a temporary file. If I press the power button it checks if the file exists. If it does, the computer just wakes up. If the computer isn't waking up and I press the power button it doesn't find the file, thus the computer starts the shutdown script.

I also added a line to kill FnFX before suspending, because for some reason the FnFX starts the program for whichever hotkey I pressed last before suspending. FnFX also crashes for reasons unknown to me as of yet, so I wrote a tiny script (see attachments) which I put in ~/.kde/autostart/ to let it be executed during KDE startup. It checks every 5 seconds to see if FnFX is still running and if it isn't (for instance because the laptop killed FnFX before suspending), it starts a new instance of the program.

I added a line in the acpi_handler.sh script below the suspend command to prevent the hard drive from spinning down, which makes an annoying clicking sound. I also let this command be executed at boot time, but suspending resets the value that is set by the command.

If you are using Linux 2.6.12.6 (or an earlier version), the touchpad and accupoint will stop working after wakeup. I got a hint from Matthias Kattanek that there was an existing bugreport. It turned out that "==" had to be replaced with "&" in alps.c to fix this.

Using KLaptop to save power.

The Centrino "performance profiles" work fine. When I set "powersave" as the performance profile with KLaptop, the processor speed drops down to 600MHz and the battery lasts for three hours at most if it's fully charged. The profiles (or governors as they are called in the kernel setup) "conservative" and "ondemand" change the cpu speed depending on what I'm doing. For instance if I start a program that requires some calculating, the processor speed is increased, as well as the power drain.

I tried to use suspend2 with a number of different kernel versions, and it sort of worked both using a swap partition or the filewriter. I never got it to work properly with the NVidia drivers, but this is alright since suspend to memory is working so well.

Finally, if you experience problems rebooting the laptop, try adding rmmod ipw2200 somewhere in the rc.0 script to unload the wireless network module before a restart.
Back to contents


Sound, temperature and the fan

Branded Slackware.Sound: Enable CONFIG_SND_INTEL8X0 in the kernel config file for the sound card. I disabled CONFIG_SND_INTEL8X0M (modem) otherwise the sound didn't work. The other sound card drivers aren't necessary, so I disabled them as well. After the kernel is installed, the sound can be configured with alsaconf. Be sure to disable "Headphone Jack Sense" with any mixer to actually get sound.

Temperature: The current temperature measured in the laptop is readable from the file /proc/acpi/thermal_zone/THRM/temperature. I created a SuperKaramba theme to display the current temperature (together with other statistics) on the desktop.

Fan: It's possible to enable, disable or check the status of the fan by manipulating /proc/acpi/toshiba/fan. I set FnFX to do this at the push of a button (well, two buttons).
Back to contents


Status

Tested and working: wireless network interface, normal network interface, internal modem, video acceleration, cd writing, dvd writing, dvd playing, touchpad, accupoint, Toshiba keys, Fn keys, power button, lid switch, suspend to memory, sound output, internal microphone, external microphone, pcmcia (modem card and network card detected). Also a usb stick and a Logitech Quickcam (usb) function properly.
Not tested: sd card, parralel port, firewire, s-video out.
Back to contents