December 31, 2007

VGN-SZ56GN

Filed under: Uncategorized — Alex @ 8:50 am

This page describes Linux compatability with the Sony VAIO SZ56GN - one of the newer SZ models. This model is generally only available in the Asia Pacific region (Australia, Singapore, India, etc..)
There are a few other model numbers that refer to the same (or similar) laptop in different regions; if you know of them, please email me.
Some that I know of:

Laptop information

CPU: Intel® Core™2 Duo Processor T7500(2.20 GHz)
Chipset: Mobile Intel® GM965 Express Chipset
FSB Speed: 800MHz
Memory: 1GB installed by default (mine’s actually got two)
HDD: Seagate 120GB SATA, 5400RPM
Optical drive: Matshita DVD±RW/±R DL/RAM Drive
Graphics: NVIDIA® GeForce® 8400M GS notebook graphics processing unit(GPU) (SPEED MODE) / Intel® Graphics Media Accelerator X3100 (STAMINA MODE)
Display: 13.3″ Wide (WXGA: 1280 x 800) TFT Colour display (Clear Bright LCD)
Network: 10Base-T/100Base-TX/1000Base-T x 1
Display connector (on laptop, not on dock): Analogue RGB, mini D-sub 15pin x 1
Audio jacks: 1xheadphone, 1xmicrophone
Internal audio devices: built-in stero speakers, built-in monoaural microphone
Approx. 19 mm key pitch / 3.0 mm keystroke, 86 keys
Touchpad: Synaptics touchpad
Security chip: TCG Ver.1.2 compliant Trusted Platform Module (TPM)
Fingerprint sensor
Other connectors: High Speed USB 2.0 x 2, i.LINK(IEEE 1394) 4pin (S400) x 1
Weight: 1.93kg

lspci output:

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
07:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8055 PCI-E Gigabit Ethernet Controller (rev 12)
09:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
09:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
09:04.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

lsusb output:

Bus 007 Device 006: ID 054c:0281 Sony Corp. < ----------- Memory Card adapter
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 003: ID 05ca:183a Ricoh Co., Ltd <----------- MotionEye camera
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 002: ID 044e:300d Alps Electric Co., Ltd  <----------- Bluetooth
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 147e:2016  <----------- Fingerprint reader
Bus 001 Device 001: ID 0000:0000

Hardware support

Note: for most of my testing, I conducted it on either Debian stable (etch) or Debian unstable (lenny/sid). Hopefully I mention which one I’m using where.

CPU

OK

Most distros seem to pickup the Intel Core 2 Duo, and the fact that it has two cores. Frequency scaling also seems to work well, though you might have to make sure that you have the right modules installed (cpufreq_*). Basically, as long as you have a semi-recent 2.6 kernel, you should be good.

You might also want to try and enable the ondemand governor for all CPUs by using the following command:

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Video

Issues

The SZ56GN comes with a feature whereby you can select between two graphics cards the laptop has installed, and it will change over on reboot. The machine comes with an Intel GM965 display adapter, and works very well with the intel X display driver. Works lovely with suspend, hibernation, RandR1.2, and xbacklight allows me to adjust the backlight values (see notes below on ACPI about this). Worked out of the box on Debian stable and unstable. Should do for pretty much every othe distro. X seems to support COMPOSITE, GLX, etc; however Compiz does not work correctly with this card yet. This appears to be because of a few unimplemented functions in the driver. (UPDATE: I think this works with the latest driver; it has XAA enabled as default, which means Compiz should work - you’ll need to disable blacklist checks, however).

However, the machine also comes with an NVIDIA card. This means I had to install the kernel headers, and the NVIDIA driver, and compile in the modules. After this, the NVIDIA card also seems to run OK, albeit a bit hotter than the Intel card. 3D accel works well - tested with Compiz and SD/iD’s Enemy Territory: Quake Wars (native Linux client).

Because the machine has two adapters and the way it was setup, only one of the cards ever exists in a session. So, if you’re running on the Intel card, you can’t see that the machine has an NVIDIA card. Because of this, you need two different Xorg configuration files. A small script written by John Lathouwers seems to do the trick; basically, it looks as lspci’s output, and checks if the NVIDIA card exists on boot. If it does, it copies the NVIDIA configuration over the top of /etc/X11/xorg.conf, and if it’s the Intel adapter, it does the same, only with its own config. Later, when X starts, it runs with the config correct for the adapter currently selected.

To setup the script on a Debian system, cneate a new file called /etc/init.d/sony-graphicswitch, and put the following into the file:

#!/bin/bash
#
# Sets up the graphics adapter configuration depending on which card is selected at boot time.

VIDEO=`/usr/bin/lspci | grep -c nVidia`
if [ "$VIDEO" == 1 ]; then
    echo “Using NVIDIA (Speed) configuration.”
    cp -f /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
