Linux on the Vaio SR17k and SR33 Mini-Laptops
I have a Sony Vaio SR17k, and my hsband has a Vaio SR33. (Same
machine, except that the SR17 has a 700 PIII CPU and a 1024x768 screen,
while the SR33 has a Celeron 600 and 800x600.& Obviously, these
machines are a few years old now, but they work wonderfully with Linux,
and we're still very happy with them.& Here are the details.
6/17/2003: I reorganized the page, because I've been getting some
questions about some of the out-of-date stuff that works much better in
recent linux kernels and distros.
Table of Contents:
- Which Linux Distro for the Vaio?
- Installing
- With CDROM
- Without CDROM
- A Note on Partitioning
- Some special distro notes
- Hardware Issues:
- Configuring X
- Sound
- Power Management Issues
- APM BIOS Sleep
- ACPI
- Software Suspend
- The Jog Dial (also covers screen
brightness control)
- Winmodem
- Memory Stick Reader (plus reading other
types of flash memory)
- Mouse
- Serial device (PDA)
- Reliability
- Cases/Bags
- Future challenges
- Links to other sites
Which Linux Distro for the Vaio?
Currently (June 2003) my SR17
is dual-boot with Redhat 8 and Debian Sarge.
If you want the easiest install experience, the choice is simple.
Choose either Redhat 7.3 or Redhat 8: choose 7.3 if you want something
solid that comes with things like an mp3 player, or 8 if you care more
about anti-aliased fonts.& Either one installs beautifully to the
SR17 and autoconfigures just about everything.
Other distributions, such as Debian/Libranet, SuSE, and Mandrake, can
run fine on this machine, but will need a little more tweaking before
it's all working.& Redhat 9 dropped support for the Vaio CDROM, so
it needs the same tweaks that the other distros do (sigh).& I'll
talk about these tweaks shortly.& It also seems to have dropped
support for some other hardware (RH9 installs have failed on several
other machines we have) and when it failed on the Vaio CD I was short
on
time, so I gave up on 9 and went back to 8 and haven't had time yet to
go back and make another try.
I would recommend sticking to fairly modern distros which come with a
kernel of 2.4.18 or better.& Enough things have changed that not
only will you have hardware compatibility problems with older releases,
but you'll have trouble finding software which runs with your
libraries.& If you're worried that newer distros have bigger
slower
software, don't be.& You don't have to run a full bloatware window
environment like kde or gnome.& I've found that icewm, xfce,
blackbox, and afterstep all run very well on the Vaio and don't hog
resources.& (There are other good lightweight window managers,
too.& I still haven't settled on which one I like best.)
Installing
Since the Vaio has no built-in CDROM, the install procedure depends on
whether you have an attached bootable device.& If you have a
floppy, follow your distro's instructions. & Apparently the
Vaio can boot off a USB floppy, but I don't have one so I haven't tried
it.
With CD Drive
The Sony CDROM has a PCMCIA interface, and the Vaio can boot from
it.& (I assume it can boot from other PCMCIA CD drives as well;
some day I'll find out.)& So this should be easy, right?
Just
install like you would on any desktop machine?
Well, on Redhat (pre 9.0), yes, but on any other distro, there's a
catch.& What happens is that you boot from the CD, the boot loader
reads the installer kernel, the installer kernel starts loading modules
from the CD, it gets to the PCMCIA module -- and it loses all track of
the CD.& There's something different about the Sony CD compared to
what most installers expect to find.& (Unfortunately, this also
happens with recovery CDs like the Bootable Business Card and
SuperRescue.)
It turns out you just need to know the magic words.& When you boot
from the installer, instead of letting it default, you need to add the
parameter:
ide2=0x180,0x386
Usually this involves getting to a boot prompt, then typing
something like:
linux ide2=0x180,0x386
Fedora's release notes recommend a slightly different set of
options:
pci=off ide1=0x180,0x386
but it doesn't seem to work for me -- the installer kernel panics.
With any luck, some combination of these arguments
will get you into the installer and on your way,
and you will have no further troubles.& With some distros, you may
have CD problems even once you're up and running.& If so, you
may also need to
add this parameter to the boot line in lilo.conf or grub.conf too.
Without CD Drive
Without a CD drive, you have no boot device.& So the problem is
much harder: you have to somehow get a linux image onto the disk.
There are two ways to do this:
- Remove the disk, install it in another machine that does have a
CD, install linux, then move the disk back.& This should work
fine.& Don't forget to install laptop and PCMCIA stuff, since you
might have a hard time doing it later if both your CDROM and your
network run through PCMCIA. :-)
- Copy a Linux image from Windows.& I have never done this,
but before I bought by Vaio, I expected I'd have to.
I did some research on the web. I didn't find many pages on
Vaio SR Linux installations; but it turned out that the Toshiba
Libretto
mini-laptop is a very popular mini-laptop which also lacks CD and
floppy, and there are several pages describing the solution to the
problem, for instance, here,here,here,
and here. The basic
key is that you copy some files onto an existing Windows partition,
boot
into DOS (not Windows) then use a DOS program called loadlin to
boot into a file on the DOS partition. You can get the files for lots
of different distributions, and more instructions, here.
So I was all set to do that, and the one thing I hadn't figured
out was how to boot into DOS (since my SR17 came with Windows ME, which
doesn't offer the DOS option at boot time) but I'm sure there's a way.
Then Dave went out and bought the SR33, which comes with a CDROM, so I
got lazy and borrowed his CDROM and booted the installer the easy way.
:-)
A Note on Partitioning
The Vaio SRs come with the disk already split into two partitions (the
second is intended for video captures). The sizes were okay (11G, a
little more than half the disk, given over to D:) so I just used the D:
partition. Otherwise, I would have used Partition Magic (a Windows
program, alas) to resize the partitions first.
When I tried to create the root filesystem (size 3G), Disk Druid
complained:
/ Boot partition > 1024 cylinders
This continued to be true regardless of the size I chose (even down to
1024M).
The Large
Disk HOWTO describes this problem a little, but makes it sound like
it's only a problem with old machines, and doesn't explain why Disk
Druid simply won't allow it.
The Redhat
7.1 release notes, though, clarify: "... it is not possible to
create a bootable partition above cylinder 1024 using Disk Druid."
Great. So I used fdisk to split the old Windows D: partition into /,
swap, and /home partitions. (I wanted a separate /home partition so
that I'll be able to reinstall different versions of linux without
overwriting my home directory and other saved files.) That went
smoothly
and I finished the rest of the Redhat installation without errors.
Some Special Distro Notes
(This is just a random disorganized collection of notes)
Redhat 7.3:
Specified LBA32 during install (see the Large Disk Problem, above)
and stood firm through all its warnings.&
Added a section to XF86Config-4 for a USB mouse (RH8 does that
automatically, yay!)
PCMCIA: A few days after installing, I hit a snag: the machine started
hanging in the boot process whenever it got to pcmcia and yenta. Using
a
rescue disk and some tricky maneuvering, I was able to move
/lib/modules/2.4.18-4/pcmcia up outside of /lib/modules so the kernel
couldn't start pcmcia, which made me able to boot, but of course then I
was incommunicado since the network and the CDROM are both pcmcia. (I
was able to transfer files via a USB smartmedia reader, and built a
2.4.19 kernel and established that the problem wasn't in the kernel.)
Finally a posting
on linuxonlaptop saved me: boot with the NOPCMCIA=yes option. I
added
the line:
append="NOPCMCIA=yes"
to the kernel image in /etc/lilo.conf, reran lilo and my PCMCIA is
happy again. A reply later in the same thread describes a fix that's
apparently better.
Boot taking forever: Redhat's initialization scripts start ethernet
before they initialize PCMCIA. So when it tries to initialize ethernet,
it hasn't yet seen the ethernet card (a Xircom card which works great
with Linux) and delays ethernet. I edited /etc/init.d/pcmcia and
changed the line:
2345 20 96
to read
2345 9 96
-- use priority 9 because ethernet has priority 10. Then do chkconfig
pcmcia off followed by chkconfig pcmcia on to install the
file. I don't know if this is the best solution, but it does work.
Second, when no ethernet is connected, the starting sendmail
phase of booting takes forever. It turns out there are two timeouts in
/etc/init.d/sendmail: one when running newaliases (why that should go
out to the net is anyone's guess) and one when starting the actual
sendmail daemon. So I commented out the newaliases line (I never add
systemwide sendmail aliases anyway, and if I ever need to I'm willing
to
run newaliases by hand) and put a "&" at the end of the "daemon
/usr/sbin/sendmail" command (note that that command is spread over two
lines, so put the ampersand at the end of the second line).
Vaio-Specific Hardware Issues
Configuring X
The trackpad is a PS/2 Alps, and the Redhat installer's defaults worked
for setting up X. Dave had some minor problems setting up X on the SR33
under SuSE at 24 bits, but that was before we knew to use Alps PS/2
mouse protocol; fixing the mouse protocol and dropping back to 16 bit
color cured the problem. The SR33 should be able to run 24 bit color,
and perhaps eventually we'll work this out. In RH 7.1 on the SR17, the
installer set me up to use 16 bit color and I accepted it (since X
failures in the Redhat installer are Bad -- the installer hangs and you
have to do the whole procedure over -- so it's good to be
conservative). Then I used Xconfigurator later to go up to 24 bits
(using Xconfigurator's defaults except to change to "Generic Laptop
Display 1024x768" and specify 8M RAM for the display card). Here's my XF86Config
and my XF86Config-4.
Sound
In an earlier version of this document I described a problem I used to
have where the sound card would start buzzing like a fire alarm.
That was something KDE used to do under Redhat 7.1 -- but that's long
since cured.& Under Redhat 7.3 and 8.0 and Libranet, sound works
wonderfully.& In fact, my husband thinks it's very funny that his
expensive Mac G4, which Apple bills as some sort of hot rip-mix-burn
media machine, sounds so much worse than the little Vaio laptops.
The tiny built-in speakers are awful, but connect a headphone or
speakers and the sound is the best of any of the machines I've
used.& (Disclaimer: no flames, I'm not an audiophile and I'm sure
high-end sound cards are better.)
The sound card is a Yamaha YMF-754 [DS-1E] (rev 0) according to
/proc/pci, and to build it in 2.4.20 I use these .config settings:
CONFIG_SOUND, CONFIG_SOUND_OSS, CONFIG_SOUND_YM812,
CONFIG_SOUND_YFMPCI.& Not sure if the third one is needed.
Redhat 8's sound config program added this to /etc/modules.conf:
alias sound-slot-0 ymfpci
(in addition to the usual pre/post install lines about saving/restoring
volume, which didn't work without tweaking in RH7.3 but actually do
seem
to work in RH8.)
Power Management Issues
The only thing I don't like about the Vaio is short battery life.
I've gotten as long as 3 hours out of a new fully charged battery if
I'm
very gentle with it and don't do any kernel compiles. :-)& So
suspend and other power management is very important to me.
APM BIOS Sleep
First, the SR17 has a built-in APM-based BIOS suspend.& When you
flick the power switch, the machine suspends, without needing any help
from the OS.& This is very helpful for linux users.& This
sleep mode isn't as efficient as I'd like -- it will still suck up my
battery in a day or so, so I sleep if the laptop's going to be off for
a
few hours, but for overnight or longer I try to plug it in or shut down
(or hibernate, see below).& The BIOS sleep mode works regardless
of what APM options you build into your kernel, but it's disabled
(along with all of APM) if you enable ACPI.& Be warned.
ACPI
The SR17 seems to have an incomplete ACPI implementation.& It
offers a few sleep modes, including S1 and S3 (but S3 is not supported
by Linux
2.4 -- you need the 2.5 kernel).& It can read temperature (nifty,
no other way to do that) and battery status (apm can do that), but it
never gets button events and doesn't seem to offer fan control.
So it really doesn't offer very much (except temperature), and enabling
it disables the very useful BIOS APM sleep.& So I only use ACPI
for
testing and not for day-to-day use.
If you read ACPI mailing lists you may hear the acronym DSDT.
This stands for Differentiated
System Description Table., which supplies information about the
hardware installed on the system.& Most machines' DSDTs are
apparently buggy, and often that prevents Linux ACPI (which is much
more
picky than Windows ACPI, natch!) from working. The SR17's DSDT isn't
too bad.& I only found one or two minor bugs, and patched them,
and noticed no differences in functionality between the patched version
and the original.& If you're worried and you want a fixed DSDT,
contact me and I'll try to dig it out.
Software Suspend
Software Suspend
is a new project, not yet checked in to the kernel, to allow laptops to
"hibernate", or suspend to disk.& (This corresponds to ACPI sleep
state 4, for ACPI weenies.)& It's available as patches to 2.4.20,
2.4.21-plus-acpi, or 2.5.n kernels.& I've been running the SR17 on
an old swsusp patch set for quite some time, and most of the time it
works very nicely.& (Occasionally it fails to suspend and I have
to
pull the battery.& Such is life with experimental
patches.) & Software suspend is approaching a 1.0
version.& It's tricky to test it right now (you need a rather
large
collection of patches and utilities, which changes frequently) but I
expect it will stabilize soon and be ready for wider testing.
It's really cool to be able to hibernate to disk quickly.& Keep an
eye on this project.
The Jog Dial (and screen brightness)
I love the jog dial.& I'm a total jog dial junkie.& I have a
whole separate page called Stupid Vaio Tricks
on how to configure it to do stuff.& All you need to know here is
that it's supported by a kernel driver called sonypi (which is in
"Character Devices") and Redhat includes it automatically (at least
when
you install the laptop support packages).& Most Debian-based
distros don't give it to you, so you'll probably have to build your own
kernel to get it (no big deal, kernel building is a lot easier than you
think).
The sonypi driver is also what you need to control screen brightness
(that's on the vaiotricks page too).& There's no other way to do
it.& The function keys are all software controlled.& In fact,
the sonypi driver would be what controls them, except that enabling
them
in the driver disables APM sleep, a bad tradeoff. (I hear this may have
been fixed in more recent versions.)
Winmodem
The modem is a winmodem made by Conexant, so there's no support in the
kernel for it, but:
Great News! There is now a linmodem driver for it! It
uses device /dev/ttyHSF0, not the normal serial devices, so wvdialconf
won't see it and you'll have to set up your kppp or wvdial
configuration
by hand, but the modem does work. Hooray!
The linmodem driver is very very much set up to install on Redhat as an
RPM.& There's a tarball version of it, but it requires kernel
sources in some configuration that I can't figure out how to
create.& Some day I'll probably just hack the installer script to
get the driver onto my debian partition.& For now, I use the
Redhat
partition when I need to use the modem.
Before the Conexant driver, I had a generic PCMCIA modem that
worked fine, but Dave and I wanted to take our machines on trips and be
able
to have one machine dial up an ISP and route to the other machine, so
we
can both check email at once. Since the Vaios only have one PCMCIA
slot, that either means
- Find a single-slot PCMCIA card which contains ethernet and
modem where both components work with Linux;
- Find a USB modem which works with linux;
- Network over the firewire ports;
- Have one of us run Windows to use the internal modem. :-(
(Dave's less of a purist than I am and is willing to do that, but
I'd prefer to find some other solution.)
We ended up taking the first approach, and after a few false starts, we
got a Xircom Credit Card Ethernet 10/100+ Modem 56 card, and we can
network together on trips. (Ironically, on our honeymoon most of the
motels had unusable phones -- e.g. you have to press a key before it
gives a dial tone -- and we never found ourselves in places where we
had
a local ISP number, so we hardly ever dialed in.) I've also been told
that the D-Link DMF560TX modem+ethernet card works well.& And I
hear that the firewire networking driver is coming along, so that will
be an option before too long.
Memory Stick Reader (and other Flash Memory)
The memory stick reader works fine, as a USB device.& Strangely,
it's seen at boot time (and loads usb-storage modules and so forth)
even
with no stick in the drive, unlike external USB flash readers.
My main digicam (an Olympus) uses SmartMedia.& For a while I used
a USB reader, but eventually I discovered the Antec pcmcia smartmedia adaptor,
which is way faster than USB, and Antec even has a FAQ discussing
the use of their card with Linux. Buy this card!
For desktops, though, and for other formats that I don't use as often
as SM, I use the Omniflash Uno line of USB readers for Smartmedia,
Compact Flash, Memory Stick and MMC. They're small, inexpensive and
work
fine with linux (though they're a little flaky sometimes).
My current digicam supports generic usb-storage too, and linux talks to
it just fine, so often I don't use a reader at all and just plug the
camera in to the usb port.& (My previous camera was serial, so
that
wasn't an option.)& I have another camera (a Canon) that uses the
gPhoto2 protocol, which is a lot harder to use than usb-storage, is
poorly documented, and maps all the filenames to upper case.
Yuck.& So sometimes I use adaptors for that camera.
Mouse
The built-in-mouse, as already mentioned, is seen as an ALPS PS/2
trackpad but doesn't seem to have much configurability in Bruce Kall's touchpad driver/configurator
for Linux.& External USB mice work fine.& There's a mini-howto
on using a USB mouse as a second mouse. It's very clear and
concise, so I won't summarize here.
Serial
I have a Palm III (serial) and wanted to be able to sync it to the
laptop on trips. Apparently Palm's USB adaptor is hopelessly
undocumented and will never work with linux, so I wasn't going to buy
that. A little web searching turned up the Keyspan PDA adaptor, a
small,
low-speed USB-serial adaptor for which there's an experimental driver
in recent linux kernels. (Experimental means that when you configure
the kernel you have to choose the first option and turn on unstable
software, then it will give you the option in the USB driver section to
enable the PDA adaptor.) It seems to work ...
Hardware Reliability
I hear people complain about Sony laptop ruggedness, but I haven't had
many problems with this machine.& The 'v' key isn't working too
well, so sometimes it's only an aio.& It's probably just dirty,
but I'm baffled at how to open up the keyboard nondestructively so I
can clean it.
Other than that, there's the problem I already mentioned with the
PCMCIA cards sometimes not working on the first try, and the trackpad
is getting a little dirty and grody after years of use.
But I treat it pretty kindly; I'm always conscious that this is a
lightweight, fairly cheap, plastic machine.& I've never dropped
it, stepped on it, or driven over it, and I've only dribbled water on
it a few times.& I gather some people are pretty rough with their
laptops.& They should probably get something big and heavy with
more metal to it.
Cases/bags for the SR series machines
It's a shame to get a tiny laptop like this and then have to carry it
in a huge oversized briefcase because no one makes a laptop case that's
quite the right size! SunDog, Targus, and CaseLogic make mini laptop
cases that look like they're sized for the Vaio 505 and other slim 12"
screen laptops, but they're a bit big for the SR. There's an Iomega
case, meant to hold Zip disks, which is the perfect size (well, a
little
too thick) and nicely padded, but doesn't have much pocket space to
hold things like the power cord or a CDROM drive. Target has some
shoulder bags that are about the right size, have some pockets but
aren't that well padded (look in the backpack/purse section, not the
electronics section). I hear REI has a padded bag that's just right for
the Picturebook (a bit smaller than the SR); perhaps they have
something for the SR as well, but I haven't managed to get down there
yet to check.
Sometimes you can find something used.& A local electronics
surplus dealer had some lovely cases made for "Twinhead" laptops,
another small subnotebook (which looks rather cute, I might be tempted
if the Vaio didn't exist) which is just a little bit bigger than the
Vaio: just barely space for a cord.& I wish it had an outside
pocket and a shoulder strap, but it's still the best case I've found so
far.
Future directions
Figure out how to make a rescue CD which can boot an installed
system, since we have a CDROM drive but no floppy and occasionally it's
possible to get the MBR of the disk messed up. I found a page here which
seems to describe doing something like this. This page describes
a more elaborate setup involving cloning a whole system onto a bootable
CD. And this
page seems to contain a lot of good information. A modified Linuxcare
Bootable Business Card might also fit the bill. .Here's someone
who made a rescue CD for the same reason I want to. Finally, the Bootdisk
HOWTO explains much about this process.
Other helpful pages
The Linux on Laptops page
is
always a good place to poke around looking for tips. Also, the Mobile Linux Guide is a
treasure trove of information and links. Shortly after I first wrote
this page, another Vaio SR17 Linux page appeared on linux-laptop.net,
including a Web
discussion forum. Steve
Barr's amazing Picturebook/Linux page which has lots of links and
info relevant to the SR series as well. Source forge also has the Linux Vaio Project
but it seems to have no activity whatsoever.
The newer Vaio SR77 is apparently more difficult to get working under
Linux: here's a wiki on Debian
Woody on the SR77, and here's a page on RedHat 7.2
on the SR77.
Stupid Vaio Tricks
My Linux links page
Shallow Sky home
...Akkana (I'd love to share experiences
with other people running linux on laptops)