Debian/Linux on Sony VAIO Pro 13

I recently wanted to order a new laptop from work, and due to the ignorance of Lenovo I couldn’t get my preferred Thinkpad T41 in time for the end of the financial year. So I went for a Sony VAIO Pro 13 model. Having used a VAIO Z series laptop for quite some time, including maintaining soem extensions of the sony-kernel modules for some time, and implementing rfkill applets for Gnome, I expected a few problems with the new hardware.

Vaio Pro 13

Fortunately some other people have already posted various information on how to get the laptop properly running on linux, that helped. At the end it took me about two days to shrink Windows8.1, get linux to boot and run, move about 300Gb of data from the old laptop to the new, carry over all the configuration changes and adaptions, and tweak the behaviour. At the moment the laptop is in decent state with most things working properly, including suspend, wlan, multi-boot, etc.

Original status

As delivered the laptop comes with Windows 8.1, and 6 different partitions:

  • partition 1: fat32, EFI system partition, hidden
  • partition 2: ntfs, Basic data partition, hidden, diag – contains WindowsRE
  • partition 3: fat32, EFI system partition, boot partition
  • partition 4: non-allocated, Microsoft reserved partition
  • partition 5: ntfs, Windows data
  • partition 6: ntfs, hidden, diag – contains the full Sony factory restore data

Step 1: shrinking Windows 8.1

I first tried the internal Windows shrink functionality, but it didn’t allow me to shrink below 230Gb, and I didn’t want to waste so much space for Windows. parted also refused to work with newer ntfs file systems, so I ended up downloading the AOMEI Partition Assistant. Using this one I shrinked the Windows main partition (number 5) to 100Gb and thus freed about 350Gb for Linux.

Step 2: preparing the BIOS

Shut down the computer, turn it off. When turned off, press the Assist button. This brings you into the VAIO Care Recovery Interface – in my case all in Japanese. Select F2 or press the BIOS button to configure the BIOS. In the BIOS the following settings have to be changed:

  • disable secure boot
  • enable booting from external devices
  • enable booting from USB and move it to the top of the list

That are all steps necessary. In case your Windows 8.1 complains by displaying a stupid message in the lower right button of your screen that secure boot is not configured correctly, go to this Microsoft Knowledge Base article, download the update, and run it.

Step 3: installing Linux

For installation one needs a Debian installer that supports UEFI, which seems to be available since about August 2013. Guided by my friend Mattia’s description, I downloaded the daily snapshot netinstaller image (firmware included!), dumped it onto an unused USB stick with
cat firmware-testing-amd64-netinst.iso > /dev/sd
sfdisk -R /dev/sd

(adapting the sd part accordingly!), and booted into the USB stick.

Warning: If you use one of the default installation cd images they may not contain the non-free firmwares necessary to get the Intel chipset running. In this case I recommend having a USB-Ethernet adapter at hand.

Installation then proceeds as ususal, I just selected guided partitioning of the biggest available space and the third partition (sda3) as EFI boot partition.

Important: Before finishing the installation, fixing the boot loader is necessary!

Step 4: Fixing the boot loader

Step 4.1: Fix Grub-Efi locations

I first tried to reboot without further changes, but that threw me straight into Windows, so I followed again Mattia’s advice:

  • Before rebooting change to the second console and press to active it
  • Go to /target/boot/efi/EFI, there should be three directories:
    • Boot/: the original boot loader
    • Microsoft/: microsoft chain loader
    • debian/: the Grub EFI boot loader
  • Do the following freshuffling:mv Boot Boot.orig
    mv debian Boot
    cp Boot/grubx64.efi Boot/bootx64.efi

Update 2014-08-27: See this post and this post for more details, but no simple solution.

Step 4.2: Fix linux kernel command line

According to this post, and also in my experience with the newest kernels, it is necessary to add an entry to the linux cmdline. For this, edit /target/etc/default/grub to include

GRUB_CMDLINE_LINUX_DEFAULT="libata.force=noncq quiet"

(the default is only the quiet part). After rebooting once, run update-grub.

After that a reboot brought me into the grub menu, from which I could boot both linux and windows. Yeah, all settled.

Step 5: Update to unstable