else
    echo “Using Intel (Stamina) configuration.”
    cp -f /etc/X11/xorg.conf.intel /etc/X11/xorg.conf
fi

exit 0

and save. Now, perform the following commands:

# chmod +x /etc/init.d/sony-graphicswitch
# update-rc.d sony-graphicswitch start 12 2 3 4 5 .

If you’d like to take a look at my Xorg config files, they are available from here: Intel; NVIDIA.

Bluetooth

OK

Appears to work out of the box. I don’t have any Bluetooth devices to test with, however.
You might also want to disable the adapter if you’re not planning on using it:

hciconfig hci0 down; rmmod hci_usb

If you want to bring it backup later, you can just:

modprobe hci_usb

hciconfig seems to bring up the adapter as soon as the kernel module is loaded.

Ethernet

OK

Works lovely out of the box. Uses the sky2 ethernet kernel module.

Wireless

OK

Debian stable

Requires you to install the Intel Wireless 3945 modules for Linux 2.6 (ipw3945-modules-2.6-686), as well as the userspace regulartory daemon (ipw3945d) from the repository. Once you have done that, simple reboot and your wireless adapter should be working nicely with network-manager.

I did notice one thing with the ipw3945 driver - sometimes, the adapter/driver/nm-applet would spin while attempting to get the network key for my wireless network. Other times, it’d take a while before it’d get a lock. I’m not sure where the fault is, but I was using WPA-PSK encryption for the network, and it was only setup to use g, not b/g. I haven’t noticed this with the newer driver (see ‘Debian custom’ below).

Debian custom

Basically, because there were a few useful features in the newer kernel that I thought might be useful for the laptop, I decided to go and roll my own kernel image. I decided to use the 2.6.24-rc6 snapshot tarball. With the new kernel comes the iwl3945 kernel module. So, basically, ipw3945 driver, re-written, and all the nasty bits taken out and put somewhere else, plus it could all be packaged in the kernel together, not built as a custom module seperately, and it doesn’t requires a damn userspace daemon to keep it going. Awesome. The new module works sweet, and doesn’t seem to have the ’spin/scan’ issue I was talking about above. The only downside is the LED doesn’t seem to work, and you have to have the wireless switch on when you boot so it can get the MAC for the device. Oh well.

OpenSUSE 10.3

The wireless worked perfectly out of the box on OpenSUSE. Strangely, the kernel had both the iwl3945 and ipw3945 drivers installed. I selected the iwl3945 as default, as it’s much better - see above. Same issues such as wireless LED not appearing still apply on the iwl3945 driver.

Sound

Issues

The issues noted below occur with both Debian and OpenSUSE.

At first, the headphone jack didn’t seem to play at all - sound would continue to play out of the laptop’s internal speakers. That’s
not really cool, especially if you’re, say, listening to music on public transport. Adding position_fix=1 to the module’s option line seemed to get sound coming from the headphones now, but the speakers wouldn’t shutup. So, close, but no cigar. I can’t remember how the microphone functioned at this time; probably mixed both the internal microphone and external together like the sound output.

To fix this, you’ll need to get at least ALSA 1.0.15rc3 (latest is 1.0.15 at time of writing) or use the modules packaged with the very latest kernel version. You can follow the instructions below to get yourself going (based on these instructions on Ubuntu wiki), assuming the latest version is really 1.0.15:

# apt-get install build-essential ncurses-dev gettext
# apt-get install linux-headers-`uname -r`
$ mkdir alsa-1.0.15
$ cd alsa-1.0.15
$ wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.15.tar.bz2
$ wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.15.tar.bz2
$ wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.15.tar.bz2
$ tar -xvjf alsa-driver*.bz2
$ tar -xvjf alsa-lib*.bz2
$ tar -xvjf alsa-utils*.bz2
$ cd alsa-driver-1.0.15
$ ./configure --with-cards=hda-intel
$ make
# make install
$ cd ../alsa-lib-1.0.15
$ ./configure
$ make
# make install
$ cd ../alsa-utils-1.0.15
$ ./configure
$ make
# make install

(TODO: Do we actually still need this, or does ALSA properly detect the card now? I guess you can try without, and see if it works.) You will also need to tell ALSA that you’re using the ‘Vaio’ version of the HDA Intel chipset, so open up /etc/modprobe.d/alsa-base and add the following to the very bottom:

options snd-hda-intel model=vaio

Now, reboot, and you should have your laptop’s sound system working perfectly! Since this has been fixed upstream (for the most part, anyway), hopefully new releases of distributions should have this going OK. 1.0.15 appears to have been packaged for Debian already and is currently sitting in the queue waiting to be accepted into testing as of writing, AFAIK.

