GNU/Linux on a Toshiba Tecra 8000

New Tecra 8000 laptop

2002-02-23: I just bought a Toshiba Tecra 8000 off craigslist to install GNU/Linux on it. Other people have done this too: Adam Crews and Richard Harris.

I transplanted my old IBM 10G Linux hard disk into it from my HP Pavilion N3190 (the HP Pavilion N3190 is very fragile, and I don't expect this machine to be) and it booted with no trouble. Now I just need to get the devices working.

I'm taking these notes for a couple of reasons: it might help me the next time I switch laptops, and it might help someone else installing stuff on a Tecra 8000.

The sellers told me it was a 500MHz Pentium III with 256MB of RAM and a 2GB hard disk; it is actually a 366MHz Pentium II with 128MB of RAM and a 10GB hard disk. About three of these machines sell on eBay every day, at prices ranging from US$400 to US$700 in the last few days, plus typically US$20 of shipping. I paid US$550, so I think I overpaid, but not by very much --- and if I'd bought on eBay, I wouldn't have gotten to inspect the machine first, I wouldn't have it in time for my upcoming trip to Ohio, and I wouldn't have gotten to meet the seller.

(see recent similar machines on eBay)

The machine has a serial port, a parallel port, a USB port, a CD-ROM drive, a floppy drive, a Neomagic video card, a battery, an internal modem, two PCMCIA slots, a keyboard, a built-in pointing device, a hard disk, and a real-time clock.

Adam Crews said he couldn't get his 8000 to boot from a kernel made with bzImage, but I haven't had any trouble booting kernels made with bzImage.

Transplanting the hard disk

Transplanting the hard disk was relatively easy; on the left side of the case is a plastic panel with openable covers for the USB port and power button. A screw on the bottom of the case held this panel in place; with the screw removed, the panel slides down (with some difficulty) to reveal a metal box with a plastic handle on it, which turns out to be the disk pack. It took me a while to figure this out, though.

I took the disk out of the disk pack and put my old disk in there.

It's nice that laptop hard disks are so interchangeable these days.

My configuration

I'm running Linux 2.4.13 (patched with ext3fs), Debian potato, with XFree86 4.1.0 (which I needed to support the Silicon Motion LynxEM in the N3190). I have pcmcia-cs-3.1.29. My old X configuration, of course, does not work; I need to tell X I have a different video card.

PCMCIA

My PCMCIA modem (a Psion Dacom) plugs in and works right off the bat, which means I have Internet access. Hooray. My Ethernet card (an ancient 3Com thing driven by 8390.o) is not so lucky; I think I might have misplaced the driver for it. (My HP didn't reboot very often, so I sometimes forgot things I had to do every bootup.)

It bitches and moans about IRQ conflicts whenever I have both PCMCIA cards in, which the HP didn't.

I think I have deleted the source tree I built my kernel from (2.4.13 patched for ext3fs), unfortunately, and I can't seem to convince 8390.o from the unpatched tree to load. So I don't have Ethernet for the time being.

I'm assuming the built-in modem is a "winmodem" and so I can't use it in Linux, so I need the PCMCIA modem.

Update (2002-02-25): Rebuilt kernel; network card works now, driver is actually pcnet_cs, which merely loads the 8390 driver. I keep seeing messages about IRQ conflicts, though --- looks like whichever card gets inserted first gets IRQ 10. I thought PCMCIA was supposed to keep PC users from having to worry about this garbage anymore! At a friend's suggestion, I tried changing the PCI access mode from "Any" to "BIOS" to see if that would help. It didn't. Apparently (according to Richard Harris) if I'm running Red Hat, I would put PCIC_OPTS="irq_list=10,11" into /etc/sysconfig/pcmcia to fix this. I don't know what that does; I assume it's a load-time module option. Guess I should look that up.

Update (2002-03-27): Hmm, looks like I configured my kernel with a "no" to "i82365 compatible bridge support." The help for that item says, "This includes virtually all modern PCMCIA bridges. ...If unsure, say Y." I also said "no" to the TCIC driver. It's a miracle PCMCIA works at all. (Saying "Y" doesn't seem to make any difference.)

Every once in a while (after being put to sleep a few times?) it seems to get into a state where any PCMCIA card is treated as a memory card and therefore does not work.

Clock

The clock is set for a different timezone than my HP's was, so I have to reset it. This was a matter of "sudo date 02231241" (Feb. 23, 12:41) and then 'sudo hwclock -w' a couple of times. And then 'cat /etc/adjtime' to see what hwclock thought the drift rate was. And then 'man hwclock' to see what the format of /etc/adjtime was. And then, after seeing that hwclock still thought the drift rate was about a minute per day, 'vi /etc/adjtime' to set it to 0.

Keyboard, mouse

The keyboard has the `~ key in a very weird place, to the right of the space bar. That's going to take some getting used to. The built-in pointing device is one of those funky pencil-eraser-in-the-middle-of-the-keyboard things ("Accupoint"). That might take me a while to get used to.

The Ctrl key is in the lower left corner of the keyboard. This is a good arrangement, but the HP had the Fn key there, so I keep hitting the Fn key by mistake. I'll probably make my Caps Lock key another Ctrl key and just use that (except, of course, for A, Q, and Z.)

The little "accupoint" thing seems to get disabled when I plug in an external PS/2 mouse, even after I unplug the external mouse. This is not good at all. I have to restart X to recover, but since restarting X recovers, it seems likely that it's a workaroundable problem --- so there's hope it won't be too hard to get fixed. (See the USB section below for my fix.)

I have a little Y adapter that theoretically lets me connect both an external keyboard and an external PS/2 mouse at the same time. It never worked with the HP, and it doesn't work with the Tecra either.

External USB keyboards work great (in X, haven't tried in console) right out of the box.

After I had this machine for a month, the "r" key started feeling funky (not reliable and not snappy); I pried it off, and with a little help from my friendly neighborhood computer repairman, I managed to put it back on, at which point it worked.

XFree86, video

It makes a noticeable amount of noise when updating the screen.

On X: I know /etc/X11/XF86Config tells X what video card driver to use, but I can't remember how to get a list of video card driver names. /proc/pci says it's a "Neomagic Corporation [MagicMedia 256AV] (rev 18)".

I have a /usr/X11R6/lib/modules/drivers/siliconmotion_drv.o and also a /usr/X11R6/lib/modules/drivers/neomagic_drv.o, so maybe XF86Config says "siliconmotion" somewhere. Indeed it does; grep siliconmotion /etc/X11/XF86Config says:

    Driver      "siliconmotion"

Yay. X -probeonly >/tmp/x.out 2>&1 puts the following lines, among others, in /tmp/x.out:

(II) NEOMAGIC: Driver for Neomagic chipsets: neo2070, neo2090, neo2093,
	neo2097, neo2160, neo2200, neo2230, neo2360, neo2380
(--) Assigning device section with no busID to primary device
(--) Chipset neo2200 found
(II) Loading /usr/X11R6/lib/modules/libvgahw.a
(II) Module vgahw: vendor="The XFree86 Project"
	compiled for 4.1.0, module version = 0.1.0
(II) NEOMAGIC(0): Chipset is a MagicMedia 256AV (NM2200)
(--) NEOMAGIC(0): Panel is a 1024x768 color TFT display
(II) Loading /usr/X11R6/lib/modules/libddc.a
(II) Module ddc: vendor="The XFree86 Project"
	compiled for 4.1.0, module version = 1.0.0
(II) Loading /usr/X11R6/lib/modules/libvbe.a
(II) Module vbe: vendor="The XFree86 Project"
	compiled for 4.1.0, module version = 1.0.0
(II) Loading /usr/X11R6/lib/modules/linux/libint10.a
(II) Module int10: vendor="The XFree86 Project"
	compiled for 4.1.0, module version = 1.0.0
(II) NEOMAGIC(0): initializing int10
(II) NEOMAGIC(0): Primary V_BIOS segment is: 0xc000
(II) NEOMAGIC(0): VESA BIOS detected
(II) NEOMAGIC(0): VESA VBE DDC supported
(II) NEOMAGIC(0): Manufacturer: TOS  Model: 5082  Serial#: 0
(II) NEOMAGIC(0): Year: 1996  Week: 16
(II) NEOMAGIC(0): EDID Version: 1.0
(II) NEOMAGIC(0): Digital Display Input
(II) NEOMAGIC(0): Max H-Image Size [cm]: horiz.: 24  vert.: 18
(II) NEOMAGIC(0): Gamma: 1.00
(II) NEOMAGIC(0): No DPMS capabilities specified; RGB/Color Display
(II) NEOMAGIC(0): redX: 0.000 redY: 0.000   greenX: 0.000 greenY: 0.000
(II) NEOMAGIC(0): blueX: 0.000 blueY: 0.000   whiteX: 0.000 whiteY: 0.000
(II) NEOMAGIC(0): Supported VESA Video Modes:
(II) NEOMAGIC(0): 640x480@60Hz
(II) NEOMAGIC(0): 800x600@60Hz
(II) NEOMAGIC(0): 1024x768@60Hz
(II) NEOMAGIC(0): Manufacturer's mask: 0
(**) NEOMAGIC(0): Depth 24, (--) framebuffer bpp 24
(==) NEOMAGIC(0): RGB weight 888
(==) NEOMAGIC(0): Default visual is TrueColor
(==) NEOMAGIC(0): Using gamma correction (1.0, 1.0, 1.0)
(--) NEOMAGIC(0): Simultaneous LCD/CRT display mode
(==) NEOMAGIC(0): using linear mode
(**) NEOMAGIC(0): using PCI Burst mode
(--) NEOMAGIC(0): FB base address is set at 0xDF000000.
(--) NEOMAGIC(0): MMIO base address is set at 0xFF800000.
(--) NEOMAGIC(0): VideoRAM: 2560 kByte
(--) NEOMAGIC(0): Max Clock: 110000 kHz
[many lines about modes omitted here...]
(--) NEOMAGIC(0): Virtual size is 1024x768 (pitch 1024)
(**) NEOMAGIC(0): Default mode "1024x768": 94.5 MHz, 68.7 kHz, 85.0 Hz
(--) NEOMAGIC(0): Display dimensions: (24, 18) cm
(--) NEOMAGIC(0): DPI set to (108, 108)

So it looks like it should work.

And indeed it does! I'm typing this in X. X is really incredibly slow, though (see the update at the end of this section for how I solved this problem), and it seems kind of flickery on my CRT --- doesn't look like 85 Hz. (It looks like X being slow is mostly a matter of bitblt being slow --- so xterm scrolls really slowly, but redraws are nice and fast. Weird.)

(The 2.5MB stuff above does match Toshiba's spec sheet. Pathetic, but oh well.)

I looked at the x11perf results --- I ran x11perf -all on both the Pavilion and this Tecra, then ran x11perfcomp to get comparisons, and then ran perl -ne 'my ($a, $b) = split; printf "%6.2f %s", $a/$b, $_' | sort -n on the output of x11perfcomp to sort the comparisons by the ratio between them.

It looks like the median ratio is about 1.5, with the Pavilion being about 50% faster, which isn't too unreasonable --- the Pavilion has a 27% faster CPU clock and probably has a 50% faster FSB. For a few tests, the Tecra is two or three times faster --- copy 500x500 from pixmap to window, ShmPutImage 100x100 square, and a dozen or so others (out of 332). But there are several tests where the Tecra is orders of magnitude slower. On the "500x500 stippled rectangle (8x8 stipple)" test, the Pavilion could do 854 iterations per second, while the Tecra could do 6, a ratio of 142. All of the stipple tests were at least 5 times slower on the Tecra. "Scroll 500x500 pixels" ran 6.9 iterations per second on the Tecra (consistent with my observation that it takes about a second to scroll the entire screen) and 281 iterations per second on the Pavilion.

All of the tests that are very slow on the Tecra are either moving windows, scrolling, stippling, or drawing characters. I don't know what conclusions to draw from that.

2002-03-28: It turns out that my video slowness disappears if I use 16 bits per pixel instead of 24 bits per pixel. I can do this by running startx -- -fbbpp 16 or by changing DefaultDepth 24 to DefaultDepth 16 in /etc/X11/XF86Config.

Sound

/proc/pci doesn't list anything about sound devices. Toshiba had a "TECRA 8000 Series Product Specifications" tecra_8000.pdf on their web site, though, which I downloaded before I bought the machine.

The spec sheet says it has a "Yamaha 3D sound effect-enabled OPL3-SA3". 'locate opl3' says there's a file called "opl3sa2.c" in drivers/sound/, and the top of that file says it supports the SA3 too. Unfortunately, I didn't compile that file the last time I built the kernel, and since I'm currently unable to compile modules (as explained above under the PCMCIA section) I guess I'll have to wait.

Update (2002-02-25): built a new kernel with the opl3sa2 driver. At boot, it complains:

opl3sa2: No PnP cards found
opl3sa2: 0 PnP card(s) found.

Writing to /dev/audio gives a "No such device" error.

These settings in modules.conf from some random web page (from emptydog.com, crediting Caldera's knowledge base) load correctly:

alias char-major-14 opl3sa2
pre-install opl3sa2 modprobe "-k" "ad1848"
post-install opl3sa2 modprobe "-k" "opl3"
options opl3sa2 io=0x538 mss_io=0x530 mpu_io=0x330 irq=5 dma=1 dma2=0
options opl3 io=0x388

That is to say, they cause the following messages to appear in /var/log/syslog when I sudo modprobe char-major-14:

Feb 25 15:50:30 detached kernel: ad1848/cs4248 codec driver Copyright (C) by Hannu Savolainen 1993-1996
Feb 25 15:50:30 detached kernel: ad1848: No ISAPnP cards found, trying standard ones...
Feb 25 15:50:30 detached kernel: opl3sa2: No PnP cards found
Feb 25 15:50:30 detached kernel: opl3sa2: Search for a card at 0x1336.
Feb 25 15:50:30 detached kernel: opl3sa2: chipset version = 0x5
Feb 25 15:50:30 detached kernel: opl3sa2: Found OPL3-SA3 (YMF715E or YMF719E)
Feb 25 15:50:30 detached kernel: <OPL3-SA3> at 0x538 irq 5 dma 1,0
Feb 25 15:50:30 detached kernel: <MS Sound System (CS4231)> at 0x534 irq 5 dma 1,0
Feb 25 15:50:30 detached kernel: <MPU-401 0.0  Midi interface #1> at 0x330 irq 5 dma -1,0
Feb 25 15:50:30 detached kernel: opl3sa2: Control I/O port 0x538 not free
Feb 25 15:50:30 detached kernel: opl3sa2: There was a problem probing one  of the ISA PNP cards, continuing
Feb 25 15:50:30 detached kernel: opl3sa2: Control I/O port 0x538 not free
Feb 25 15:50:30 detached kernel: opl3sa2: There was a problem probing one  of the ISA PNP cards, continuing
Feb 25 15:50:30 detached kernel: opl3sa2: Control I/O port 0x538 not free
Feb 25 15:50:30 detached kernel: opl3sa2: There was a problem probing one  of the ISA PNP cards, continuing
Feb 25 15:50:30 detached kernel: YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
Feb 25 15:50:30 detached kernel: <Yamaha OPL3> at 0x388

At this point, I still didn't get any sound when I catted .au files to /dev/audio, though. It took time and didn't generate errors, but it was silent. I could run "aumix", which lets me adjust some sliders, but didn't have any visible (or audible) effect. It turned out this was due to the physical volume knob on the front panel being turned too far down, but, embarrassingly, I didn't discover this for 30 days after I'd done all the above. Sound input works too.

Battery

The built-in battery is 3.75 amp-hours.

Unlike the trashy HP Pavilion N3190, the Tecra's APM BIOS estimates the time until the battery is discharged, and the Tecra actually supports a second 250g 3.6 amp-hour battery in the modular slot in place of the CD or floppy drive.

It appears that the battery life for the thing on a single battery is around 2-3 hours. I hope adding a second one will bring it to around 5-7.

Unfortunately, APM is very dodgy. It can go from thinking the battery is 41% full to thinking it's 2% full within a second, and almost always does. When it's charging back up, it will usually charge at a normal rate until it reaches somewhere between 80% and 90%, and then jump all the way to 100% within a second.

CPU

The sellers told me it was a 500MHz Pentium III, and there's a Pentium III sticker on the case. But /proc/cpuinfo says it's a 366MHz Pentium II. Still, it's not a bad deal for the money, and it will suffice for what I need; and I suspect the deception was accidental --- they also thought the hard drive was 2GB, not 10GB.

I've learned my lesson about not checking what the BIOS says...

USB

Enabling USB in the kernel (using the normal UHCI driver, not the JE one; I haven't tried the JE one) causes messages to show up in /var/log/syslog when I plug and unplug my mouse. It isn't immediately obvious to me how to make the mouse work in X, though.

It does claim I have two USB ports, although I can only see one. Perhaps there's a second USB port on the port replicator, which I don't have.

How to get the USB mouse to work with XFree86 is explained in the kernel's Documentation/input/input.txt. It has an example configuration there for XFree86 3.x; I transliterated it as follows for XFree86 4.x, in /etc/X11/XF86Config:

# USB mice, see Documentation/input/input.txt in Linux 2.4
Section "InputDevice"
    Identifier "USBmice"
    Driver "mouse"
    Option "Protocol" "PS/2"
    Option "Device" "/dev/input/mice"
    Option "Emulate3Buttons"
EndSection

(later, where such things are being specified...)

    InputDevice "USBMice" "SendCoreEvents"

And in my shell:

sudo mkdir /dev/input
sudo mknod /dev/input/mice c 13 63

Now plugging in a USB mouse causes it to act like the built-in "mouse", but without disabling the built-in pointing device. This is really great. As mentioned earlier, the PS/2 Y adapter for my keyboard and mouse doesn't work with this laptop; the built-in "accupoint" pointing device is not nearly as quick and accurate as a mouse (although it can be used when there are no horizontal surfaces nearby, unlike a mouse); as mentioned earlier, plugging a mouse into the PS/2 port disables the built-in pointing device until I restart X; and now I can plug an external keyboard, mouse, and monitor into the computer and use it like a desktop, which should prolong its useful life somewhat.

Parallel port

I plugged a parallel laser printer into the parallel port and tried to write to /dev/lp0. I got a "Device not configured" error, ENXIO. I don't know why.

/proc/sys/dev/parport has (in addition to "default") a directory called "parport0", indicating that the parallel port driver found a parallel port. /proc/sys/dev/parport/parport0/devices/active says "none"; there's also a /proc/sys/dev/parport/parport0/devices/i2c-philips-par/timeslice, but nothing else.

Hmm, when the machine booted, it did say:

i2c-philips-par.o: i2c Philips parallel port adapter module
i2c-philips-par.o: attaching to parport0
i2c-dev.o: Registered 'Philips Parallel port adapter' as minor 0
i2c-core.o: adapter Philips Parallel port adapter registered as adapter 0.

and then later:

parport0: no more devices allowed
lp: driver loaded but no devices found

So I think I shouldn't have enabled the I2C Philips parallel port support, or at least not built it into my kernel. The help for the I2C Philips parallel port thingy says:

Note that if you want support for different parallel port devices, life will be much easier if you compile them all as modules.

I guess that's what I get for enabling kernel features without understanding them.

Once the I2C Philips interface was disabled, I could print by talking to /dev/lp0.

TV output

There's a "video out" jack on the back of the Tecra. I haven't been able to get anything out of it, but I'm not sure if I'm even hooking it up to the right input on my roommates' TV.

Serial ports

Looks like it detected the built-in serial port at bootup; according to dmesg:

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A

I can, in fact, use ttyS0 to talk to my (Samsung SCH-6100) cell phone, which pretends to be a modem, as long as I use 19200 baud --- speaking at any other baud rate is ignored by the phone. This is very useful, as I have 2800 night and weekend minutes and PPP service.

Infrared port

I don't have any infrared devices, so I don't know if the infrared port works.

lm_sensors

I sort of assumed that this machine, being reasonably new, would include sensors for things like motherboard temperature and CPU temperature, but /proc/bus/i2c is empty and /dev/i2c-0 says "no such device".

Remaining problems