vaiosz_edgy
 

#########

There is a review in CNET:

http://reviews.cnet.com/Sony_VAIO_SZ/4505-3121_7-31690652.html

#########

These are some snapshots of the dissasembled laptop:

http://geroppy.homeip.net/ryo/sz/szcpu.html

http://geroppy.homeip.net/ryo/sz/szbug01.html

http://geroppy.homeip.net/ryo/sz/szbug02.html

http://geroppy.homeip.net/ryo/sz/szbug03.html

http://geroppy.homeip.net/ryo/sz/szhdd01.html

http://geroppy.homeip.net/ryo/sz/szhdd02.html

Sony Vaio SZ1XP under Ubuntu Linux (Edgy)

Original BIOS:

BIOS Version: R0063N0 -- EC BIOS Version: RK063N0 -- Video BIOS Version: N0ICG_12

Updated BIOS:

R0083NO updated using PHBSYS-01041222-UN.exe

UPDATE (20060915): Results of running http://www.linuxfirmwarekit.org/

* results.xml

* resources.xml
########################################

Must of the stuff is working right now, except the fingerprint detector and the Sony smartcard (the one in the left side). There are minor nuissances with the ethernet card with Edgy and the sleep to ram on nvidia mode, but everything works quite well.

Disk partitions
#########
7.5GB ntfs (I guess this is where sony puts its recovery stuff)

vaio c: 46.5GB [B] 18GB

vaio d: 39.6GB x

3.1GB swap

ext3 / part #3 scsi1(0,0,0) sda (66GB which is 40 of d: and 26 of c: resize)

Dual Core
#########
Edgy comes with a 686-smp kernel by default.

I sometimes download and compile the latest official kernels to see if there is anything worth while having:

kernel_notes

http://www.howtoforge.com/kernel_compilation_ubuntu

.

Video
#####

This laptop has 2 video cards: an NVIDIA GeForce 7600 (nv4x/c5x/c7x) and an Intel GMA i945. The former is for 3D-graphics-intensive performance (like toying with Xgl and Google Earth :p), the latter to do most of the day to day work and saving battery life (about 10-15% more energy efficient, see "power management").


This laptop has a button to choose between "Stamina" and "Speed", with the later somehow activating the NVIDIA card, and the former leaving the Intel chipset as the graphics card. I don't know the details of the hardware activation/deactivation, but it may be possible to hot-swap it without rebooting.

-----

I managed to get xinerama working with the Intel chip:

xorg.conf.working.xinerama.leftof

depending on the external screen you have, and if you want it to be left-right or up-down, you mileage may vary.

Single or Dual Screens + Speed/Stamina video - Automatic configuration
########
I want to be able to use a xorg config with dual screen _if_ the screen is found during boot up, but a single screen if it is _not_ found at boot up.

http://rdo.homelinux.org/ubuntu-linux-on-a-dell-latitude-d610/

then you don't have to manually cp and gdm restart each time you have or not have the screen connected.

I made a coupled script to choose between speed/stamina and 1 screen/xinerama in i915. The second screen has to be plugged very early at boot time, because if not, DCC won't find it:

####

#!/bin/sh

VIDEO=`/usr/bin/lspci |grep -c nVidia`

if [ "$VIDEO" = 1 ]; then
ln -sf /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
else
ln -sf /etc/X11/xorg.conf.1screen /etc/X11/xorg.conf
fi

MONITOR="AL1916"

# Is the LCD screen attached
SECONDSCREEN=`get-edid 2>/dev/null | parse-edid 2>/dev/null | grep Identifier | grep "$MONITOR" | wc -l`

echo "Setting correct Screen(s) configuration: "
echo "1 for 2 screens - 0 for only 1 screen "
echo "found $SECONDSCREEN "

if [ "$VIDEO" = 0 ]; then
if [ "$SECONDSCREEN" -ge 1 ]
then
ln -sf /etc/X11/xorg.conf.working.xinerama.leftof /etc/X11/xorg.conf
#touch /home/avilella/Desktop/x_found_2_screens.txt
# Add additional lines for other tasks for *docked* state
else
ln -sf /etc/X11/xorg.conf.1screen /etc/X11/xorg.conf
#touch /home/avilella/Desktop/x_found_one_only.txt
# Add additional lines for other tasks for *undocked* state
fi
fi
####

(Q) How to switch between the video cards?

The only way that works right now in both Linux and Windows is to reboot the machine. Just when the BIOS is restarting, switch to the other configuration, and voila. The LED can be a bit stubborn, so Ctrl+Alt+Supr in grub menu if it is not illuminated in the right side. The bad news is that Windows needs reboot when hot-switching the configuration. The good news is that when hto-switching in Windows, a pop-up appears asking for reboot. So if there is a hardware signal, it is feasible to think about hot-swapping cards in Linux.