After rebooting into linux again, I changed my sources to sid (unstable) and upgraded all packages. The current kernel is 3.13 and that is fine enough as far as I see.

Step 6: Home-made kernel with sony-laptop updates

I cloned the current linux.git and merged Mattia’s sony-laptop branch for_3.15 into it, so that I have the newest support in the sony-laptop kernel module. But this is only for those who fancy building their own kernels. In principle that is:git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
git pull git://git.taihen.jp/linux-sony-2.6.git for_3.15

I used this config file for building the kernel where most features are compiled in, and most other things disabled. This is the kernel I am currently running (as of today 2014-03-30).

Step 7: iwlwifi firmware update

Update 2014-04-11: The following alone is not good enough, one needs also an update to either kernel 3.15 (when it is out) or include the wireless-testing git repository. See the followup article for details.

The iwlwifi firmware/driver seems to have some problems. It took always ages until packets actually went over the link, although the network manager told me it is connected. I downloaded the respective firmware iwlwifi-7260-8.ucode from the linux-firmware git repository with and copied the file into /lib/firmware (overwriting the copy from the package firmware-iwlwifi). This (hopefully) fixed most problems regarding wifi for me.

lspci -k output

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)
	Subsystem: Sony Corporation Device 90b6
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: i915
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: snd_hda_intel
00:14.0 USB controller: Intel Corporation Lynx Point-LP USB xHCI HC (rev 04)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: xhci_hcd
00:16.0 Communication controller: Intel Corporation Lynx Point-LP HECI #0 (rev 04)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: mei_me
00:1b.0 Audio device: Intel Corporation Lynx Point-LP HD Audio Controller (rev 04)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 3 (rev e4)
	Kernel driver in use: pcieport
00:1c.3 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 4 (rev e4)
	Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 6 (rev e4)
	Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation Lynx Point-LP USB EHCI #1 (rev 04)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation Lynx Point-LP LPC Controller (rev 04)
	Subsystem: Sony Corporation Device 90b6
	Kernel driver in use: lpc_ich
00:1f.3 SMBus: Intel Corporation Lynx Point-LP SMBus Controller (rev 04)
	Subsystem: Sony Corporation Device 90b6
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
	Subsystem: Intel Corporation Dual Band Wireless-AC 7260
	Kernel driver in use: iwlwifi
03:00.0 SATA controller: Samsung Electronics Co Ltd XP941 PCIe SSD (rev 01)
	Subsystem: Samsung Electronics Co Ltd Device a811
	Kernel driver in use: ahci

I will surely have more things to say until this new piece is running properly … but for now it is ok.

Links

