![]() |
![]() |
|
|
Linux (Ubuntu 7.04) Sony VGN-SZ330P Laptop
Author / Автор: Sergey Satskiy
|
![]() |
| Processor | Intel Core 2 Duo T7200, 2.0GHz, 2MB L2 Cache, 667 MHz FSB |
|---|---|
| RAM | 2 GB DDR2 |
| Video | Hybrid: NVIDIA GeForce Go 7400 and Intel Graphics Media Accelerator 950. There is a socket to connect an external monitor. |
| Hard Disk Drive | 120 GB, 5400, G-Sensor |
| Optical Drive | DVD+R Double Layer/DVD+-RW |
| LCD Screen | 13.3'' WXGA TFT with XBRITE technology 1280x800 |
| Sound | Sony Sound Reality, microphone |
| Modem | Integrated V.92/V.90 Modem (RJ-11) |
| Ethernet | 100BASE-TX Fast Ethernet |
| Wireless | Bluetooth, WiFi 802.11a/b/g, GPRS modem |
| Interfaces | 2xUSB 2.0, Memory Stick, PCMCIA - Type II/Type I, Express Card, IEEE 1394, разъем VGA out |
| Camera | Built-in camera |
| Action Buttons | S1, S2, Stamina/Speed, Wireless On/Off |
| Pointing Device | Touchpad |
| Additional Equipment | Biometric Fingerprint Sensor, TPM module |
| Memory Cards | 5-1memory card adaptor supporting memory stick, memory stick pro, SD, xD-Picture Card, MMC Card |
There are no disks with any software supplied with the laptop. A copy of MS Windows XP Professional and all the required drivers are located on a hidden partition on the hard disk drive. The partion is located at the very beginning of the disk and its size is about 4 gigabytes. Sony provides a way to copy a content of that hidden partition onto DVD disks. It could be done running start -> all programs -> VIAO Recovery -> VIAO Recovery Tools -> Create Recovery Disks. Two DVD disks are required and Sony recommends using the best quality disks available.
As soon as the hidden partition is copied onto DVD disks it becomes unecessory to keep a copy on the hard disk drive. The hiddin partition could be deleted safely. If the partition is deleted the system (MS Windows) restore feature by pressing F12 at the startup time will not work however the system can be restored from the DVD disks.
Now using Partition Magic utility the following could be done:
At the moment of installation Ubuntu 7.04 beta was available. A setup disk was downloaded from the Ubuntu site (http://www.ubuntu.com). A manual disk patitioning was selected during the installation. About 20 gigabytes were reserved for Linux and ~3.5 gigbytes were reserved for a swap partition. The final partitioning looks as follows:
root@swift-laptop:~# fdisk /dev/sda The number of cylinders for this disk is set to 14593. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 2551 11475 71690062+ f W95 Ext'd (LBA) /dev/sda2 * 1 2550 20482843+ 7 HPFS/NTFS /dev/sda3 11476 14107 21141540 83 Linux /dev/sda4 14108 14593 3903795 82 Linux swap / Solaris /dev/sda5 2551 11475 71690031 b W95 FAT32 Partition table entries are not in disk order |
| Equipment | Description |
|---|---|
| WiFi | It works out of the box. The only thing which I did is switching off the IPv6 protocol. Personal feeling is that web pages loading became a bit faster. |
| Video | Both video cards work out of the box. Each card requires individual xorg.conf file file proper opration. A description of how to do it is given below in a separate chapter. External monitor connection was not checked. An update manager offered to update nVidia drivers at some stage and it was accepted. No difference before and after was noticed. |
| Touchpad | It works out of the box. I did not like its default sensitivity so some changes were made in the corresponding section of the xorg.conf. |
| DVD drive | It works out of the box. |
| USB | It works out of the box. It was tested on a USB 2.0 Flash drive of 2 gigabytes capacity. |
| Bluetooth | It works out of the box. It was tested on a Bluetooth mouse Genius Navigator 900. |
| Express card | It works out of the box. It was tested on an SD card of 1 gigabyte capacity connected via memory card adapter. The card adapter is supplied with the laptop. |
| PCMCIA | It works out of the shelf. It was tested on a two USB 2.0 ports board of nonamed manufacturer. |
| Camera | It works. It is required to compile and install a driver. See a special chapter for details. |
A default initrd file supplied by Ubuntu is about 6 megabytes. The file could be cut considerably. In order to do it the following steps should be done:
Copying and unpacking of the existed initrd.img:
root@swift-laptop:~# mkdir /home/swift/tmp root@swift-laptop:~# cd /home/swift/tmp root@swift-laptop:/home/swift/tmp# gzip -dc < /boot/initrd.img... | cpio -i |
Now the changes can be done. For example some not used modules can be safely deleted.
Packing changes into a new initrd.img:
root@swift-laptop:/home/swift/tmp# find . | cpio --quiet --dereference -o -H newc | \ gzip -9 > /boot/myinitrd.img |
To check the myinitrd.img the grub configuration file (/boot/grub/menu.lst) can be extended with one more entry with a new myinitrd.img. Reboot and check if the new initrd works fine.
Each mode (stamina and speed) requires its own xorg.conf configuration file. This problem could be resolved as follows:
Create the /etc/init.d/xorg.conf file:
#!/bin/bash
VIDEO=`/usr/bin/lspci | grep -c nVidia`
if [ "" = 1 ]; then
rm -rf /etc/X11/xorg.conf
ln -s /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
else
rm -rf /etc/X11/xorg.conf
ln -s /etc/X11/xorg.conf.stamina /etc/X11/xorg.conf
fi
|
Change rights to executable:
root@swift-laptop:/etc/init.d# ll xorg.conf -rwxr-xr-x 1 root root 259 Apr 21 20:26 xorg.conf |
Create a symbolic link to that file in the /etc/rc2.d:
root@swift-laptop:/etc/rc2.d# ll S12xorg.conf lrwxrwxrwx 1 root root 21 Apr 22 15:12 S12xorg.conf -> /etc/init.d/xorg.conf |
Now copy into the /etc/X11 two files: xorg.conf.stamina for an Intel chipset graphics card and xorg.conf.speed for nVidia card.
The proper configuration file will be used at the startup time. A reboot is required to change the current video card similar to MS Windows case.
Touchpad settings are tuned in the xorg.conf files to make the touchpad sensitivity more comfortable. The keyboard layout is switched by Ctrl+Shift key combination. The Russian layout is indicated by the Caps Lock led.
A Genius Navigator 900 bluetooth mouse was used. The description of the required settings is given here "postfactum" i.e. everything was done at first and then described some later. Therefore some details could be missed on not absolutely precise.
It is necessary to have the bluez-utils packet installed.
First of all run the Bluetooth devices scanning:
swift@swift-laptop:~$ hcitool scan
Scanning ...
00:16:38:E2:70:5E Genius Bluetooth Mouse
|
Before scanning it is necessary to push the "connect" button on the mouse. The most important information here is the device MAC address.
Add to the end of the /etc/bluetooth/hcid.conf file a new device description (use the discovered MAC address):
device 00:16:38:E2:70:5E {
name "Navigator 900"
}
|
Now modify the /etc/default.bluetooth file so that it has the following lines:
# start bluetooth on boot? # compatibility note: If this variable is not found bluetooth will # start BLUETOOTH_ENABLED=1 ############ HIDD # # To have Bluetooth mouse and keyboard support, get the # Linux 2.6.6 patch or better from bluez.org, and set # HIDD_ENABLED to 1. HIDD_ENABLED=1 HIDD_OPTIONS="--connect 00:16:38:E2:70:5E --master --server" |
After rebooting the mouse will be automatically recognized by the system.
| Keys | MS Windows | Linux |
|---|---|---|
| Fn+F1 | Switching between wireless modules modes. | Nothing happens. |
| Fn+F2 | Mute | Mute |
| Fn+F3 | Volume down | Volume down |
| Fn+F4 | Volume up | Volume up |
| Fn+F5 | Brightness down | Brightness down |
| Fn+F6 | Brightness up | Brightness up |
| Fn+F7 | Switching external monitor mode. | Nothing happens. I'll get back to this as soon as I buy a monitor. |
| Fn+F10 | Magnifying glass mode | Nothing happens. To be honest I don't see any sense in this feature. |
| Fn+F12 | Hibernating | Hibernating. There is a problem here. If the laptop was hibernated when it was connected to AC power then it was disconnected from AC adapter and the it was switched on again the OS hangs after a couple of minutes work. If you do not do this fancy adapter stuff the feature works fine. |
| S1 | Programmable key | Nothing happens |
| S2 | Programmable key | Nothing happens |
| Stamina/Speed | Switching the current video card. A reboot is required to activate changes. | Nothing happens |
| Wireless On/Off | Wireless modules on/off. | Wireless modules on/off. |
| Closing lid | Switching to the sleeping mode | It blocks the current session |
It is necessary to compile and install a driver. The driver can be downloaded from here: http://lsb.blogdns.net/ry5u870/. I used the version 0.10.0. The installation procedure is described in details in the driver's instruction.
To make the camera module loaded automatically at the Linux start-up time the following line should be added into the /etc/modules file:
r5u870 |
The device file /dev/video0 appears. The camera can be checked with xawtv:
swift@swift-laptop:~$ xawtv -device /dev/video0 |
a window similar to the following will appear:
![]() |
Straight after installation the /bin/sh link was modified. By default it points not to a usual bash but to a simplified shell. So the following was done:
root@swift-laptop:~# cd /bin root@swift-laptop:/bin# rm -rf sh root@swift-laptop:/bin# ln -s bash sh root@swift-laptop:/bin# cd |
Unnecessery services and modules were stopped. Avahi, HP printers support etc were off in particular.
IPv6 protocol was switched off. The corresponding module ipv6 is not loaded any more.
The acpi modules loading procedure is about as follows. The acpi service configuration file dictates trying to load all the modules which are compiled for the kernel for the acpi subsystem. Due to this instruction there are messages in the kernel log that some unnecessary modules like IBM laptops support modules were tried to be loaded. In some cases unnecessary modules are loaded successfully like asus_acpi.ko. In order to avoid this it is possible to delete not required modules from the corresponding directory. I left the following modules:
root@swift-laptop:/lib/modules/2.6.20-15-generic/kernel/drivers/acpi# ll total 196 -rw-r--r-- 1 root root 8020 Apr 15 12:07 ac.ko -rw-r--r-- 1 root root 13768 Apr 15 12:07 battery.ko -rw-r--r-- 1 root root 11488 Apr 15 12:07 button.ko -rw-r--r-- 1 root root 7004 Apr 15 12:07 container.ko -rw-r--r-- 1 root root 13128 Apr 15 12:07 dock.ko -rw-r--r-- 1 root root 7552 Apr 15 12:07 fan.ko -rw-r--r-- 1 root root 15012 Apr 15 12:07 hotkey.ko -rw-r--r-- 1 root root 7956 Apr 15 12:07 i2c_ec.ko -rw-r--r-- 1 root root 38796 Apr 15 12:07 processor.ko -rw-r--r-- 1 root root 19832 Apr 15 12:07 sbs.ko -rw-r--r-- 1 root root 18452 Apr 15 12:07 thermal.ko -rw-r--r-- 1 root root 21068 Apr 15 12:07 video.ko |
A considerable time at the system startup is consumed by the file systems checks. The largest partition on my laptop is a FAT32 one which is purposed basically for storing MS Windows files. This filesystem check can be skipped at the Linux startup time. The fsck utility is used to check the file systems state and the utility is ran with the -A key. This key makes the utility to look through the /etc/fstab file and check all the filesystems except of those which have 0 in the pass field. So it is enough to put zeros where it is necessary to skip the filesystem checks. For example my /etc/fstab looks as follows (UUIDs are reduced):
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # /dev/sda3 UUID=a5aeda75-00d7 / ext2 defaults,errors=remount-ro 0 1 # /dev/sda2 UUID=DA58A66258A63 /media/sda2 ntfs defaults,nls=utf8,umask=007,gid=46 0 0 # /dev/sda5 UUID=461D-67D9 /media/sda5 vfat defaults,utf8,umask=007,gid=46 0 0 # /dev/sda4 UUID=730c32a0-e959 none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0 |
| Equipment | Description |
|---|---|
| Sound | Does not work. There is an interesting detail here. At the X Window startup time the sound works fine - a "hello" sound is playing. After the X Window start however there is no sound at all. |
| Microphone | Does not work |
| Headphone Jack | Not tried yet. |
| Biometric Fingerprint Sensor | Does not work and will not. There are rumors that Sony asked the scanner manufacturer to add some security code to all the API functions. This security code is not published and will not be. |
| IEEE 1394 | Not tried yet |
| Ethernet card | Not tried yet. A module is loaded successfully though. |
| External monitor | Not tried yet |
| Modem | Not tried yet |
| GPRS modem | Not tried yet |
| Memory stick | Not tried yet |
| TPM | Not tried yet. A module is loaded successfully though. |