Linux on the Sony Vaio PCG-C1XS
Introduction
Already owning a Sony Vaio PCG-Z505SX, I wanted something even smaller and more powerful, and the C1XS looked to be it. Having gotten my Z505SX working quite smoothly under Linux, I figured this one would as well.
Specifcations
- 400 Mhz Intel Mobile Pentium II processor
- 64 MB RAM (expandable to 128 MB)
- 12 GB hard drive
- NeoMagic 256AV Video
- Sony Pointing Stick (PS/2 compatible)
- Internal 56K Modem
- One Type II PCMCIA Slot
- One USB port
- One Firewire port
- IrDA port
- Sony Jogdial controller
- Built-in Camera
Installing Debian
I used an external CD-ROM drive (the Sony PCG-CD5) to boot the Debian 2.1r4 CD. You can use the CD-ROM as /dev/hdc if you type
linux ide1=0x180,0x386 expert
at the LILO prompt after first booting. The rest of the install is fairly straight forward.
Partitioning
I used fdisk to delete the "D:" drive/partition that was pre-installed and instead divided up the space it previously used for Linux. My finished partition table looked like this:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1045 8393931 c Win95 FAT32 (LBA)
/dev/hda2 1046 1433 3116610 83 Linux
/dev/hda3 1434 1450 136552+ 82 Linux swap
/dev/hda4 1451 1467 136552+ a0 IBM Thinkpad hibernation
Booting the system
The rest of the Debian base install went as normal, until just before rebooting. Because my Linux partition started past the 1024th cylinder I knew I would have to take special steps. So I jumped to another virtual console and mounted my DOS drive. I copied the kernel Debian had installed to my DOS partition, planning on using loadlin.exe to boot it later. Make sure you have the vfat module installed in your kernel at this point so you can mount fat32 partitions.
Then I rebooted back into Windows 98. I made a directory C:\linux\ and put my kernel and loadlin.exe (which you can get many places, I grabbed it off a CD) into it. Then I added the following lines to the beginning of my config.sys:
[menu]
menuitem=Linux, Boot to Debian GNU/Linux
menuitem=Win98, Boot to Microsoft Windows 98
menudefault=Linux, 15
[linux]
shell=c:\linux\loadlin.exe c:\linux\vmlinuz root=/dev/hda2 ro
[win98]
Next I added the following lines to the beginning of my autoexec.bat:
goto %config%
:win98
And then I rebooted again. This makes a nice boot menu which will allow you to boot Windows or Linux, even though Linux is past the 1024th cylinder. Naturally, I booted Linux and finished the install.
Update: Since I first installed, a new version of LILO has been released that allows one to boot kernels are installed past the 1024th cylinder. The ordeal I wetn through is no longer necessary, as long as the latest version of LILO is used.
PCMCIA card services
These worked immediately, no fancy options needed. I use a 3com 3c575 10/100 card and a Lucent WaveLAN Gold card for networking. Both work nicely.
Configuring X
The video chipset in the C1XS is the NeoMagic MagicMedia 256AV, which is supported in the svga xserver, so I just installed the appropriate X server. The resolution is 1024x480, though, and so I used the XF86Config from the C1X, which I got from this site and you can also find here.
Configuring the sound card/using OSS
Although the soundcard is not supported directly in the kernel sources, it is supported by the Open Sound System (OSS). You'll also need to purchase the YMH add-on package for OSS. There are a few problems with OSS's modules, and hopefully they'll improve in the future, but I've some workarounds below in the meantime. There are a number of issues which are documented by OSS, such as "Plug and Play OS" must be turned off in the BIOS. Also, when the modules are first loaded, the microphone is turned up far too high and feeds back with a loud squeal. Sadly, the modules are also not apm aware, so suspending/resuming the machine does not agree with them.
To avoid the feedback, "ossmix mic 0" from whereever you installed OSS directly after loading the modules. This turns the squeal into a chirp, and things are much happier. Then run "savemixer" as root to save the mixer settings. I inserted the lines
#
# Load sound drivers
#
/usr/local/bin/soundon
at the end of /etc/init.d/bootmisc.sh. This ensures that OSS is started when booting. Keep in mind that "/usr/local/bin/soundon/" is a symlink to the actual program itself.
To solve the apm issues, I wrote a script that would unload the modules on suspend and reload them on resume. I put this script in /etc/apm/event.d/ and named it 50ossmods. I've pasted the script below:
#!/bin/sh
if [ "$1" = suspend ]; then
/usr/local/bin/soundoff
elif [ "$1" = resume ]; then
/usr/local/bin/soundon
fi
Make sure the script is executable, and you should be all set.
PCMCIA Revisited
After getting sound working, I discovered that the PCMCIA controller and the sound card were both sharing irq 9. This doesn't cause problems until you try to change PCMCIA cards while the sound card modules are loaded. This will cause the machine to hang. If I manually unload the sound card modules, PCMCIA services work fine, so I am currently working on wrapper scripts to unload the sound modules when the card is inserted/removed.
Using USB
USB support was surprisingly easy, once I turned off "Plug-and-play OS" in the machine's BIOS, and compiled USB support into my kernel. I have a USB mouse (the Sony PCGA-UMS1) I bought for my other Vaio which works fine for this one as well.
I used kernel 2.2.16. Uncomment the following line in arch/i386/config.in in your kernel source tree:
# source drivers/usb/Config.in
Reconfigure your kernel and compile in USB UHCI hub support and USB mouse support. Rebuild and install your new kernel. Then make the device by exceuting the following command as root:
mknod /dev/usbmouse c 10 32
Finally, add the following lines to /etc/X11/XF86Config:
Section "ServerFlags"
AllowMouseOpenFail
EndSection
Section "XInput"
SubSection "Mouse"
Port "/dev/usbmouse"
DeviceName "Pointer"
Protocol "PS/2"
AlwaysCore
EndSubSection
EndSection
The "AllowMouseOpenFail" option will allow the USB mouse to be hot-swappable.
Using the Camera
Andrew Tridgell was kind enough to email me and let me know about a program he wrote which allows one to use the camera to capture still photos and movies. You can get it from this page.
Conclusions and Outstanding Issues
I'm very pleased with this laptop. Even though not all of the hardware works for me yet, I have a very compact machine with enough horsepower to do real work on the road if I have to.
I have not yet played with the following features (hey, I just got this thing!)
- the IrDA port
- the modem
- the firewire port
- the jogdial controller
I will be updating this page (and maybe beautifying it) as I learn more about my new laptop.
pater@slashdot.org
|