To investigate: How to have a clone of the desktop on the external monitor:

(http://stefan.desire.ch/howto/x41debian/)

toggle S/PDIF

http://www.astro.umd.edu/~teuben/linux/laptop-display.html

To display the same image on both internal LCD and external VGA at the same time, a tiny utility called i855crt is needed. Xorg supposedly allows you to control this behaviour using the MonitorLayout and Clone commands.

http://i855crt.sourceforge.net/

Beryl (only for bling-bling purposes)
########

Beryl works fine with the intel graphics card, very responsive, no problems at all. Except that with xinerama, where one has to stick to metacity... but this may change for feisty or feisty+1:

xorg 7.2 changes:
http://xorg.freedesktop.org/wiki/ChangesForX11R72?highlight=%2872%29

There's an effort to get 7.2 in feisty, see this bug:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/84731

Ethernet
########

This is still flacky and will bring down the eth0 interface once in a while if you do fancy rsync, scp, or other similar stuff. Some time ago this was the problem (not sure if it still is):

When both ports are receiving simultaneously, the receive logic gets confused
and may pass up a packet before it is full. This causes hangs, and IP will see
lots of garbage packets. There is even the potential for data corruption if
a later arriving packet DMA's into freed memory.

Someone seems to have found the cause:

Problem is this stupid module is going bad with autonegotiation with
some switches (sure with mine!). I solved my problem (i'm using one
Toshiba Tecra A3 to write, with such adapter:) )simply writing

ethtool -s eth0 autoneg off

G.D. reports that on ubuntu/debian you have just to add this into your /etc/interfaces file:

post-up ethtool -s eth0 speed 100 duplex full autoneg off

But now that the hardware specs have been sent to the maintainer at OSDL, the next kernel update (post v.1.1?) will allegedly work like a charm (even elegant suspend to ram).

If your eth0 interface does not respond after some heavy rsyncing/scping, you can:

sudo ifdown eth0 && sleep 2 && sudo ifup eth0

Most protocols will resume the active connections after this (at least, rsync).

One solution would be what Loic C. suggests:

The only solution i have found is to use the last sysconnect driver 8.34
witch compile with recent kernels. For the moment, i had no more problems
with my network.

http://www.skd.de/d_de/support/driver_searchresults.html?navanchor=&term=Linux+SK-9E81&produkt=SK-9E81&typ=&system=Linux
http://eavr.u-strasbg.fr/~loic/sony_vaioSZ2.html

To deactivate sky2, put it in the blacklist:

sudo bash
echo blacklist sky2 > /etc/modprobe.d/blacklist-sky2
exit

####

Thread for sky2 in Dapper

https://launchpad.net/bugs/38865

####



Wireless
########

Everything works automagically now. More investigation on automatic ESSID configuration (NetworkManager), or an AP-mode-enabled version of the driver in the future.

(Q) Is it possible to switch the wireless on and off easily?

Yes, indeed. The "WIRELESS" switch turns off the wireless and bluetooth hardware in Linux. When you switch it on again, the wireless module is loaded, and your wireless interface is automagically brought up (even dhcp).

Sound
#####

This is working all fine.

Skype and gizmo (www.gizmoproject.com) both work.

Also:
alsa hda-intel details

Touchpad
########

Works fine. Right upper corner as middle button, right side for scrolling.


ACPI
####

Suspend to RAM (sleep) works if using the Intel (Stamina) chip. The only hickup is that the wireless can cause problems some times. I simply switch off the wireless just before suspending, then switch back on after bringing it up. Choose suspend on gnome-power-manager (i.e., the battery in the top panel) or configure it with the "lid close".

To wake up, just press any key.

(1) Sometimes the wireless won't hook up again after wake up. Apparently this is due to the device losing the essid record. So if stuck, try:

sudo iwconfig eth1 essid "youressid"

sudo dhclient eth1

(change eth1 for the name of your device)

(2) Every once in a while, if you let the laptop to sleep for a long time, for example during the night (notice the irony?, sleep... during the night... :)), it won't wake up properly: black screen, unresponsible keyboard, even Alt-SysRq-RSEIUB won't restart the screen properly.

And sometimes the trick is to plug/unplug the power source. Weird, I know.

(3) There used to be a problem that the touchpad would not work with scrolling after sending the laptop to sleep. Haven't found this in Edgy anymore:

https://launchpad.net/distros/ubuntu/+source/acpi-support/+bug/34802

Things to try:

1) switch resolutions somehow, such as Ctrl+Alt+F1 and then Alt+F7, or Ctrl+Alt++ and then Ctrl+Alt+-
2) press FN+F8 twice, or FN+F10, or FN+F12.

Be careful about using Windows XP "sleep" or "suspend" functionality: it seems that if you suspend a Windows session, it will fix the state of the "Video card switch", so then if you want to use the other video card under Linux, it won't switch to it. The only solution I found is to cleanly reboot the Windows session, then change the card at reboot. Weird, weird, weird.

Doesn't wake up with NVIDIA or nv current drivers. I haven't tried the new 8756 ones yet.

(Q) Does suspend-to-RAM work in the different configurations?

I haven't tried much with NVIDIA. But right now:

For i915 card:

Some devices will need to be manually brought down and up adding them to the list that is read by the scripts provided by laptop-support. For example, the ethernet and/or the wireless. One way to solve it is to switch off the wireless, then sleep it. The ethernet drivers are getting better (20060715) and they are in the mainstream kernel.

For nVIDIA card:

It does not work and I guess it probably won't work in the near future, as the binary drivers make things very difficult for kernel developers to debug. The only hope is that more NVIDIA developers get hired to work on Linux drivers, or that they release open source drivers.

If you want better NVIDIA linux support, create an account to the pseudoofficial nvidia linux forum and write down your complains:

http://www.nvnews.net/vbulletin/forumdisplay.php?f=14

To investigate:

Add list of modules to manually unload/reload in /etc/default/acpi-support

Use the laptop as a music player alarm clock
#########

Apparently (http://www.mythtv.org/wiki/index.php/ACPI_Wakeup) a couple of lines need to be added to hwclock.sh:

root@magneto:/home/avilella# diff /etc/init.d/hwclock.sh /etc/init.d/hwclock.sh.orig
97d96
< ACPITIME=`cat /proc/acpi/alarm`
110d108
< echo "$ACPITIME" > /proc/acpi/alarm

With that, then one can set the wakeup time with:

echo "2007-01-24 23:59:00" >/proc/acpi/alarm

or

date --date "+10 min" +"%F %T" >/proc/acpi/alarm

Then turn the computer off completely whenever you want, then it will automagically turn on at the desired time.


Power Management
#########
Tests about who power-hungry is the machine under different circumstances:

Conclusions:

- Power adaptor: staggering 10 Watt!! I don't know the reason why it
should do that, but it's really surprising. So don't leave it plugged in
unless you are also plugging the other end to the laptop.

- Close the lid if you don't need it. Even at boot up.

- Using a brigthness of 6 (two notches below max), you get to save 3
Watts, instead of using brightness level 7 or 8.

- Wifi/Bluetooth does not make much difference.

- Suspend (sleep-to-ram) is as good under Linux as it is under Windows
XP: 4.94 Watt.

- NVIDIA configuration is about 5W hungrier than Intel configuration.

power_management (work in progress)


Bluetooth
#########

OBEX file transfers work quite well.

Don't forget to turn them on with the "OFF WIRELESS ON"
switch. Hot-changing the state of the switch works seamlessly.

sudo apt-get install gnome-bluetooth

Then:

You should see advertised bluetooth devices with:

gnome-bluetooth-manager

When wanting to send a file over to another bluetooth device:

Right click on file-> Send to -> OBEX -> Choose device -> Send

To activate the server so that other people can send you files, "system->preferences->sessions->Startup_programs->"

and add "gnome-obex-server".

Then your laptop will be visible to other bluetooth devices as "ubuntu-0" or your machine name instead of "ubuntu".

If you use KDE, you can use a bluetooth-serial chat utility called kbtserialchat.

To investigate, bluetooth-alsa and a bluetooth headset thingy:

http://bluetooth-alsa.sourceforge.net/


Fn keys --- Sonypi --- hotkey-setup --- kernel
##############################################

UPDATE:

It is working almost perfectly. You can change the brightness of the screen and turn up/down and mute the sound.

The only hickup being "S1" and "S2" keys (top center of the keyboard) mapping to the same keycode.

https://launchpad.net/distros/ubuntu/+source/hotkey-setup/+bug/35319
https://launchpad.net/distros/ubuntu/+source/hotkey-setup/+bug/34801
https://launchpad.net/distros/ubuntu/+source/hotkey-setup/+bug/34802


Camera (work in progress: camera_notes)
######

It seems this is not a UVC compliant "U" device, but a "W" instead. Hence, Ricoh is using the "RicohOriginal Driver".

Sony Visual Communication Camera VGP-VCC2

The manufacturer is Ricoh: Vendor ID: 0x05ca Product ID: 0x1830

The microphone by the camera works (small hole at the left of the lenses), so you can use it normally, but the camera is going to be more difficult to get to work.

The device is one of these products:

http://www.ricoh.com/LSI/product_pcif/usb/5u870_v001/

http://www.ricoh.com/LSI/product_pcif/usb/5u870_v002/

The chip is based on the M25U870 chip by MicroVision:
http://www.mvision.co.jp/shohin_M25U870.htm



Fingerprint sensor
##################

Bus 003 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

It is so painful to use in Windows -- it will recognise 1 in every 20 tries -- that is actually faster to type the passwords on the keyboard... Other similar devices work under Linux:

http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader

But this specific model will never work under Linux:

G.P. has investigated this and UPEK answered:

> It is a problem of custom firmware of the fingerprint module that Sony
> required for their notebooks. This firmware needs a special key before
> calling any functions, thus Linux driver cannot access them... Only special
> version of PS QL (which has the key build-in) can work with the sensor. Sony
> does not want any other software to be able to communicate with the
> fingerprint sensor.
>
> According to our business agreement, we cannot enclose the Sony's key in our
> Linux BSP.
The windows version of the UPEK driver seems to work fine and hopefully it will not differ too much from the linux one. But it will be difficult to have this working for Linux :)