27 Responses

  1. i also use a Sony VAIO and found this very informative. Thank you for sharing hope to hear more soon.

    • Hi Michael
      thanks for your comment. Yes, I am planning to add more information. I realized only after that article that the sd card was not working in my home-brewn kernel, because I forgot a driver. Also the wireless is still painful at times. In the pre 3.15-rc1 phase a lot of changes regarding iwlwifi/iwlmwm have been merged, so I am optimistic that this will improve.

    • Hi Michael, I have written now two more posts, one about the Wifi issue, and one about the boot loading. I think the one piece open for me is *fixing* the efi loader problem as described here http://www.preining.info/blog/2014/04/sony-vaio-pro-uefi-booting/

  2. Max Reisinger says:

    Hi Norbert,
    Thanks for that great article. Very helpful. I have similiar troubles with that laptop and ubuntu 14.04.
    I am a little worried that the computer wouldnt boot after executing the …. part from chapter 4.1. Is it save to do so?
    mv Boot Boot.orig
    mv debian Boot
    cp Boot/grubx64.efi Boot/bootx64.efi

    Thanks again.
    Cheers, Max

  3. Michal Lepicek says:

    Hi,
    may I ask if your shortcut (ctrl+f1) to turn on/off touchpad works?
    Mine doesn’t.
    Thanks.

    • Hi Michal,
      no, it does not. I guess one has to fix this in the sony-acpi module. I will ask Mattia for that.

      You can always easily turn it of with `synclient TouchpadOff=1`

  4. Eva Brucherseifer says:

    Hi Norbert,
    after 2 Vaio Z I now also ended up with a Pro 13 model. Fortunately there are still refurbished models available. Thanks for the head start with this article. I’ll report my installation experiences once it is done. I am still waiting for my 512GB SSD upgrade 🙂
    Best,
    Eva

    • Hallo Eva,

      what a pleasure after so long time! I remember well how happy I was when you posted the first version of the vaio kernel module – big thanks! Fortunately all features have by now been included by Mattia into the main kernel.

      So you, too, are on Pro 13, then maybe you can find a good solution for the boot complications. In the meantime I’ll try to continue my contact with Sony to get this fixed.

      Looking forward to your remarks!

      Norbert

  5. Eva Brucherseifer says:

    ok… opensuse 13.1 installation went fine, it contains UEFI support… until reboot. So now I am at “System boots Windows no matter what”. Have you seen this suggestion and maybe even tried it?

    • You mean the “bcdedit /set {bootmgr} path \EFI\opensuse\shim.efi” thingy? No, I haven’t tried, but I will, after I’m back from my 3 week travel 😉 But my guess is it wont help, since already the bios resets the boot order. But one never knows.

  6. uwe188 says:

    Thank you for that article. It was one of the main reasons to by a vaio pro.
    I am now on debian 8.0 jessie and KDE (without any windows partition) and everthing including touch standby sdcard is working. (only disable touchpad via fn f1 not) light dimming, good sound …
    kernel 3.14-2-686-pae no parameters needed no special kernel needed
    I only remember having a little trouble getting wifi working …
    but now i am happy with this lightwight powerfull linux laptop!

    Thank you for the article!

    • Hi Uwe,
      thanks for your email. Good to hear that it works out quite well at your side, too. Indeed, Fn-F1 is not working, but it should be easy to get this done. Pressing the button sends an ACPI event:

      button/fnf1 FNF1 00000080 00000000 K

      so one only needs to bind an ACPI action to it. A simple script like the following toggle-touchpad would do the trick:

      #!/bin/sh
      current_state=$(synclient -l | grep TouchpadOff | awk '{print$3}')
      if test $current_state = 0
      then
        # current_state == 0
        synclient TouchpadOff=1
      else
        # current_state == 1
        synclient TouchpadOff=0
      fi
      

      Hope that helps

  7. uwe188 says:

    thank you for the hint

    tryed it with with /etc/acpi/events but i am using meanwhile the synaptic feature “disable touchpad while typing” and that seams to work similar
    so if i hit a key touchpad is allways disabled
    and it ignores the option with the funtion keys

    but its not important
    best regards uwe

  8. Julien says:

    Hi guys,

    I installed Linux Mint 17 on my Sony Vaio SVExxx and I have no problems at all.
    Everything is up !

    • Hi Julien,
      thanks for your comments, and good to hear that all works out at your side. Do you have any problems with booting? Do you have a dual boot system?

  9. thanks for the post
    seems there should be bios updataes for this laptop or else fan would start makin noises
    the updates are available for windows but where can I get them for linux

    • Hi Mohammad,
      BIOS are in most cases not possible to update on Linux – that would require a fully free computer, which are very rare. For updating you need to have Windows, or at least be able to boot from a usb stick and get the updater running.

      I know, that is a pain, but there is not much one can do here.

      BTW, where there is a firmware update for the fan? I haven’t seen one!

  10. Jvek says:

    Hello Friend. First of all I apologize, because I do not speak the language so I am using an online translator. I’m Brazilian, I also have this ultrabook vaio. I followed your step by step and managed to install linux (debian stretch), but only linux, I deleted the windows. I have a problem; I can not access the wifi network, only the wired network. Have I tried everything, please help me?

  11. Jvek says:

    Good afternoon, thank you for the answer. My ultrabook is just like yours.
    00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
    00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)
    00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
    00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
    00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
    00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
    00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 6 (rev e4)
    00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
    00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
    01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
    03:00.0 SATA controller: Samsung Electronics Co Ltd XP941 PCIe SSD (rev 01)

  12. Jvek says:

    The board line wireless…

    01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)

  13. Jvek says:

    The lspci -k output command shows a result exactly the same as the one you posted…

    • Did you install the nonfree firmware? Without that nothing goes. If you want to continue this discussion, please send me the dmesg output via *email*. Thanks

  14. Jvek says:

    All right, I’ll send it.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>