Linux on the Acer TravelMate 312T
24 Sep 1999 - Niccolo Rigacci
([email protected])
Absolutely NO WARRANTY, use this document at your own risk!
Any comment, correction, spelling or suggestion is welcome.
Topics covered in this review
Overview
The configuration I used
- Acer TravelMate 312T (Italian)
- Processor: Intel Pentium MMX 233 MHz
- RAM: 32 Mb
- Hard Disk: IBM-DKLA-23240, 3102MB w/460kB Cache, CHS=788/128/63
- Display: LCD 800x600, 65k color TFT
- Display adapter: NeoMagic MagicGraph 128ZV+ (NM2097), 1152k video RAM
- CD-ROM: boundled PCMCIA Pocket CD-II
- Pointer: integrated touchpad, PS/2 compatible
- Sound: integrated Yamaha OPL3-SAx Sound System
- PCMCIA: 02Micro OZ6832/6833 CardBus Controller
- Modem: integrated LT Win Modem
- Modem: PCMCIA Modem Fax 33.6
- Network: PCMCIA Ethernet adapter IC-CARD+ (NE2000 compatible)
- Operating System: Debian GNU/Linux 2.0, kernel 2.0.34
PCMCIA Card Services 3.0.9
Kernel 2.2.1 (for testing sound support)
Some generic consideration about the notebook. It is a lilliput notebook:
23.5 x 18.5 x 4 cm, but the display (17 x 13 cm) is very good. The keyboard
is not the better you can hope, the keys are 15.5 mm wide and the excursion
is very little. It is more a keyboard for an hand-held than for a notebook.
My previous portable was a Compaq Aero, it was a bit bigger (26 x 19 x 4
cm), but its keyboard was really better, with true 17.5 mm keys.
Pro
- Extremely portable
- Good display
- Good performance
- True PC (not a Windows CE obscenity)
- Linux support quite complete (not the modem!)
Con
- Integrated modem is an half-modem
- Poor keyboard
- Extra stuff to carry if you need floppy or CD-ROM
- Windows preinstalled, destructive Recovery-CD
Installing Linux and Windows 98
If you want Windows 98 and Linux together on the notebook, I think the best
way is using Fips to reduce the Windows partition and make room for the
Linux ones. I used Fips version 1.5 with FAT32 support.
It is also feasible to destructively repartition the disk, but
reinstalling Windows is a little tricky. In fact you CAN'T use the Recovery
CD coming with the notebook for installing Windows on a partitioned disk:
the utility blindly and dumbly restore the disk in one large Windows
partition, destroying any scheme you created.
On the Recovery CD there are also the plain Windows 98 installation
files, so you can go through the standard Windows setup process, but finding
and installing drivers for all the integrated peripherials require several
efforts.
If you want the hibernation function to work, you have to know
that it doesn't work in the default "hibernate to file" manner if the disk
is splitted in several partitions. You must to use the "hibernate to
partition" option. In brief:
- Reduce the Windows partition with Fips
- Create the hibernation partition with PHDISK
- Install Linux creating the Linux Native and Linux Swap partition.
See the Advanced Power Management section of this document for more details
and read carefully Fips documentation.
For Linux installation, follow your distribution's guidelines. For
Debian GNU/Linux 2.0 I think the best way is to copy files from
debian/dists/stable/main/disks-i386/current/ directory into an Windows
directory, restart in MS-DOS mode and launch INSTALL.BAT.
I discovered only a conflict between Windows 98 and Linux. If I
start Windows and let it to initialize some PC Card, when I reboot in
Linux I'm unable to initialize any PC Card (I get the "unable to map
card memory!" error message). I need to power off the notebook to
restore the PC Card controller functionality.
Configuring Linux
Plug and Play support with isapnp
I use isapnptool 1.13 to configure the resources used by the sound card and
the internal modem. Isapnp is needed to initialize the hardware, otherwise
it does not work. I just run "isapnp /etc/isapnp.conf" at boot time. Here it
is my /etc/isapnp.conf. Note that I don't
initialize the internal Win Modem, so some resources remains free for other
peripherials.
PCMCIA support
I downloaded and installed the pcmcia-cs-3.0.9.tar.gz package, this new
version provides better support for 02Micro PCMCIA controller and support
for kernels 2.2.x (don't yet tested by me). The included PCMCIA-HOWTO is a
very comprehensive reading.
Follow the instructions in the howto: you have to "make config", "make
all" and "make install". If you change your kernel, redo the procedure.
After that, all worked for me, but I still made some changes in /etc/init.d/pcmcia script and in /etc/pcmcia/config.opts, just to avoid potential
resources conflicts. In the first I specified
PCIC_OPTS="irq_list=10,11,15 poll_interval=150"
This tells to card service what interrupts to use and that it have to run in
poll mode, instead of using an IRQ for status change monitoring. In the
other file I specified what I/O ports and memory resources to use and what
interrupts don't use (the last is redundant, I know!) for allocating to
PCMCIA cards. Have a look at the files for comments.
To configure some PCMCIA cards, editing /etc/pcmcia/ scripts is needed,
but this is not specific to Acter TravelMate. For the PCMCIA CD-ROM boundled
with the notebook, a little tricky solution is needed instead. See the
specific chapter in this review.
Kernel 2.0.x
I used kernel 2.0.34. The only drawaback whit this version is that sound is
not supported, even the Soudblaster Pro. I compiled the sound module for the
standard Soundblaster Pro 8 bit, but when I try to load the module it fails.
If someone succeeded in playing audio with kernel 2.0.x, let me know!.
I think the best way to tell how my kernel is configured is showing my /usr/src/linux/.config file. Only a note: when I enabled
the "CONFIG_APM_CPU_IDLE=y" I got some keyboard hang running X-Window, so I
disabled it.
Kernel 2.2.x
I gave kernel 2.2.1 a try. I think it's a very good kernel, sound is
supported for the Yamaha chip, PCMCIA package 3.0.9 should work on it.
Nevrtheless my installation is not still prepared for the jump, I got some
errors at the bootstrap from application not 2.2.x aware. I'll wait
Debian do the jump...
Floppy disk drive support
The external floppy drive works under Linux, you can use mtools or mount it.
I think the better procedure is:
- compile the kernel with floppy support as a module
(CONFIG_BLK_DEV_FD=m)
- do not load the floppy module at boot
- hot-plug the floppy to the notebook when needed
- "modprobe floppy"
- "mount /dev/fd0 /floppy" (or use any mtool command)
- "umount /floppy"
- "rmmod floppy"
- now you can hot-unplug the floppy from the notebook
PCMCIA Pocket CD-II support
NOTE: I was told that with newer kernels the CD-ROM
works without problem. The mantainer of the IDE driver integrated
the patch (discussed below) in the source code. I had a look at the
source of kernel 2.2.12 and the fix is there.
What I'm writing below is applicable instead to kernel 2.0.34.
In oreder to make the CD working under Linux, a little kernel hacking
is needed. It seems that there is a problem caused by the drive which take
too much time to respond, so with the standard kernel you get several errors
when you try to mount the drive, like those:
Feb 22 10:36:43 chios kernel: hdc: status error: status=0x08
Feb 22 10:36:43 chios kernel: hdc: drive not ready for command
Feb 22 10:36:43 chios kernel: hdc: ATAPI reset complete
Feb 22 10:36:43 chios kernel: hdc: status error: status=0x00
Feb 22 10:36:43 chios kernel: hdc: ATAPI reset complete
Feb 22 10:36:43 chios kernel: hdc: status error: status=0x00
Feb 22 10:36:43 chios kernel: end_request: I/O error, dev 16:00, sector 0
A workaround was proposed (31 Dec 1998) by Matthew Faupel ([email protected]) and
it is posted at the Linux PCMCIA driver
Hyper News system. I propose a little revised one:
- You must hack and recompile your kernel: edit ide.c
file (usually in /usr/src/linux/drivers/block/ide.c)
and change the ide_wait_stat() function. Here it is
the "diff", as you can see ten attempts are made instead
of just one.
1413,1415c1413,1418
< udelay(1); /* allow status to settle, then read it again */
< if (OK_STAT((stat = GET_STAT()), good, bad))
< return 0;
---
> /* allow status to settle, then read it again */
> { int i;
> for (i = 0; i < 10; i++) {
> udelay(1);
> if (OK_STAT((stat = GET_STAT()), good, bad)) return 0;
> }}
- Recompile the kernel with IDE/ATAPI CDROM support, support
for removable IDE interfaces and for iso9660 file system:
(CONFIG_BLK_DEV_IDECD=y, CONFIG_BLK_DEV_IDE_PCMCIA=y,
CONFIG_ISO9660_FS=y).If needed recompile the PCMCIA modules too.
- Now, if you have properly installed the new kernel and the
PCMCIA package, when you insert the PCMCIA card you see the
following messages on the console:
hdc: CD-ROM CDR_U240, ATAPI CDROM drive
ide1 at 0x300-0x307,0x30e on irq 10
hdc: media changed
hdc : tray open or drive not ready
hdc : tray open or drive not ready
hdc : tray open or drive not ready
hdc : tray open or drive not ready
hdc : tray open or drive not ready
hdc : tray open or drive not ready
Ignore the error messages: we should increase some other
timeout somewhere in the kernel source...
The good thing is that now the device /dev/hdc is ready:
"mount -t iso9660 /dev/hdc /cdrom"
Remember to "cardctl eject" the PCMCIA card before
actually removing it, as the PCMCIA-HOWTO says.
This is a brief explanation of PCMCIA CD-ROM on the Acer TravelMate,
refer to the PCMCIA-HOWTO and to your Linux distribution for any
other detail.
Note also that Debian 2.0 has a little bug in the pcmcia-cs package:
the /sbin/ide_info binary is not installed with the package, but the
/etc/pcmcia/fixed script refers to it. So auto mounting of PCMCIA IDE
device fails.
PCMCIA Ethernet adapter
I have two NE2000 compatible PCMCIA Ethernet adapter, the standard
installation of Debian GNU/Linux properly recognize the cards as soon as I
inserted it. Auto-configuring the inserted card require editing
/etc/pcmcia/network.opts script. For any help read the PCMCIA-HOWTO.
X-Window
The video card integrated in the TravelMate 312T is a NeoMagic
MagicGraph 128ZV+, with 1.1 Mb of RAM capable of 65k colors at
800x600. Fortunately XFree86 supports this card, beginning
from version 3.3.3.1.
Unfortunately my Linux distribution (Debian 2.0) installs
XFree 3.3.2.3.
I'm too lazy to get the xfree sources and recompile them. I'm
also so paranoid that I don't want to install xfree binaries
which are not packaged in a .deb file.
I adopted the following quick and dirty solution.
- Installed xfree 3.3.2.3 for a standard VGA 16 colors.
- Unpacked the new XF86_SVGA server in /usr/bin/X11/.
I got the compiled binary directly from
xfree ftp site.
Note that my system is running the new glibc, if you are using the
old libc5, you must get the appropriate file.
- Configured my distribution so that the default server is XF86_SVGA,
and not XF86_VGA16. With Debian 2.0 it is the matter of changing
the first line of /etc/X11/Xserver. On other system it my require
to change a symbolic link.
- Wrote the /etc/X11/XF86Config configuration
file. The relevant sections are Monitor, Device and Screen. Get the
file and have a look to it. Note that I use an Italian keyboard!
External monitor
I had to use intern_disp and extern_disp
options in XF86Config to select the output device. When only external
monitor is selected, the graphic chip selects an higher refresh rate,
like in Windows. Those are the values reported by my Sony Multiscan
200sx:
| Frequencies | Output | Resolution |
| 37.9 kHz/60 Hz | both | 800x600 and 640x480 |
| 53.4 kHz/84 Hz | external | 800x600 |
| 43.3 kHz/85 Hz | external | 640x480 |
She the hotkeys section about Fn+F5.
Integrated pseudo modem
The integrated modem is a Win-modem, not supported by MS-DOS
or Linux. To save little money, Acer gave us a big hassle.
What a shame!
Fortunately you can avoid activating the modem with isapnp, so this
useless piece of hardware does not allocate resources. I use a PCMCIA modem
instead, without problems.
Integrated sound card
Big trouble: I'm using kernel 2.0.34, but sound support for
this sound card is in kernel 2.2.x. I made some experiment, with
kernel 2.2.1. I was able to play midi and digital audio, but something
still does not work: I'm unable to
record from the microphone and the PCMCIA modules for kernel 2.0.34 won't
load with kernel 2.2.1 (just recompile, I think!).
The Acer TarvelMate 312 has an Yamaha OPL3-SAx (YMF719) chipset
which implement the following devices:
- OPL3 FM synthesizer
- Soundblaster Pro
- Microsoft/Windows Sound System
- MPU401 MIDI interface
Soundblaster Pro and MSS are both digital audio devices, but MSS
has better capabilities than Soundblaster Pro (which handles only 8 bit
audio), so we will use MSS sound driver in Linux.
The FM synthesizer is a digital instrument which generates "synthetic"
notes. It is mainly used via the MPU401 MIDI interface, thus simulating
a complete MIDI synthesizer.
Configuring the PnP
The card is a Plug and Play device, so some configuration is needed.
I done that via isapnp, an utility which allows you to configure
all the PnP devices in the system. Isapnp sets the I/O, IRQ, DMA and
memory resources used by those PnP devices.
In our notebook there are two PnP devices: the sound card and the
(sic!) Win Modem. The resources I used was:
- I/O 0x220 - Soundblaster Pro
- I/O 0x530 - Microsoft/Windows Sound System
- I/O 0x388 - OPL3 FM synthesizer
- I/O 0x330 - MPU401 MIDI interface
- I/O 0x370 - Port used for sound card control
- IRQ 5 - A single interrupt used for MSS, Sb Pro, MPU401
- DMA 0 - First DMA channel for MSS or Soundblaster Pro
- DMA 7 - Second DMA channel for MSS
- I/O 0x3e8 - Win Modem I/O base address (I disabled it)
- IRQ 10 - Win Modem IRQ (disabled for me)
- I/O 0x100 - Win Modem control? (disabled too)
To set the resources I start "isapnp /etc/isapnp.conf" at boot time.
Here it is my isapnp.conf file.
This means also that the sound drivers must be compiled as modules
and loaded after isapnp done its work.
Building the kernel and the modules
I tested it with kernel 2.2.1.
Basically you need to respond at the following questions (note that
Soundblaster Pro is not activated, because MSS does the same better):
- CONFIG_SOUND=m
- Sound card support, of course! Compiled as a module because I
want to start it after isapnp initialized the hardware.
- CONFIG_SOUND_OSS=m
- The driver for our sound card is included in the Open Sound
System suite.
- CONFIG_SOUND_ADLIB=m
- Generic OPL2/OPL3 FM synthesizer support. This generates the
ad1848.o module, needed by the specific opl3sa2.o module.
- CONFIG_SOUND_MPU401=m
- MPU-401 support. This generates the mpu401.o module, needed
to have a midi device (used by playmidi and others).
- CONFIG_SOUND_MSS=m
- This option is required by the specific driver of our card,
it provides services for the audio device (/dev/audio) and the
mixer (used by aumix and other programs).
- CONFIG_SOUND_OPL3SA2=m
- This is the specific driver of our sound card, it generates
the opl3sa2.o module.
- CONFIG_SOUND_SOFTOSS=m
- This module provides a synthesizer device based on "soft
wavetable". A device capable of playing midi files where
notes are *NOT* generated by FM synthesis, but generated using
digital samples of true instruments. This is done in real time
using a lot of CPU power. Documentation suggests to avoid it if
you have less than a Pentium 133 and 16 Mb RAM. You also need
to provide the instrument samples.
See /usr/src/linux/Documentation/sound/README.OSS.
The module generated is softoss2.o, the synth device provided is
compatible with Gravis Ultrasound, so "playmidi -g" should work.
- CONFIG_SOUND_YM3812=m
- FM synthesizer (YM3812/OPL-3) support. This generates the
opl3.o module, needed to have the FM synthesizer device.
Testing everything
After recompiling the kernel and installing it along with its modules
you can load the sound modules with
modprobe sound
modprobe mpu401
modprobe ad1848
modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=5 dma=0 dma2=7
modprobe opl3 io=0x388
modprobe softoss2
You can test if everything gone well by "cat /dev/sndstat".
The output should reports an audio device "MS Sound System",
two synth devices "Yamaha OPL3" and "SoftOSS", a midi device
"MPU-401", two mixers: OPL3-SAx and MSS (programs will refer
to the last one).
Before testing the audio, run a program like aumix to set the
proper master and devices volume.
To play some midi file you must have a program like playmidi,
run "playmidi sample.mid". Use "playmidi -g" if you have the
SoftOSS module loaded and drop me some notes if this works for
you, I don't yet tested it :-).
To record and playback digital audio you need programs like
bplay and brec, which handle RAW, WAV and other formats.
You should also be able to use /dev/audio directly with
commands like:
dd bs=8k count=4 < /dev/audio > sample.au
cat sample.au > /dev/audio
Till now I was able only to playback audio. I don't know way recording
from the microphone doesn't work. If it works for you, please drop a
mail!
For people with kernel 2.0.x not much concerned with free software,
there is a thing called
Open Sound System,
which is NOT free software. The OSS/Linux 3.9.2 package supports
Yamaha OPL3-SAx, but I have not tested it and I don't plan to do it,
because it is not free software.
Advanced Power Management
I compiled the kernel 2.0.34 with CONFIG_APM=y. I'm a little hesitating
because the kernel documentation about APM states:
Many "green" desktop machines also don't have compliant BIOSes, and this
driver will cause those machines to panic during the boot phase
(typically, these machines are using a data segment of 0040, which is
reserved for the Linux kernel).
The messages displayed during bootstrap by the kernel are:
APM BIOS version 1.2 Flags 0x03 (Driver version 1.2)
Entry f000:3fb5 cseg16 f000 dseg 40 cseg len ffff, dseg len ffff
Connection version 1.1
AC on line, battery status high, battery life 100%
battery flag 0x01, battery life unknown
So I'm not sure that APM can be safely enabled. Till now I don't have
observed any strange behaviour, and "cat /proc/apm" display all the info I
need. Just don't enable CONFIG_APM_CPU_IDLE, I experienced some keyboard
lock with this option. Again see my /usr/src/linux/.config file for all the options.
Standby
The standby function (Fn+F3) works in Linux, but the time is not resumed
after wakeup. If anybody know how to fix it...
Hibernation
The hibernation function (Fn+F4) did not work in my system after I
repartitioned the disk for Windows and Linux. I suppose that the default
"hibernate to file" method works only with a single partition. Fortunately
the "hibernate to partition" scheme works, with Windows and Linux.
The PHDISK utility is used to create the hibernation file or partition. It
is installed in C:\Windows\Command\ or you can find it in the Recovery CD
under \Drivers\Win98\Phdisk\.
WARNING: I THINK THAT THE UTILITY IS BUGGY, IT DESTROYED MY PARTITION TABLE
LOOSING ALL MY DATA WITHOUT A WARNING!
I suppose that "PHDISK /CREATE /PARTITION" should use the 4th entry of the
partition table (/dev/hda4), allocating cylinders at the end of the disk.
But when I first started the utility, I had Windows on hda2, Linux on hda3
and swap on hda4: Phdisk SIMPLY ERASED MY PARTITION TABLE, LOOSING ALL MY
DATA! In the second try I do the following:
- Installed a fresh system from the Recovery CD.
- PHDISK /DELETE /FILE (removed hibernation file).
- Used Fips to shrink the Windows partition to 1.5 Gb, creating a new one.
- Used Windows fdisk to remove the new, empty partition.
- PHDISK /CREATE /PARTITION (created /dev/hda4 of 32 Mb)
- Installed Linux creating /dev/hda2 Linux swap of 32 Mb and
/dev/hda3 Linux native of the remaining (1.5 Gb)
Shutdown
Compiling kernel 2.0.34 with the option CONFIG_APM_POWER_OFF=y enables
automatic power off when halt command is executed.
Hot Keys
| Hot key |
Purpose |
Works on Linux |
Note |
| Fn+F1 |
Displays the hot key list and help |
Yes |
|
| Fn+F2 |
Accesses the notebook setup utility |
No |
Of course: under Windows it starts a Windows application
from a Windows directory, under Linux it can't. |
| Fn+F3 |
Puts the computer in Stanby mode |
Yes |
The Ethernet PC Card is properly restored.
Sometimes the time is not restored. |
| Fn+F4 |
Puts the computer in Hibernation mode |
Yes |
The "hibernate to partition" must be activated.
If the default "hibernate to file" scheme is choosen,
it works only from Windows, not from Linux. See the
APM section. The Ethernet PC Card
is properly restored. |
| Fn+F5 |
Switches display output: internal, external or both |
Partially |
It works in text mode only. Under X-Window the display is
selected within XF86Config instead. See the
X section. |
| Fn+F6 |
Turns the internal speaker on and off |
|
Not tested. |
| Fn+F7 |
Decreases the speaker's volume level |
|
Not tested. |
| Fn+F8 |
Increases the speaker's volume level |
|
Not tested. |
| Fn+F9 |
Decreases the screen brightness |
Yes |
|
| Fn+F10 |
Increases the screen brightness |
Yes |
|
| Fn+F11 |
Decreases the screen contrast |
N/A |
Not applicable to TFT display. |
| Fn+F12 |
Increases the screen contrast |
N/A |
Not applicable to TFT display. |
| Fn+T |
Turns the internal touchpad on and off |
Yes |
|
| Fn+D |
Turns the display backlight off to save power |
Yes |
|
Useful references