Installing Ubuntu 12.04 on Sony Vaio VPC-Z13M9E/B

Update 17th June 2012: Please read the comments before following this guide.

I installed 11.04 from scratch and 11.10 as an upgrade. Both of them required quite a lot of fiddling before everything worked as they should.

I am pleased to say that things have improved greatly with 12.04. The install is way easier than before! It’s even easier if you disable RAID and just erase the Win7 partitions. These instructions are suitable if you wish to keep the Win7 install running alongside Ubuntu.

A couple of disclaimers:

Please note that I started the install with a reboot from my old Ubuntu 11.10 with only the Intel GPU enabled (i.e. the GPU switch set on “stamina”). Things might work differently during install if both of your GPUs are enabled, for example, you might need to remove the Nvidia drivers before installing the Bumblebee Nvidia package. But I don’t think this is probable. Please report in the comments if you encounter any strangeness, and I’ll update the post as needed.

Also, I haven’t yet tested everything systematically, I just updated my system an hour ago. So you might wait a week or two before doing this on a high-priority work computer. I’ll update this post if I notice anything strange.

Follow these steps:


  • Download the Ubuntu 12.04 64-bit alternate install image.
  • Use the USB startup disk creator to install it on a USB drive.
  • Start the installation process.
  • Remember to “Activate Serial ATA RAID devices” when asked!
  • Select manual partitioning.
  • I wanted to keep the partitioning scheme intact, so I left the Win7 ntfs partitions intact and just used my old ext4 partition. You can’t create a swap partition, because Win7 + 1 Linux partition take up all 4 primary partitions. That’s all right, you can always create a swap file later on if you like.
  • So select the ext4 partition using enter (or create one), mount it at root (“/”), and set the ‘bootable’ flag on.
  • Write down the name of the Raid volume, in my case it was “/dev/mapper/iswfeheiegigVolume0″
  • At this point, the install starts.
  • After install, you have to specify where to install the bootloader. You saw the name during partitioning, so it could be “/dev/mapper/iswfeheiegigVolume0″, for instance.
  • Remove the boot media and restart.

Post-install procedures

  • Now you have a working install, except both of the GPUs are in use, increasing battery usage.
  • (I got a Compiz crash in the beginning, plus some complaints about incomplete language support. Your mileage may wary.)
  • type in a terminal: “sudo apt-get update” and “sudo apt-get upgrade”
  • I don’t know how, but after upgrading the packages, the Update Manager had still more packages to install (a new 3.2.0-24 kernel). I installed that too.
  • I don’t know if this is necessary, but I rebooted at this point.
  • add the Bumblebee repository and install the packages:
  • sudo add-apt-repository ppa:bumblebee/stable
  • sudo apt-get update
  • sudo apt-get install bumblebee bumblebee-nvidia
  • Now I rebooted a final time
  • All done!

I checked using powertop (sudo apt-get install powertop) that the Nvidia chip is not drawing power when idle. Whenever I want to run a program with the Nvidia chip, I just type “optirun programname”. You can try it with “glxspheres” vs. “optirun glxspheres”. I got 18 frames vs. 80 frames.

8 Responses to Installing Ubuntu 12.04 on Sony Vaio VPC-Z13M9E/B
  1. Joerg

    Hi Heikki,

    thanks again for your more than helpful blog.
    I would just like to clarify some points.

    So you obviously started out of a stamina mode (the installation process) and the computer remains in stamina mode even after installing bumblebee-nvidia and if you would like to use the nvidia card you just run the program by typing “optirun programname”. This switches of your intel card (or stamina mode) and turns the nvidia card (speed mode) on ? And after a reboot you are back in stamina mode?

    I installed 12.04 “the old way”, although much simpler than before by
    1. install everything in stamina mode
    2. Changed boot option to enable static switching (acpi_osi= trick)
    3. removed xserver-xorg-video-nouveau by
    sudo apt-get –purge remove xserver-xorg-video-nouveau
    3. Blacklisted the following modules.
    sudo gedit /etc/modprobe.d/blacklist.conf
    and adding
    blacklist amd76x_edac #this might not be required for x86 32 bit users.
    blacklist vga16fb
    blacklist nouveau
    blacklist rivafb
    blacklist nvidiafb
    blacklist rivatv
    4. Rebooted in speed mode and installed the nvidia drivers via the ubuntu
    ‘additional drivers’
    (5. I am not quite sure if still using the latest Preining software or not )

    Works perfect for me besides the fact that I have to reboot every time I would like to switch from stamina to speed mode or vice versa. So your solution sounds much better.

    But I am still experiencing problems.
    -First of all with the suspend mode. After the computer wakes up it often freezes or the mouse/ touchpad is not working and I have to reboot. Any problems with that if you do it your way?
    -Furthermore HDMI output only works with 720*400.
    -Are you able so alter the brightness when in speed mode?

    Again thanks for the good work

  2. Heikki

    Hi Joerg, thanks for describing your install procedure as well!

    Bumblee works in a different way from the old static switching procedure. When I type “lspci”, both GPUs are visible, but Bumblebee comes with a daemon that switches off Nvidia, so it does not draw any power. When you start an application with Bumblebee (“optirun”), it starts another X server, so only the application’s window uses Nvidia! I don’t understand the more specific technical details, but it does work. =)

    Additional advantage for dual-booters is that since you don’t use static switching, you don’t need to boot twice when switching to Win7.

    Regarding your other comments:
    * Suspend seems to work for me, the couple of times I’ve used it so far.
    * I had the intermittent problem with the touchpad being disabled in 11.10. Usb wireless mouse always worked. Haven’t had this problem yet with 12.04, but we’ll see. If I recall correctly, restarting X fixed it.
    * Haven’t tested HDMI yet, will report back later.
    * Brightness is supposed to work with Bumblebee, but I haven’t tested it yet with fullscreened optirun applications.

    Also, I’ve had noticeably increased performance with some applications I’ve run with optirun in comparison to running them in static speed mode. I don’t know if this is due to updated drivers in 12.04 or Bumblebee. In any case, I am happy so far!

  3. Heikki

    I managed to do some further testing today.
    First of all, the brightness keys indeed work with fullscreened applications rendered with the nvidia chip.
    Secondly, the HDMI out support is quite poor. I was able to launch single applications with the aid of instructions from the Bumblebee wiki (, but I couldn’t get desktop running on the external monitor. Also, resolution was very poor, probably 720*400 like Joerg commented above.

    I grudgingly removed Bumblebee since I really need HDMI output at the moment. I installed a 3.4.0, because supposedly it would support static switching out of the box. It didn’t, but I enabled it by adding ‘acpi_osi=’ to boot options like Joerg had done (see the comment above).

    However, I couldn’t make static switching work reliably. I tried some tricks I’d employed with 11.10, but to no avail. Compiz was either working with Intel or with Nvidia, but not both. As a temporary solution, I switched back to using Bumblebee, but this is not a long term solution for me, since I need HDMI output. By the way, HDMI output was working great with Nvidia’s proprietary package. For some reason, nvidia-current was not working for me.

  4. Davide

    Excuse me, but the installation doesn’t ask for raid activation(Activate Serial ATA RAID devices) and so doesn’t work the grub installation at the end of the process. Any suggestions??

  5. Nils Weinander

    Hi, I have just installed Ubuntu 12.04 on a Vaio Z13 and thought I’d share my experience so far.
    * The kernel module for static switching worked fine with the steps outlined for 11.04, but without the patch
    * HDMI out works in speed mode, but not in stamina
    * Screen brightness adjust works in stamina but not in speed
    * I haven’t tried sleep/resume yet

  6. Heikki

    Davide, I realise you left that comment quite some time ago, but if you didn’t get the RAID option, either you were not using the alternate install CD. Please note that Ubuntu 12.10 does not have the alternate image any more, and no more RAID support. I managed to upgrade my install to 12.10, but not without errors. Initially, grub did not install and I had to do some manual fiddling to get it to work. I haven’t tried a fresh install of 12.10 yet.

    Also, I have a working setup with bumblebee and HDMI output now, I have described the process elsewhere.

  7. Nils Weinander

    Update: with static switching I get 3D support in stamina OR in speed, but not both. When I install the latest NVidia driver I lose Intel 3D support. When I reinstall the Intel drivers I lose NVidia 3D support.

  8. Heikki

    Just use Bumblebee if it suits you. Static switching is a pain in the ass! If you need the HDMI port, see the link in my previous post. Also, check out

Leave a Reply

Your email address will not be published. Required fields are marked *