If you’ve bought the brand new Vaio Z, with the idea to use linux on it, you might have been really disappointed, but there is hope now ;)

Everything works but the dynamic graphic switch and the Memory Stick reader, if you have some luck and you already have some knowledge in linux.

18/01/2011 UPDATE :

kernel 2.6.37 works, no patch required !

If you experience a black screen when resuming from a suspend-to-ram, just add to /etc/pm/config.d/defaults (create it if it doesn’t exists) :
ADD_PARAMETERS="--quirk-test --quirk-s3-bios --quirk-s3-mode"
SLEEP_MODDULE="uswsusp"

And if you experience a black screen after the bootloader, add “acpi_osi=” to the boot arguments of your kernel.

In order to use the nvidia card or power it off when using the intel one, patch your bios and enable static switching.


Choose your distro

Every recent linux distro should be able to work. I’ve chosen Archlinux but Ubuntu, Debian or Fedora are ok too.

There’s only two prereqs :

  • a recent kernel, higher than 2.6.30 in order to have wifi and ethernet working during the installation.
  • and one more particular… : grub 1 (or grub LEGACY, grub 0.97)

Grub is the bootloader of most of linux distros, but there is two versions : 1/LEGACY/0.97 and a new one, grub2, that should be better, faster, and should provide more modularity. That new version just cause a massive freeze at boot : black screen, mad fan, high temperatures.

With Debian or Archlinux, you’re asked which bootloader you want during the installation, I advice you to choose grub1 ;)

If your vaio has the ssd raid, they will appear as separated drives during the installation, you’re free to create a new raid with linux utilities.

After the Install

Intel Graphic Card

Maybe your display works without doing anything.. If so, just let me know in the comments what’s your specific Vaio Z version.

If you’re system is freezing right after boot, go to the troubleshooting section.

Else you might certainly have random colors. Then You need to compile a 2.6.34 kernel with this patch

In order to do that, download the 2.6.34 kernel from kernel.org

then untar it ( tar xjvf linux-2.6.34.tar.bz2 ), go in his directory (cd linux-2.6.34)

Patch these kernel sources : patch -p1 < /chemin/vers/i915patch.txt

22/10/2010 update : Download these modified kernel 2.6.35-rc5 sources (edp-fixes branch from jbarnes drm-intel git repository), untar it and go into his directory.

Then follow the method depending on your distribution.

For Ubuntu :

https://help.ubuntu.com/community/Kernel/Compile.

For Archlinux :

zcat /proc/config.gz > .config # create a new .config, but you could also take mine : .config

make menuconfig # in general setup -> local version, set -KMS or whatever you want.

make all

sudo make modules_install

sudo cp arch/x86_64/boot/bzImage /boot/vmlinuz26-kms

sudo mkinitcpio -g /boot/kernel26-kms.img -k 2.6.34-KMS

then modify /boot/grub/menu.lst in order to boot on your new kernel.

Trackpad

To get it working, boot with this option : i8042.nopnp.

Add “i8042.nopnp” at the end of the kernel line in /boot/grub/menu.lst like in that example :

# (0) Arch Linux

title Arch Linux
root (hd0,0)
kernel /vmlinuz26-kms root=/dev/sda3 ro quiet i8042.nopnp
initrd /kernel26-kms.img

Graphic Switch

Without doing anything, the both cards are enabled, you can see that with lspci, it doesn’t depends on the position of your switcher. Because of a memory allocation thing, only the intel card is usable at this time but your power consumption is like you were using the nvidia one.

There is two ways for getting this switcher to work.

You could boot a first time with a kernel older than 2.6.30, switcher to stamina or speed, then restart with the right kernel.. each time you want to use your laptop, this is the more safe and boring method.

The second method is to unlock the bios advanced options, as described here: http://forum.notebookreview.com/sony/473226-insyde-hacking-new-vaio-z-advanced-menu-bios.html

  • Install unetbootin then use it to install freedos on a USB key.
  • Copy these files on it
  • Reboot on the USB key
  • type “cd C:” to go at the root of the USB key
  • launch : “flashit dump.rom /g” in order to create a dump of your bios
  • reboot on your linux
  • download these scripts : scripts-py
  • In their folder, execute : ./python advanced_menu.py dump.rom new.rom (where dump.rom is the path to your dump, and new.rom the path to the new one you’re building.)
  • If there’s errors you don’t understand, stop, don’t mess your bios !
  • Else, put new.rom on your key, reboot on it like before, then execute: “flashit new.rom /f” to flash your bios.

And voilà ! Press F2 at boot and you have access to the bios and all its options! So put “VGA Switching Policy” on Static, then the switcher position will works at each boot.

Bindkeys

You might want to use some keys that don’t work out of the box, like those to adjust brightness. You need to install the sony-laptop module wrote by N. Preining: http://www.logic.at/staff/preining/software/

Sound

Put that in /etc/modprobe.d/snd-hda-intel.conf :

options snd-hda-intel model=sony-assamd

Suspend to Ram (kernel 2.6.34)

The screen might not work at resume. In this case you need to execute these commands :

xrandr –output DP3 –off
xrandr –output DP3 –auto

You should put it in a script executed at system resume. Try /usr/lib/pm-utils/sleep.d/01sony-vaio (don’t forget to chmod +x it), and put in that script given by E. Lacombe :

#!/bin/sh
# light up laptop screen for vaio VPCZ11Z9E

. "${PM_FUNCTIONS}"

resume_lapscreen()
{
#    export DISPLAYUSER=`ps --no-heading -o user -C start_kdeinit`
#    /usr/bin/xauth add `sudo -u $DISPLAYUSER -s /usr/bin/xauth list :0.0`
    /usr/bin/xrandr --output DP3 --off
    /usr/bin/xrandr --output DP3 --auto
}

case "$1" in
        thaw|resume) resume_lapscreen ;;
        *) exit 0 ;;
esac

It doesn’t work for me, but you might be lucky ;)

I’m still looking for a solution for achlinux+KDE4, for now I’ve setted up a bindkey that execute the xrandr commands, but at resume, my screen has only 256 colors.

Troubleshooting

System Freeze

This could be caused by modesetting on kernels before 2.6.33. You have to boot with this option i915.modeset=0 (to add in grub at boot or in /boot/grub/menu.lst)