Linux on Sony VAIO PCG-SRX51P

 Display | Network | USB | FireWire | Mouse | Bluetooth | Winmodem | ACPI | Miscellaneous | References

I recently replaced the 30 GB Hitachi hard disk drive with a quieter 40 GB drive from Samsung. To prepair for a dual boot Windows/Fedora system I first used the Windows recovery CDs to install Windows XP. You can chose either 1/4, 1/2 or 3/4 of the disk capacity to be used for a primary NTFS partition containing Windows, so in my case 10 GB was the minimum size. The remaining space is used for an extended partition with an empty logical NTFS partition.

To further reduce the space occupied by Windows I first ran the included defragmentation tool (somewhere hidden in the settings) and then booted from a Knoppix 3.4 CD to use QtParted for resizing the NTFS partition. Knoppix needs to be started in expert modus (type 'expert' at the boot prompt) and when asked for modules to include you must choose 'sbp2.o', which is required to detect the FireWire DVD drive.

QtParted worked well resizing the primary NTFS partition to 7GB, but it reported error messages when I tried to create ext3 partitions for a Linux installation from hard disk, so I quit the program leaving 33 GB free space on the disk and went for an installation from CD/DVD instead. I fetched the FC2 DVD image from a Red Hat mirror server and burnt a DVD with it (the four CD images will do as well).

You can boot from the FC2 CD/DVD, but the DVD drive itself is not detected by the installer, because Red Hat omitted the buggy FireWire modules for kernel 2.6.5. There is, however, a workaround boot image [1] (see section 1 in the 0README) which provides the modules required. I burnt a CD-RW with the boot-firewire.iso and booted from it. When /sbin/loader starts, I inserted the FC2 DVD and the installation continues normally. You can use the Disk Druid for partitioning.

top
Display

The display is not auto detected during the installation, so I chose a generic LCD Panel and a 1024x768 resolution. For the graphics device the module i810 is used.

If you want to activate 3D acceleration you have to reduce the color depth to 16 bit (65536 thousand colors), e.g. by using system-config-display or editing /etc/X11/xorg.conf. If you log in from a console you may leave this file untouched and start xorg with

$ startx -- -depth 16

After rebooting or restarting the screen server glxinfo | grep render should answer with direct rendering: Yes. The frame rate displayed by glxgears is close to 1800 compared to 120 without DRI. A 3D game like crack-attack can now be played, but starting tuxracer or neverball, always locks up the screen server and puts me back to the login screen.

To use an external display as a clone screen it must be plugged in at boot time. If you want to connect after booting you need the i810switch utility [2], which forces the signal to the external display. The LCD and external display can be switched on/off independently. You can also use the Fn-F7 key binding via i810rotate and rsjog [3], see below in the Mouse section.

top
Ethernet, WLAN

Ethernet works, but the WLAN device is wrongly configured as wired ethernet as well. To change this I started system-config-network and deleted the wireless hardware device named 'orinoco_cs'. Alternatively remove or comment out the following line from /etc/modprobe.conf:

alias eth1 orinoco_cs 

After next boot the WLAN hardware reappeared in system-config-network as 'Lucent Technologies WaveLAN/IEEE Adapter'. I created a new wireless entry using that hardware and then everything worked fine ...except for one thing:

I configured both interfaces to be set up via DHCP and consequently to be started manually and not at boot time, but the wireless interface comes up anyway, apparently because it is a PCMCIA device and that service is started after network is started, bringing up the device as soon as it is recognised. Hence the entry 'ONBOOT=no' in /etc/sysconfig/network-scripts/ifcfg-eth1 made by system-config-network takes no effect.

Autostarting a PCMCIA network device is quiet useful for a WLAN PC Card, but not for a device you cannot physically insert or remove. One way I found to suppress it was to comment out a line in /etc/hotplug/net.agent reading

exec /sbin/ifup $INTERFACE

Another way is to start the PCMCIA service manually to bring up the device. Placing the PCMCIA service to a position prior to the network service in the init process did no longer work after a recent kernel upgrade.
You can also completely disable ('eject') the WLAN card it with

$ cardctl eject 1
top
DVD-ROM

Not detected due to the removal of FireWire drivers mentioned above, but meanwhile there is a kernel update (2.6.6) available from Red Hat providing the FireWire modules required. Use yum or up2date to install. Afterwards the DVD drive was, however, still not detected until I added the line

alias ieee1394-controller ohci1394 

to /etc/modprobe.conf. After rebooting, Kudzu comes up and adds another line:

alias scsi_hostadapter sbp2 

There is also a workaround for kernel 2.6.5 on [1] (see section 2.1 in the 0README) which worked well.

For mounting the drive I created a directory /dvd and added this to /etc/fstab

/dev/scd0   /dvd  auto    noauto,user     0 0
top
USB / MemoryStick

The MemoryStick device is auto-detected. I changed the entry in /etc/fstab and added one for a USB-Stick

/dev/sda1  /mst  vfat  noauto,user  0 0 
/dev/sdb1  /usb  vfat  noauto,user  0 0 

USB mouse works, too. I can even attach my (non-Sony) digicam now, it no longer causes immediate crashes as on RH9.

top
Fn Keys / Mouse

Initially the Fn keys are enabled only for the dual function of the cursor buttons. To activate the scroll wheel the sonypi driver must be installed. As described in
/usr/src/linux-2.6.5-1.358/Documentation/sonypi.txt you have to create a device

# mknod /dev/sonypi c 10 250 

and add the following to /etc/modprobe.conf

alias char-major-10-250 sonypi
options sonypi minor=250 

KDE comes with a nice 'Sony Vaio Hardware' plugin 'Kmilo' which pops up a huge windown informing you about the battery state when you push the 'back' button (and, annoyingly, also when KDE is started). By keeping 'Strg' pressed while turning the scroll wheel you can adjust the brightness, but 'Alt' + scroll wheel won't adjust the volume as it is said to do in kcontrol. So I installed rsjog [3], which also gives more functionality to the Fn keys, e.g. you can use Fn-F7 for switching between LCD and external display if you have i810switch [2] installed and add the following to your ~/.rsjogrc

bind FNKEY_F7 i810rotate 

rsjog requires spicctrl [4] and ruby-gtk [5]. Compilation of the latter (Version 0.34) caused some troubles: A required header file 'rbgdkcursors.h' wasn't found. When I removed the corresponding include line in 'rbgdkcursor.c' in the src direcory compilation proceeded successfull and surprisingly a file 'rbgdkcursors.h' appeared, so I inserted the include line again and now compilation worked as expected.

With Gnome rsjog works fine, but with KDE it cannot access /dev/sonypi as Kmilo seems to completely block it. You have to deactivate Kmilo in kcontrol (components - services), which should be done as normal user and as root, otherwise Kmilo starts whenever you log in as root via su and start KDE applications. Also deactivate the function of the middle mouse button if you don't like a KDE menu popping up together with the rsjog menu. To adjust brightness via rsjog you need write access to /dev/sonypi.

To make rsjog start automatically I placed this small script in ~/.kde/Autostart/ and made it executable:

#!/bin/bash
/usr/bin/ruby -w /usr/local/bin/rsjog
top
Bluetooth

On installation I included the package 'gnome-bluetooth' and later added 'bluez-utils' from the DVD. By default the Bluetooth service is started at boot time, but it doesnt' work, because the hardware is not turned on, so I removed it from autostart using serviceconf (all runlevels) and rebooted (which may not be necessary).

Use the spicctrl utility [4] to turn Bluetooth hardware on

# spicctrl -l 1

or add the above command to the beginning of the start function in /etc/init.d/bluetooth

Then start the service via serviceconf or manually by

# /etc/init.d/bluetooth start

To connect to your mobile phone a device must be created:

# mknod -m 666 /dev/rfcomm0 c 216 0

Scan for your phone

# hcitool scan

Your phone's hardware address should be displayed like this:

 Scanning ...
        00:0E:07:43:3C:0F       T610

Bind the laptop to it:

# rfcomm bind 0 00:0E:07:43:3C:0F 1

Make a test:

# echo "ATZ" > /dev/rfcomm0

If the laptop is not known to your phone already this will make the laptop and then your phone ask you to enter the (same) PIN.

You can edit /etc/bluetooth/rfcomm.conf if you want to automatically bind the device when bluetooth is started:

rfcomm0 {
        bind yes;
        device 00:0E:07:43:3C:0F;
	channel	1;
	comment "T610";
}

To setup an internet connection using your phone as modem you can use system-config-network. You have to specify a provider name as well as login name and password even if they are not required, phone number is *99***1#, init string (in the extended tab) is 'AT+CGDCONT=1,"IP","APN","",0,0' where APN must be set appropriately, e.g. "internet" for O2 Germany. Finally create a link from /dev/modem to /dev/rfcomm0 to make it your modem device or edit /etc/sysconfig/network-scripts/ifcfg-[provider]

MODEMPORT=/dev/rfcomm0

This way you can use /dev/modem for the winmodem (see below). To dial in just type ifup [provider] or use the GUI.

For sharing files I use kbluetoothd from the 'kdebluetooth framework'. I found a rpm package on http://rpm.pbone.net/. Once started it docks into the panel. A window will popup if you attempt to send files from phone to laptop. To send files to the phone just start konqueror and enter the URL 'sdp:/' or 'bluetooth:/', click on your phone's icon and choose 'OBEX Object Push'. If you own a Sony mobile phone and want to use it as remote control for your laptop take a look at bluemote [6].

top
Winmodem

The scanModem tool from http://linmodems.technion.ac.il/ told me it's a Conexant soft modem (HSF) with PCI ID 8086:2446 ICH2. I had no succes with the slmodem package available on that site, so I tried the (free limited) HSF driver from http://www.linuxant.com/ and it worked perfectly. After installing the appropriate rpm package I had to run hsfconfig --region [country]. Modem device is linked to /dev/ttySHSF0. You can use system-config-network to configure the dialup connection.

top
ACPI

Due to its experimental status I didn't really expect Suspend-to-RAM to work properly, but was curious enough to try: I can actually put the laptop to sleep using the 'klaptop' utility from KDE (which has to be set up in kcontrol) or with

# echo -n "mem" > /sys/power/state 

A message is displayed ("stopping tasks... PM: entering state", followed by a blank screen and red blinking power light, hard disk is off. It obviously tries to wake up when I press the power button (green WLAN light, green power light, yellow battery light) or any button (green WLAN light, no power lights), but in any case the screen keeps blank and there is no activity any more. I have to remove power cable and battery before I can reboot.

Starting and stopping normally is stable. Moving the power button shuts down the laptop safely.

top
Miscellaneous

Some laptop unspecific settings I made:

top
References

[1] http://www.ic.unicamp.br/~oliva/snapshots/FC2-firewire/
[2] http://vorlon.cwru.edu/~ames/i810switch/
[3] http://linuxbrit.co.uk/rsjog/
[4] http://popies.net/sonypi/
[5] http://sourceforge.net/project/showfiles.php?group_id=35786
[6] http://www.geocities.com/saravkrish/progs/bluemote/
[7] http://www.xs4all.nl/~bsamwel/laptop_mode/

Author: Olaf Bauer
e-mail: obauer at freenet dot de

Last modified: February 2005