Ubuntu Linux on Sony Vaio VGN SZ61 MN/B (SZ6 series)

Hardware

Model: Sony Vaio VGN SZ61 MN/B
Processor: Intel Core 2 Duo, 2 Ghz
Graphics: Nvidia Geforce 8400 GS, 64 MB, 1280x800 on 13"
Sound: ALSA compatible
Network (wired): Marvell 100 Mbit
Network (wireless): Intel 54 Mbit
Bluetooth: yes
Webcam: yes
Modem: yes (untested)
Media: DVD writer

Sony Vaio SZ61
Sony Vaio SZ61 (SZ series)

Abstract

In 2007-12, I bought my Sony Vaio VGN SZ61 MN/B to replace my aging Toshiba Satellite 2410. It may be a bit early to write a review since the Linux community has not had much time to adapt to the relatively new device. Overall, I am moderately satisfied, having the following minor issues:

Both wireless lan and bluetooth as well as the Nvidia graphics worked out of the box, which I had not expected. Currently, I run Ubuntu 8.04 (Hardy Heron) under a 2.6.24 kernel.

I am not sure what to make of the never-shut-up fan. The noise is so low it does not bother me, but the implications for power saving do. Even with 800 Mhz processor and 965GM graphics it is still running.

Updates

2008-08: After a nice email exchange with a guy named Brian Vaughan, I got both the internal microphone (easy, just a few settings) and the webcam to work; the latter required driver install from semi-trusted sources.

2008-07: I got a nice mail from a guy named Sebastian Pohl, who was in discussion with the ACPI guys, and solved his screen brightness adjustment problem, albeit only for the internal graphics card (for Nvidia, the problem remains).

2008-06: Wanting to listen to music by headphones, I discovered the headphone jack does not work by default. The problem was caused by faulty Alsa installation routines, and could be fixed.

2008-04: Upgraded to Hardy Heron. Bluetooth exploring my mobile phone (WM6) immediately got a bit better: I can see a folders content, but cannot download or upload files.

Underclocking

The fan is always running; most times in slow mode. To keep it that way, I wanted to underclock the notebook as much as possible, because I normally do not need the processing power. Thanks to Michael Weingärtner [de]:

sudo su
chmod +s /usr/bin/cpufreq-selector

This enables setting the CPU frequency; otherwise, you can only see it. And now the control:

Panel->Add to Panel->CPU Frequency Scaling Monitor
    CPU Freq Monitor->Conservative
    CPU Freq Monitor->800 Mhz

Or alternatively, via the command line:

cpufreq-selector -g Conservative
cpufreq-selector -f 800

The conservative setting is mostly sufficient; only if I start up my programming IDE or other intensive tasks, the CPU goes up to 2 Ghz; small spikes leave the CPU still at 800 Mhz.

Synaptics Touchpad

Something that always annoys me with touchpads is the "one touch means click" behaviour, which encourages weird mouse clicks while typing. Buth this is cureable (thanks to Peter Österlund from Xorg):

nano -w /etc/X11/xorg.conf
    Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        # ...
        # To avoid tap counting as click:
        Option          "MaxTapTime"            "0"

Peter is the maintainer for the Synaptics for XFree86/XOrg; his site contains a lot more useful tips.

Bluetooth Mouse

Bluetooth works out of the box, but you need a small bit of editing to get a bluetooth mouse to work (thanks to Burkey in the Ubuntu forums):

nano -w /etc/default/bluetooth
    HIDD_ENABLED=1

This enables input devices. And then you need to bind the mouse in question:

/etc/init.d/bluetooth restart
hcitool scan
hidd --connect 00:00:00:00:00:00

Where you connect to your mouse bluetooth ID given by the scan command. One odd note: If I do something else with bluetooth (like browsing my mobile phone), the mouse lags horrribly. Thankfully, I still got the touchpad for this.

Bluetooth FTP

Wanting to browse my mobile phone with Ubuntu, I installed the obex FTP protocol:

apt-get install gnome-vfs-obexftp
    # libopenobex1 obexftp

Then, I tried to get files to/from the phone:

Bluetooth Icon->Right Click->Browse Device
    XDA Orbit (My Bluetooth Name)

With my XDA Orbit, this did not work (unlike with my Apple iMac, which does the same thing flawlessly). Since 2008-07, I own an XDA Diamond, and now it works, although both are running Windows Mobile 6. Strange, but good.

Sony Motion Eye Camera

The motion eye camera does not work out of the box, the reason being that the drivers are not functional. According to Brian Vaughan (thanks!), patched drivers can be retrieved from the french Arakhne website (select "Browse", then into the "2.6.24.19-generic" or your uname -r subdir, only one file available there).

dpkg -i ricoh-webcam-r5u870-2.6.24-19-generic_0.11.0-2arakhne1_i386.deb

After driver install, load the kernel module:

modprobe r5u870

Video applications can be picky about whether they want to accept the camera. However, the classic xawtv does work.

apt-get install xawtv
xawtv

Camorama and cheese do not work, but Ekiga softphone (and Skype!) do. Good luck with your favourite application.

Nvidia Graphics

The Nvidia corporation provides binary drivers for Linux, and also an installer, which is pretty nice (but I did not need to use it). Ubuntu provides a Restricted Drivers Manager, which takes care of everything.

System->Administration->Restricted Drivers Manager
    NVidia accelerated driver: yes

Then reboot and you have Nvidia. Use Preferences->Screen Resolution for 1280x800 and you are set.

Graphics: Dynamic Nvidia / 965GM Setting

The Sony Vaio SZ series has the extremely cool feature of two graphic cards: The Nvidia 8400 GS (for power) and the onboard Intel 965GM (for power save). I wanted to configure Ubuntu such that the current card is automatically detected and the appropriate X configuration is being started.

cd /etc/X11
cp xorg.conf xorg.conf.nvidia
cp xorg.conf xorg.conf.intel


Then, reboot in each of the two modes, switch to console with Ctrl+Alt+F2, reconfigure X, and copy xorg.conf over the appropriate file.

dpkg-reconfigure xserver-xorg

And now, we need a script which takes care of the selecting. According to several sources, this used to be easier with previous SZ notebooks. Nowadays, the proprietary Nvidia driver overwrites some glx files, making this a bit of a mess:

nano -w /etc/init.d/dynamic-video-card
    #!/bin/sh
    VIDEO=`/usr/bin/lspci |grep -c nVidia`
    if [ "$VIDEO" = 1 ]; then
      echo "Sony Vaio SZ61 MN/B: Changing to nVidia graphics."
      cp -f /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
      if [ ! -f /usr/lib/xorg/modules/libwfb.so ]; then
        apt-get install nvidia-glx-new
      fi
    else
      echo "Sony Vaio SZ61 MN/B: Changing to Intel graphics."
      cp -f /etc/X11/xorg.conf.intel /etc/X11/xorg.conf
      if [ -f /usr/lib/xorg/modules/libwfb.so ]; then
        apt-get remove nvidia-glx-new
      fi
    fi

Currently, I have added a reboot behind the apt-get install nvidia-glx-new; for unknown reasons, it fails otherwise. There is also one last step: Start it when system boots.

chmod 755 /etc/init.d/dynamic-video-card
ln -s /etc/init.d/dynamic-video-card /etc/rc2.d/S12xorg_conf

After making the script executable, I add it to the runlevel 2 boot scripts. The low number (S12) ensures that it is run before other X scripts (e.g gdm).

ALSA Sound

Sound output works nicely out of the box. Later on, I will test the line-in.

One flaw is that line-out (for headphones) does not work. This is the fault of alsa-conf, and can be solved as described by Michael Doube:

nano -w /etc/modprobe.d/alsa-base
    alias snd-card-0 snd-hda-intel
    options snd-card-0 index=0
    options snd-hda-intel model=vaio

To get the internal microphone to work (thanks to Brian Vaughan for the tip), right-click on the Volume Control icon (upper right toolbar) and select "Open Volume Control", then Edit->Preferences. Activate Master, PCM, PCM Capture, Capture and Internal Mic.

Back on the Volume Control, in the Tab "Switches", deactivate the current choice and activate "Internal Mic". Testing the microphone can be done with Applications->Sound & Video->Sound Recorder. The mic is located on the upper right corner above the TFT.

Brightness Adjustments

Besides the ACPI controls (note: on the SZ61, the brightness controls do nothing, see /etc/acpi/sonybright.sh), there is the spicctrl program for Sony notebooks.

apt-get install spicctrl
spicctrl
spicctrl -b 100

Unfortunately, this does not work either. And I brought the box to a freeze once while trying to fumble with it. However, in July 2008, I was informed by Sebastian Pohl that xbacklight may be an alternative (according to Michael Doube):

apt-get install xbacklight

After installing it, we need to fix a bad XRandR setting (to be repeated for each boot via /etc/rc.local; you can also do this from command line):

nano -w /etc/rc.local
    xrandr --output LVDS --set BACKLIGHT_CONTROL native

    /etc/init.d/acpid restart

And now we can set the screen brightness per command line (the parameter is the percentage).

xbacklight -set 50

To make adjustments available via the Fn keys, the above mentioned sonybright.sh file needs to be replaced.

nano -w /etc/acpi/sonybright.sh
    #!/bin/bash
    BRIGHTNESS=`xbacklight -get | cut -d "." -f 1`
    if [ "x$1" = "xdown" ]; then
      if [ $BRIGHTNESS -gt 10 ]; then
        xbacklight -time 100 -steps 10 -dec 10 2>/tmp/sonybright.log
      fi
    elif [ "x$1" = "xup" ]; then
      xbacklight -time 100 -steps 10 -inc 10 2>/tmp/sonybright.log
    else
      echo >&2 Unknown argument $1
    fi

And then it works. Note the dimming check: Otherwise it is possible to turn the backlight completely off when pressing rapid fire on Fn+BrightnessDown, and it is then not possible to turn it back on again.

Suspend / Resume

If you have OpenVPN (or other network extra stuff) running like I do, you might want to modify the suspend mechanism a bit.

nano -w /etc/default/acpi-support
    STOP_SERVICES="openvpn"
    ENABLE_LAPTOP_MODE=true

And then restart ACPI.

/etc/init.d/acpid restart

This way, resume will properly restart OpenVPN.

Open Ends

The following open ends remain:

I am curious whether the Nvidia/suspend problem will ever vanish.

Conclusion

The Sony Vaio VGN SZ61 MN/B is something I can live with. Though the always running fan makes it less than ideal for power saving purposes, most important devices work out of the box. Integrated webcam drivers and suspend with Nvidia would be nice touches if possible in further Ubuntu versions.

With that, I hope this article could help or inform you a little bit. If you have any questions or comments, you can reach me via email to kain at the above domain. Thanks for leaving a part of your attention span here, and have a good day!

Last Update: 2008-08-05. This article is listed at TuxMobil.

EOF (Aug:2008)