ACPI

Probably the worst bit about this laptop. ACPI support is horrid, and the fact that this machine is fairly recent makes things even worse. The machine contains two proprietary ACPI chips - SNY6001 and SNY5001.

TODO: expand

Fn keys

OK

The function keys themselves worked out of the box. You appear to need a recent kernel for this to work correctly, or rather, HAL needs to be patched.

Debian stable

Not working here. Either it was HAL, or sonypi. Will get back to you.

Brightness / backlight power

Fail

Does not work at all on latest Intel drivers. Did work on 2.1.0 (2.2.0 being the latest in debian unstable).
Sony-laptop does not permit us to ‘echo’ stuff into /sys
NVIDIA is also a pain in the arse - no real way to decrease backlight power and get power savings.

Suspend/resume

OK

Suspend and resume work very well on this laptop, using the Intel graphics card. s2ram does require a smallish hack to get it to suspend (mainly telling the BIOS that we’re going into S3 mode). At the moment, the machine is not on the s2ram whitelist, therefore you’ll need to force it suspend (system information sent to mailing list - you should expect it to work perfectly in the next release). You can achieve this via the following:

# s2ram --force --acpi_sleep 1

Suspend to disk works flawlessly, also on the Intel card.

The NVIDIA card is currently untested, however, there does appear to be a simple way to get that going: http://en.opensuse.org/NVidia_Suspend_HOWTO

Camera

Issues

Requires the installation of the following patched kernel module: r5u870. Should work fine against all recent kernels (2.6.19+). Your distro might have this packaged too, though, make sure they’re not the original by Sam Revitch, as they do not work with this version of the camera. Gentoo ebuilds are available for this driver.

Fingerprint reader

Issues

Untested. Research indicates that a native Linux driver is available to interface with the device - configuring software might be the actual difficult part. Check out: http://www.upek.com/solutions/pc_and_networking/sdks/linux/

The reader itself is made by Upek Inc., they supply the fingerprint readers on a number of laptops, including the Thinkpads. A quick Google is probably also going to be useful; you might have to search for ‘thinkpad upek linux’ to get some results, or something like that.

TODO: actually try and install.

Rating this ‘with issues’, since we have to install something to begin with, otherwise it’s ‘fail’.

Memory card reader

Adapter

?

The laptop itself comes with a memory card adapter (VGP-MCA20A) which plugs into a slot on the right hand side of the laptop, next to the DVD drive. It enables you to plug in a Memory Stick, xD, SD or MMC card, and it should show up in Computer (for those with GNOME).

When plugging in the memory card adapter, dmesg appears to pick it up:

usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 4:0:0:0: Direct-Access     Sony     USB   HS-CARD    4.82 PQ: 0 ANSI: 0
sd 4:0:0:0: [sdb] Attached SCSI removable disk

I don’t actually have a MemoryStick/SD/MMC card to test the reader with, sadly. I am planning to buy one at a later stage; hopefully then I can actually mark this section as OK/ISSUES/FAIL. Otherwise, it seems to work.

Built-in

?

With the adapter disconnected, however, I still see a ‘Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)’ under lspci, which makes me curious. There is another MemoryStick / MemoryStick Pro slot on the left hand side of the machine. The Texas Instruments device is actually that slot, and Sony have decided merely not to provide ports for other devices in their own self interest (or at least, it looks like it).

I also haven’t had a chance to test this slot, as I don’t own any MemoryStick cards. Can’t see why it shouldn’t work, though.

ExpressCard slot

?

Untested. Appears under ‘lspci’ as a Texas Instruments PCIxx12 Cardbus Controller.

4 Comments »

  1. [...] x2: More detailed information will now live here [...]

    Pingback by Alex Hixon’s Blog » Blog Archive » Hello world. — December 31, 2007 @ 2:39 pm

  2. Hi Alex

    I think your machine is almost identical to the SZ650N that is sold in the USA; in the UK it’s marketed as the SZ61. Mine’s the American model, because they’re sold in the states for much much less (a few hundred quid) than in the UK. Nice to have friends who travel…

    Thanks for updating the r5u870 driver: can you email me when further updates are made? As an aside, I compiled it under Ubuntu Hardy alpha 3 (linux-2.6.24-4) and got a corrupted image under xawtv. Where can I file a bug report?

    Cheers

    Mike

    Comment by Mike — January 18, 2008 @ 8:51 pm

  3. Scratch that - cheese works fine on Hardy (linux 2.6.24-4), so xawtv must be buggy not r5u870

    Comment by Mike — January 18, 2008 @ 10:36 pm

  4. Thanks for that Mike!
    I’ve updated the entry to include the other models.

    Comment by Alex — January 19, 2008 @ 4:00 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment