Running Linux 2.4 on a Toshiba Satellite 2545XCDT = Introduction = If you just want the real stuff and want to skip the boring crap, head down to the "Hardware configuration" section. I have been using Toshiba portable computers for a long time, some of the models I owned were Satellite 410CDS, Tecra 400CDT, Satellite 220CDS, and some others I can't remember. 410CDS died a horrible death while being mailed from one location to another by U.S. Priority Mail. In general though, Toshiba notebooks have been very stable for running Linux. I had 73 days uptime on Toshiba Satellite 220CDS. 10:32pm up 73 days, 23:40, 2 users, load average: 0.08, 0.07, 0.03 The machine was used as a mobile workstation, frequently moving from my home to the office and back. Anyway. 220CDS got replaced by a newer unit, Toshiba 2545XCDT. = General information you can find elsewhere = 2545XCDT (CDT from now on) is based on 333Mhz AMD K6-2 processor, comes with 64MB EDO ram standard, with a 4.3GB hdd, 24x CD-ROM and 1.44 floppy all-in-one package. Awesome bright 14.1" TFT screen was absolutely amazing after looking at 12" dual-scan for almost a year. Audio and video subsystem consists of Yamaha OPL3SA3 sound chip and S3 Virge/MX 2mb video card. General tips for purchasing a Toshiba laptop. I am not sure about other vendors, but Toshiba likes to provide ALL the information about their current production models on the website, www.computers.toshiba.com. When looking for a new model for myself, I considered the following options: 1) 100% Linux compatibility 2) 300+ Mhz processor 3) at least 4GB hard drive 4) 12x + cd-rom. 5) Active-Matrix screen only. I was getting sick of dual-scan screens really quick. Almost all of current models satisfied options 2 through 5. Only one however fit into the 100% Linux compatibility. Satellite 4080 models had 2 problems I could see right away - PCI Maestro based sound and Trident Cyber video. Neither are supported under linux, and I don't consider "AcceleratedX for Laptops" a viable support option, and I had no desire to "boot into windows to initialize the Maestro2 soundchip". CDT, with its Yamaha OPL3SA3 sound chip and S3 Virge/MX video seemed like the only choice out of current Satellite line to be a good Linux machine. The only downside to this system was the 56K WinModem - but it can be easily disabled in the BIOS and with 4 PCMCIA modem cards laying around from my previous laptops I had no problem finding a modem. From the reviews I heard on the CDT, the internal modem's quality was questionable even under Windows. Since I could not confirm it because machine never booted Windows at all, I decided to just disable it. The phone jack is very small and unobtrusive, and easily ignoreable. With suggested price of only $1799 this seems like a very solid and cheap Linux machine. By the time you read this, it might be even cheaper, a LOT cheaper, actually :) = Hardware configuration = After you unpack the laptop and let it warm up to the room temperature, you are ready to configure it. Hold down the ESC key on keyboard, and hit the power button. Message will come up: Check System, then press F1 key. Do what it says - Press F1. System setup screen displays. Adjust it to your liking. I disabled the internal WinModem, put PCMCIA Bridge into CardBus mode, and changed OPL3 sound to the following settings: control port: 370, wss port: 530, fm port: 388, midi port: 330, irq: 9, play dma: 0, rec dma: 1. There is a reason for this configuration - I will describe why later-on. Also, set the boot sequence to CDROM->HDD->Floppy. = Installing = Insert your favorite distribution bootable CD-ROM into the cd drive, hit End key, confirm settings change, watch it reboot and start from the CD-ROM. No problems during installation. I do not use any standard linux distribution, but I don't imagine that Slackware, Redhat, Suse, or Debian installs should encounter any problems. I heard that Debian provides a special "tecra" bootdisk to use with Toshiba laptops - you don't need to use it. The hardware is generic enough to be detected by the standard "generic" kernels shipped with most distributions. If you have a choice, you should probably use the "APM-enabled" kernel during install. After installation, kernel recompile using options suggested below is highly recommended. Since I never planned to have any version of Microsoft Windows on my system, the original partitioning scheme of /dev/hda1 being one large FAT32 partition was immediately scrapped. I partitioned the drive like this: Device Boot Start End Blocks Id System /dev/hda1 1 13 104391 83 Linux /dev/hda2 14 205 1542240 83 Linux /dev/hda3 206 524 2562367+ 83 Linux /dev/hda4 525 526 16065 82 Linux swap All these are primary partitions, which limits total number of them to 4. However I don't see why I would ever use more than 4 partitions, and I don't particularly like the naming scheme used to address logical partitions inside primary ones. So, I made all of these primary. Yes, something like RedHat will recommend you make a 256MB Swap partition but since I wasn't going to install RedHat 16MB was just fine for me. The machine was eventually upgraded to have 128MB RAM, so swap use was definitely not a problem. Filesystem Size Used Avail Use% Mounted on /dev/hda1 99M 34M 59M 37% / /dev/hda3 2.4G 914M 1.3G 40% /tmp /dev/hda2 1.4G 377M 1005M 27% /usr Incase your distribution needs it here is the config recap PCMCIA: i82365 - Supported by CardBus option in 2.4 kernels or by the pcmcia-cs package. The chipset is actually Toshiba ToPIC95 but both 2.4.0 and pcmcia-cs package support it well. Audio: Yamaha OPL3SA3 - Supported by ALSA (fully) or OSS/Lite (limited) Video: S3 Virge/MX - Works with XFree 3.3 and 4.0.1/4.0.2. USB: NEC USB Controller - Supported perfectly by 2.4 kernels, "<*> OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support (NEW)" IRDA: Toshiba America Info Systems Type-O FIR port. Supported by the "<*> Toshiba Type-O IR Port (NEW)" option under IRDA config. Note, to actually use this you will need user-level tools from the linux-irda distribution. Just like most 4-letter acronyms, though, IRDA is practically useless, even when it works. = After Installation = Some tips to maximize battery life on this machine: * If you use 2.4 kernels, "kupdate" daemon should stop writing to disk after a few seconds of inactivity. If it keeps constantly spinning the disk, you have some useless daemon writing to open files. Track down the problem and disable it. On my system running 2.4, the drive stops moving and spins down shortly after I stop typing at the console. If you feel lucky, you can "killall -STOP kupdate", which will pause automatic disk flushing, but if you do this, and don't manually run "sync" once and a while, when your system crashes, you will be majorly screwed. Better do a good job of tracking down open files and useless disk spinning daemons. "lsof" tool can be very helpful here. * disable all useless services. (sendmail, shell, rpc, etc) Usually this is done from /etc/rc.* scripts. Note this won't directly affect battery life but it will keep the hard disk spinning if a daemon has too many files open and keeps writing to them. * Don't run cron, at, updatedb, and other disk-spinning daemons. For timed tasks, I found the at daemon that comes with Slackware to be the least disk-spinning. You can get the source code from any Slackware mirror site. * disable syslogd from writing --MARK-- every hour: /usr/sbin/syslogd -m 1440 Find where syslogd is started in your boot scripts, and replace the start line with the one above. * Compile kernel with APM. Options I use are: <*> Advanced Power Management BIOS support [*] Enable PM at boot time [*] Make CPU Idle calls when idle [*] Enable console blanking using APM [*] Use real mode APM BIOS call to power off (this one is needed to actually power off the machine after running "poweroff") Options not listed here are disabled. Do NOT use ACPI. In it's current state of development (2.4.0) it does not work on this system. Also at the moment ACPI does not provide battery information or power state information to the user (or the kernel for that matter). Don't use it. * set up HDD spindown after 10 minutes (hdparm -S 120 /dev/hda) * don't run too many VC's: # Sample /etc/inittab id:3:initdefault: si:S:sysinit:/etc/rc.d/rc.main su:1S:wait:/etc/rc.d/rc.singleuser rc:2345:wait:/etc/rc.d/rc.multiuser ca::ctrlaltdel:/bin/sync l0:0:wait:/etc/rc.d/rc.shutdown r6:6:wait:/etc/rc.d/rc.reboot c1:12345:respawn:/sbin/mingetty tty1 c2:2345:respawn:/sbin/mingetty tty2 Note, ctrlaltdel is linked to "/bin/sync". This makes it impossible to "accidentally" reboot the machine. My preferred way of rebooting is using the "reboot" or "poweroff" commands, and if the system is in a hosed state, it's better to use the Magic SysRq key to Alt-SysRq-S (sync) a couple times, then Alt-SysRq-U (remount all drives readonly), then sync again, and finally, Alt-SysRq-B to reboot. If these keys don't work, and you compiled support for Magic SysRq, your system is really hosed and needs a hard powerdown. # Sample inetd.conf auth stream tcp nowait nobody /usr/sbin/in.identd # Sample /usr/sbin/in.identd #!/usr/bin/perl $_ = <>; s/ //g; chomp; ($pos, $poc) = split(',', $_); print "$pos , $poc : USERID : UNIX : nobody\n"; # end sample Sample 2.4 kernel config options: (K6/K6-II/K6-III) Processor family [*] MTRR (Memory Type Range Register) support [*] Support for hot-pluggable devices (this enables CardBus support) <*> PCMCIA/CardBus support [*] CardBus support See the section PCMCIA later in this document. Note, Plug and Play support is not required for this machine since there is no PnP hardware in it. [ ] CMD640 chipset bugfix/support (do the world a favor and disable these. Every kernel comes with these enabled, yet the only boards with these chipsets are old P5 boards that took up to 133Mhz Pentiums. [ ] RZ1000 chipset bugfix/support (ditto for this one) These options should improve disk access a little bit [*] Generic PCI IDE chipset support [*] Sharing PCI IDE interrupts support [*] Generic PCI bus-master DMA support [*] Use PCI DMA by default when available There were some problems in 2.4.0test1x with DMA and suspend/resume, but these have been fixed in 2.4.0. [*] Magic SysRq key (It's under Kernel Hacking. Do yourself a favor and enable this feature. It will make you lose less data when your system crashes. Make sure and read Documentation/sysrq.txt. These settings are more or less relevant to the CDT. = Sound = For sound support, i use ALSA (http://alsa-project.org). Unlike OSS or kernel drivers, ALSA has full support for the OPL3SA3 Chip, including all the Audio controls (Bass, Treble, 3D Audio) and I like it more for having a much smaller memory footprint than OSS. Yamaha sound-chip in the notebook is NOT PnP, all the settings are set from the BIOS setup screen. No isapnp or similar tools are required. I load ALSA modules with the following script: #!/bin/sh modprobe /lib/modules/running/misc/snd-opl3sa.o snd_port=0x370 snd_wss_port=0x530 snd_fm_port=0x388 snd_midi_port=0x330 snd_irq=9 snd_dma1=0 snd_dma2=1 Reason I put OPL3 on IRQ9 is because its a good neutral un-used IRQ. By default, sound is on IRQ5 which makes it kind-of annoying because if PCMCIA is loaded before the sound modules, PCMCIA grabs IRQ5 for whatever devices you might have, and of course the sound won't load then. pcmcia-cs seems to dislike taking IRQ9 though. As far as DMA play and rec channels, it doesnt really matter what those are set at, as long as it's a different number. The Yamaha chip is not too bad, supporting up to 48khz sampling rates and full-duplex operation. Be careful with the headphone out jack on the laptop. After about a year of use, the jack on my unit became too loose and requires jiggling the plug around to get full stereo output. This does not affect the built-in speakers. = PCMCIA = Make sure and get latest pcmcia-cs package (3.1.22 as of this writing) to support 16-bit pcmcia cards. You will not need the pcmcia-cs package if your card is "CardBus". As far as I know, all CardBus cards are required to have a gold "strip" on the top side of the connector which goes into your notebook. The size of the groove on the left side of the connector edge is also less than on a 16bit card, to prevent accidental insertion into hardware which does not support the CardBus standard. With CardBus support compiled in as mentioned above, card activation is automatic: /var/log/sys.log (card insert event) cs: cb_alloc(bus 21): vendor 0x1011, device 0x0019 PCI: Enabling device 15:00.0 (0000 -> 0003) The card is automaticaly enabled by the kernel, and comes up as another PCI device under /proc/pci: 15:00.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 Subsystem: TDK USA Corp NetFlyer Cardbus Fast Ethernet Flags: medium devsel, IRQ 11 I/O ports at 1c00 [size=128] Memory at 11000000 (32-bit, non-prefetchable) [size=1K] Expansion ROM at 10c00000 [size=256K] Then you can load your standard tulip.o module and should be able to use standard network commands to bring up the interface, setup route, etc. You can buy CardBus versions of just about any card you could possibly need, including SCSI adapters, 100Mbps Network adapters, and Network/Serial cards. My personal suggestion, stay away from 16bit PCMCIA cards. Not only will you have to install and use pcmcia-cs tools, 16bit PCMCIA is much slower, limited to about 900kb/second transfer rates between the card and system board. Certainly don't expect to buy a 16bit 10/100Mbps network card and get 100Mbps speed. You will be lucky to get ~ 1mb/second. Make sure and have your notebook powered and running Linux if you want to make sure that the CardBus card you buy will be supported. Plug in the card at the store, and check /proc/pci or lspci -vvv. If you see the new device being from some unfamiliar vendor, numeric, or otherwise obscure, you should probably find another card. Adaptec makes great CardBus SCSI adapters based on the aic7xxx chipset. There are some CardBus SCSI vendors that use AdvanSys SCSI chipset. Most CardBus ethernet card you buy will be based either on DecChip Tulip or 3Com 3c575-something. I personally never had any experience with the 3Com based cards, but all the tulip ones I tried worked perfectly (after that clown Garzik from MundakeSoft stopped screwing with the tulip driver). Combo CardBus cards from Xircom containing a serial and ethernet interface are reported to work as well. You will probably not find a CardBus modem card though. So if you need to use a modem you will have to install pcmcia-cs tools after all. Or get a supported CardBus nic/serial combo. = Video = S3Virge/MX chipset is supported by the generic VESA fbcon driver. You can thus have a 1024x768@16bpp system console. After enabling appropriate options in the kernel configuration, you should be able to boot using boot: linux vga=791 to start 1024x768@16bpp console. = XFree 4.0.1/4.0.2 = XFree86 setup is easy. I compiled my own version from source provided at ftp.xfree86.org: XFree86 Version 4.0.2 / X Window System (protocol Version 11, revision 0, vendor release 6400) Release Date: 18 December 2000 If the server is older than 6-12 months, or if your card is newer than the above date, look for a newer version before reporting problems. (See http://www.XFree86.Org/FAQ) Operating System: Linux 2.4.0 i586 [ELF] Module Loader present It's up to you to choose proper compile options for the project, I will give some suggestions: * Don't enable DRI support * Don't compile drivers other than s3_virge (this will save compile time) * Get rid of -Wpointer-arithmetic and some other useless warnings from the config files. These will generate insane amount of scroll if you are compiling with a recent libc (2.1.3 or 2.1.9x). * As of 4.0.1, the s3virge driver is very stable and supports the chip in this laptop perfectly. = XF86Config = # sample XF86Config Section "Module" Load "dbe" Load "type1" Load "freetype" Load "glx" EndSection Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" FontPath "/usr/X11R6/lib/X11/fonts/local" FontPath "tcp/localhost:7100" FontPath "/usr/X11R6/lib/X11/fonts/ja" FontPath "/usr/X11R6/lib/X11/fonts/TrueType" EndSection Section "InputDevice" Identifier "Keyboard1" Driver "Keyboard" Option "AutoRepeat" "500 30" Option "XkbRules" "xfree86" Option "XkbModel" "pc104" Option "XkbLayout" "us" EndSection Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "PS/2" Option "Device" "/dev/psaux" Option "Emulate3Buttons" Option "Emulate3Timeout" "50" EndSection Section "Monitor" Identifier "LCD" HorizSync 31.5 - 57.0 VertRefresh 50-90 EndSection Section "Device" Identifier "Video" Driver "s3virge" Option "pci_burst" "yes" Option "pci_retry" "yes" EndSection Section "Screen" Identifier "Screen 1" Device "Video" Monitor "LCD" DefaultDepth 16 Subsection "Display" Depth 16 Modes "1024x768" ViewPort 0 0 EndSubsection EndSection Section "ServerLayout" Identifier "Simple Layout" Screen "Screen 1" InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection # end of sample XF86Config Notice, you don't need modelines as the driver will extract display information from the panel using that new and fancy plug and play thingy. Pretty simple. I use xdm to control logins on the machine, xdm is started automatically after boot. xfs (X font server) is started for some of the bitmap fonts that take up too much server time to load, thus you see a font server font path in the sample config file above. True Type fonts are supported very well, and I've had no problems. To actually generate fonts.dir for a directory of true type fonts, you will need a program called "ttmkfdir". Go to google.com/linux and search for it. There are some options you can pass to the program to make it "find" more fonts by allowing some of the "broken" fonts to be indexed. = NETWORKING = As I said above, I use tulip cardbus ethernet cards, loading the module automatically after card insertion. = MISC = If you have some clue as far as how system init scripts work I suggest re-writing them to load only necessary deamons and such; Don't do it if you run redhat, debian, suse or any other distro that comes with "user- friendly" setup tools. The less you understand how your system works the more chances you have of screwing it all up. That's about it as far as post-install. = Features that work and features that dont = Works: * Sound * Video (If you switch from internal panel to external monitor using the Fn-F5 key, the external monitor video will look like crap. Switch to a text console, and switch back to graphics console to fix it. * PCMCIA * APM * Suspend/Standby (this has caused me some data loss under 2.4test10/11. I would be careful if I were you. Don't over use. This has been fixed in 2.4.0 final release.) * USB works, the only testing I had was with USB mice and keyboards, which work fine. * IRDA probably works too if I had any use for it. Doesnt Work: * Internal Lucent Tech Luna 56K WinModem - not a big loss. The linmodem project seems to have their stuff together, and they now have a "driver" for these units which makes it go off-hook, dial a number, and hang up. Impressive indeed. = The End = Unfortunately all good things come to an end - It is my understanding Toshiba no longer manufatures this laptop model and you can only buy it from resellers that still have it. It has been "replaced" with more "Windified" Satellite 4000 series, with a Celeron or a Mobile pII processor and loads of Windows98 approved hardware. This document updated on Feb 01 2000 timecop [timecop@japan.co.jp]