Card Reader (in the right side, card adaptor that comes with the package)
#####################

Works without any problems. And it is fast. Remember to "Eject" the card in GNOME when you are done before pulling it off.

Sony Card Reader (in the left side of the laptop)
#####################

Haven't tried yet.

Hard Drive and Hard Drive Protection
#####################

Proprietary Sony HD Protection System (G-sensor shock protection). Apparently it has a software component like the IBM Thinkpad systems, but the BIOS is doing part of the job:

http://media.sonystyle-europe.com/sz1/szdeven_04.html

Koide: For example, it's not something that you can achieve with just a utility. Firmware, BIOS (strictly speaking not the BIOS, but you can think of it that way), and so on are crucial to this technology. In other words, you can't simply throw in some off-the-shelf utility and achieve the same sort of hard disk protection that we now have on the VAIO SZ. After all, battery life was one of our concerns, and if you leave everything up to a utility, you're going to be using CPU cycles. In order to reduce power consumption you should rely as little as possible on the CPU. By moving tasks to the BIOS, etc., and putting as little load on the CPU as possible, you can make a big difference in overall power savings. So this was how we approached it. It wasn't enough to simply ensure that the hard disk was protected. We took overall performance, power consumption and all these other factors into account as we worked out the optimum way to implement this feature on the VAIO.


From this is not very clear if one is able to do anything about this on Linux. Anyone?

I was having this strange hard disk reports in dmesg in mid-March. It is not happening anymore now with newer kernels. Not sure how harmful is this:

[4294706.084000] hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
[4294706.084000] hda: drive_cmd: error=0x04 { AbortedCommand }
[4294706.084000] ide: failed opcode was: 0xec

STUBBORN SPACEBAR TINKERING (this is quite handy and simple to fix)

#########

Pointed by D.D.P.: behold the power of youtube!

http://www.youtube.com/watch?v=H8s0qTjNFKQ&search=vaio

CONCLUSIONS

#########

I hope you found this document useful. I want to thank Ariel Vardi for all his info/feedback:

http://www.arielo.net/vaiosz.html

By now, I shall conclude that:

(1) Linux rocks (but you already knew that).

(2) Ubuntu rocks. Ubuntu laptop team rocks.

(3) The hardware in the Sony Vaio SZ1XP rocks, but Sony is not the biggest friend of Linux in terms for laptop support. IBM used to be the best, but now Lenovo is giving mixed signals about this. Things like not having the webcam working, and Sony not bothering about the Linux drivers, are nasty.

WHAT IS NEXT:

Now, to make this laptop, or any other computer, dance like a ballerina with Ubuntu Linux, you should:

(1) Open a (free) Ubuntu launchpad account and report your bugs and feature requests, not only about the laptop but also any application you are using:

http://launchpad.net

(2) Send the hardware data details of your machine where you are using Ubuntu. Run:

hwdb-gui

and just follow the menu and add the comments at the end about things that don't work (webcam, fingerprint sensor, etc).

The second time you run hwdb-gui you will notice that your submission id is shown: this means that the same people that can solve your hardware problems _know_ that you are using the hardware :)

Don't hesistate on contacting me if you have any question or solution for the remaining issues: avilella at the email account that starts with g and end with mail dot com

If you also have this laptop running Linux, set up your own webpage explaining yours experiences, problems and solutions with Linux installation. It will help other people, but also, it will help back yourself to have it working properly when other people share their info with you.



TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones