Linux (Kubuntu) on Vaio Duo 13

The Vaio Duo 13 is a very good convertible notebook (in my opinion). For me as a student I don’t want to miss it anymore.

Note: Since the battery of the notebook is broken and Sony told me there is no chance to replace it (production stopped, no more batteries in stock) I was forced to buy an entirely new notebook. Of course, I was not amused that Sony cancelled support for a 1400€ laptop and thus I switched to Lenovo.

10 hours battery usage, touchscreen and pen input and all of it together with good performance. Sounds good – but there is another point about this laptop.

vaio

Linux

Linux is great. But now try to use Linux on the Vaio Duo 13.
A year ago not even the touchpad worked. Wireless LAN? Nope.
Touch? Yay, it works! Pen input? Meh – not very useful since the driver misses many important events.
After 3 years of using the notebook nearly every day the battery has a capacity of 78% left.
For Linux this means: About 5 to 6 hours when using it in a normal manner.

I started with installing Ubuntu on the laptop, later I switched to Kubuntu (without reinstalling).

Problems

As mentioned above there are or were several problems when running Linux on this laptop. After several updates, hours of using Google and reading Wikis I finally got everything to work like I would expect it.

After a fresh install / booting of a live system: You probably won’t see anything. The brightness is set to 0 – so use your keyboard shortcut to increase the brightness and tada – here you go.

When using an older system the touchpad might not work as expected. It’s connected via SDIO, support for this was added in Kernel 3.19.

When booting try to set

acpi=off

to the kernel boot parameters. To debug remove

quiet splash

to see the boot log.

Installing

I strongly recommend to pick a system using Kernel 4+ or at least install such a kernel.

If the screen stays black after boot: Increase the screen backlight. It’s set to 0%.

The rest of the installation should work as usual:

Downloading Kubuntu

Download Kubuntu

Grap the latest x64 download from the official Website.

Make a bootable USB Stick

To install Kubuntu you will need an (empty) USB Stick. You can use UNetbootin to do so. Just follow the steps here.

Wanting Dual Boot?

Maybe you would like to keep Windows installed as well. In this case you have to resize your partitions before you can install Kubuntu. You can try to do this with Windows Tools or after booting Kubuntu from the USB Stick. In Kubuntu I recommend to you “GParted” to resize your partitions. Keep in mind that you always should backup your important data first!

Boot

Put the USB Stick at your Vaio Duo 13 and turn it on again. Go to the Boot Menu (F12) and select your USB Stick as Boot Device. You can start trying Kubuntu now or directly go to the installation – If you cannot see anything, try to turn up the display brightness. It almost took me half an hour to figure this out 😉

Just follow the installation process.

Wireless LAN

The driver / module to use is brcmfmac for the BRCM43241 chip. The driver needs a NVRAM file to work, but cannot get it by its own. It’s stored in an EFI variable, where the Windows driver can access it. To use this NVRAM file, you need to extract it from there.

Mount the efivars and copy the NVRAM file (use sudo / do it as root)

mount -t efivarfs none /sys/firmware/efi/efivars
cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcmfmac43241b4-sdio.txt

Make sure you actually use the brcmfmac43241b4-sdio.txt, otherwise the chip won’t work.
To reload the driver (as root / or use sudo):

modprobe -r brcmfmac && modprobe brcmfmac

Afterwards the interface should show (check via ifconfig).

If you use NetworkManager, there might be an issue that no networks show up.
Check that the device is neither soft-blocked nor hard-blocked via

rfkill

Check /etc/NetworkManager/NetworkManager.conf and make sure it contains “managed=true” and not “managed=false” in the ifupdown section:

[ifupdown]
managed=true

You should also make sure, there is no other configuration for your wlan interface

nano /etc/network/interfaces

There may be no configuration for the wireless interface at all!

After these steps the Wireless LAN works for me quite stable. If you have more issues, you can try to disable power management of the chips:

iwconfig wlan0 power off

This does not power of the chip at all, it just turns off power management!

 

Pen Input + Xournal

When using Windows I really like the behavior of OneNote when using touchscreen and pen. It just works. For Linux I really like Xournal as a note-taking tool.

When installing Xournal from apt-get, you might experience bugs when using the pen. So please don’t do this.

Install Xournal

Compile Xournal by yourself to get make pen + touch work as expected (So you will get the newest version where several bugs have been fixed). As root or with sudo:

git clone git://git.code.sf.net/p/xournal/code xournal-code
cd xournal-code

apt-get install automake autoconf libgtk2.0-dev libgtk2.0 libgtk2.0-0 ibgnomecanvas2-0 ibgnomecanvas2-dev libpoppler-glib-dev libpoppler-glib8

./autogen.sh
make
make install
make desktop-install

Now you have the latest version of xournal installed.

Pen driver

xinput list

will give you a list of your input devices. Hopefully the pen will show up as “NTRG0F01:00 1B96:0F01 Pen” (I never had issues with this step – pen worked before I could use the touchpad or WLAN)

If you do not experience problems when using Xournal with “Touchscreen as Hand” – skip this section.

Otherwise: Use the Wacom driver instead of the default one.

In /usr/share/X11/xorg.conf.d/10-evdev.conf comment out the tablet section:

# Pen uses Wacom Drivers: See 50-wacom.conf 
#Section "InputClass" 
#        Identifier "evdev tablet catchall" 
#        MatchIsTablet "on" 
#        MatchDevicePath "/dev/input/event*" 
#        Driver "evdev" 
#EndSection

Then, in /usr/share/X11/xorg.conf.d/50-wacom.conf, modify the section about the N-Trig class:

Section "InputClass" 
        Identifier "Wacom N-Trig class" 
        MatchProduct "HID 1b96:0001|N-Trig Pen|N-Trig DuoSense|NTRG0F01:00 1B96:0F01 Pen" 
        MatchDevicePath "/dev/input/event*" 
        Driver "wacom" 
        Option "Button2" "2" 
        Option "Button3" "3" 
EndSection

(I just added “|NTRG0F01:00 1B96:0F01 Pen” to the MatchProduct-line).

Reboot.

xinput list

should now show something similar to this:

⎡ Virtual core pointer                  id=2    [master pointer  (3)] 
⎜   ↳ Virtual core XTEST pointer        id=4    [slave  pointer  (2)] 
⎜   ↳ Sony Vaio Jogdial                 id=8    [slave  pointer  (2)] 
⎜   ↳ NTRG0F01:00 1B96:0F01 Pen stylus  id=12   [slave  pointer  (2)] 
⎜   ↳ NTRG0F01:00 1B96:0F01             id=13   [slave  pointer  (2)] 
⎜   ↳ SONY0001:00 06CB:0001             id=14   [slave  pointer  (2)] 
⎜   ↳ NTRG0F01:00 1B96:0F01 Pen eraser  id=16   [slave  pointer  (2)] 
⎜   ↳ NTRG0F01:00 1B96:0F01 Pen pad     id=17   [slave  pointer  (2)]

Configure Xournal

In Xournal, go to “Options” and check “Use XInput”.
Under “Options->Pen and Touch” check “Touchscreen as Hand Tool” and “Pen disables Touch”. You might also check “Pressure Sensitivity”.
Click “Designate Touchscreen” and select NTRG0F01:00 1B96:0F01.

 

More issues?

Please tell me! I will try to fix them.

32 Replies to “Linux (Kubuntu) on Vaio Duo 13”

  1. Great tutorial, Thanks! One question, could you please send me and/or publish your setup of the efi boot partition? I seem to be unable to get GRUB to start on this machine, even though everything seems to be formatted/set up correctly.

    1. Hi,
      so you cannot boot to kubuntu? For me – after installing – grub was set up correctly.
      Please give more details what is not working.
      I have the laptop not here at the moment – I will have a look on this at the weekend for the boot partition.

  2. This is great news, do you have any plans to expand this into a full how-to install from a default windows install? Thanks.

    1. Hi,
      actually there is not much more to do than downloading the Image, put it on a USB Stick, move the partitions and install it with the GUI installer.

      I guess I can add these steps to the Post.

        1. I just added some installation steps to the article. Short:
          1. Download Kubuntu
          2. Make bootable USB Stick
          (3. Backup your Data)
          4. Boot from USB
          5. Select “Try Kubuntu”
          6. Resize partitions if needed (for dual boot)
          6.1 Install GParted
          6.2 Use it to shrink the Windows Partition
          7. Install Kubuntu via the Desktop Shortcut
          8. Reboot and do the other steps from the article (pen, WLAN, …) if you encounter any issues.

          1. Struggling to get Kubuntu to boot from USB. Laptop detects the UEFI USB and brings up grub menu offering me Kubuntu. When I select it I get the Kubuntu logo in the middle of the screen (sometimes pulsing) and then it never progresses further. I’m currently downloading Ubuntu 16.10 to try just in case something was changed in the Kubuntu installed/loader.

          2. When in the Grub Menu before pressing Enter press “e” to get to the boot options – you should search for “quiet splash” and remove it – this will show the log / console at boot and might help you to find issues

          3. adding acpi=off to the boot options appears to bypass the problem. Wonder whats causing it, I’ll see what I can tinker with in bios?

          4. Should the trackpad work? Do I need an external mouse? I dont see anything above so assume it should be working?

          5. Try updating the kernel to the newest available – the trackpad is connected via sdio and the correct driver is only available since a quite new release.
            But in general it should work “like a mouse” (Click and move should work). But gestures only work with a newer kernel.
            What does lsinput show you?

          6. lsinput says its not installed, i cant install it as no wifi detected, I cant install the wifi as youve described because Im getting permission denied when when using sudo.
            I think best next step is to wait for larger USB in post so I can create recovery media for the win10 install then get kubuntu actually installed on the ssd. Then try to get setup working rather than working from usb.

            Update: re acpi=off if you use noapic instead of acpi=off then the distro still boots but the laptop is still aware of your power buttons etc asking you to logoff etc. when pressed just a little quality of life improvement 🙂

            I’ll feedback again when I make some more progress, thanks for your help.

          7. As a workaround for Wifi: Use your (Android) Smartphone via USB and enable USB Tethering. This works out of the box.
            But it’s a good idea to first install and then try to fix issues since your changes will be lost anyway after reboot.

            Looking forward to hear from you again and I will try to install a chat plugin with Telegram integration 😉

  3. Couldn’t get the WiFi to work. When I running

    mount -t efivarfs none /sys/firmware/efi/efivars

    It says: mount: none is already mounted or /sys/…/efivars busy

    Skipping to

    cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcmfmac43241b4-sdio.txt

    /lib/firmware/brcm/brcmfmac43241b4-sdio.txt doesn’t exist but /lib/firmware/brcm/brcmfmac43241b4-sdio.bin does.

    any idea whats up??? kubuntu 16.10 (dual boot with windows 10)

          1. So just copy this and paste it to a file called “brcmfmac43241b4-sdio.txt” in /lib/firmware/brcm

            You can do this by using a GUI Editor or by using the “sudo cat … > …” redirect.

  4. Exact output is:

    devid=0x4374
    boardtype=0x5f0
    boardrev=0x1100
    boardflags=0x201
    boardflags2=0x800000
    macaddr=00:90:4c:c5:12:38
    sromrev=9
    xtalfreq=37400
    nocrc=1
    ag0=0x2
    ag1=0x2
    ag2=0xff
    ag3=0xff
    txchain=0x3
    rxchain=0x3
    aa2g=3
    aa5g=3
    ccode=XT
    regrev=15
    rssicorrnorm_core0=0x200a
    rssicorrnorm_core1=0x200a
    ledbh0=0xff
    ledbh1=0xff
    ledbh2=0xff
    ledbh3=0xff
    leddc=0xffff
    pa2gw0a0=0xFFD0
    pa2gw1a0=0x15B3
    pa2gw2a0=0xFEDA
    pa2gw0a1=0xFFC9
    pa2gw1a1=0x15B5
    pa2gw2a1=0xFED4
    maxp2ga0=74
    maxp2ga1=74
    maxp5ga0=72
    maxp5ga1=72
    maxp5gha0=72
    maxp5gha1=72
    maxp5gla0=72
    maxp5gla1=72
    pa0itssit=62
    pa1itssit=62
    antswctl2g=0x9
    antswctl5g=0xa
    antswitch=0x0
    subband5gver=0
    pa5gw0a0=0xFFC5
    pa5gw1a0=0x1305
    pa5gw2a0=0xFEEA
    pa5gw0a1=0xFFCA
    pa5gw1a1=0x1332
    pa5gw2a1=0xFEF9
    pa5glw0a0=0xFFCA
    pa5glw1a0=0x1382
    pa5glw2a0=0xFEEF
    pa5glw0a1=0xFFCB
    pa5glw1a1=0x135D
    pa5glw2a1=0xFEF6
    pa5ghw0a0=0xFFC6
    pa5ghw1a0=0x1312
    pa5ghw2a0=0xFEED
    pa5ghw0a1=0xFFCE
    pa5ghw1a1=0x1356
    pa5ghw2a1=0xFEF5
    extpagain2g=2
    extpagain5g=2
    pdetrange2g=2
    pdetrange5g=2
    triso2g=4
    triso5g=5
    tssipos2g=1
    tssipos5g=1
    cckbw202gpo=0x1111
    cckbw20ul2gpo=0x1111
    legofdmbw202gpo=0x44443333
    legofdmbw20ul2gpo=0x44443333
    mcsbw202gpo=0x77777333
    mcsbw20ul2gpo=0x77777333
    mcsbw402gpo=0x77777333
    mcs32po=0x5555
    leg40dup2gpo=0x2
    legofdmbw205glpo=0x22220000
    legofdmbw20ul5glpo=0x22220000
    legofdmbw205gmpo=0x22220000
    legofdmbw20ul5gmpo=0x22220000
    legofdmbw205ghpo=0x22220000
    legofdmbw20ul5ghpo=0x22220000
    mcsbw205glpo=0x77700000
    mcsbw20ul5glpo=0x77700000
    mcsbw405glpo=0x77700000
    mcsbw205gmpo=0x77700000
    mcsbw20ul5gmpo=0x77700000
    mcsbw405gmpo=0x77700000
    mcsbw205ghpo=0x77700000
    mcsbw20ul5ghpo=0x77700000
    mcsbw405ghpo=0x77700000
    itt2ga0=0x20
    itt5ga0=0x3e
    itt2ga1=0x20
    itt5ga1=0x3e
    tempthresh=120
    otpimagesize=232
    usbepnum=0x2
    muxenab=0x0
    noisecaloffset=14
    noisecaloffset5g=14
    sd_gpout=0
    sd_gpval=1
    sd_gpdc=0
    btc_mode=5

    1. Hi,
      my model (SVD1322C5E) has no GPS as far as I know.
      However, since my battery broke and Sony does not offer replacements, I had to get another notebook and stopped working on the Vaio Duo 13.

  5. Do you have any problems with suspend by any chance? I’ve been trying to figure out the problem for months. If I return from suspend, I get my screen to show a picture again, but can’t move my mouse or keyboard.

    Have you had any problems in that regard?

    Thank you for any help!
    Also, really appreciate the post!

    1. Hi,
      as far as I know this is related to xinput driver after kernel upgrade – I had a similar issue and as far as I remember I got the exact same problem my other Laptop as well.
      You can try to reinstall the input drivers:

      sudo apt-get install –reinstall xserver-xorg-input-all

      (Cf. https://itsfoss.com/keyboard-mouse-freeze-suspend/)

      However, if the problem is not solved by this you have to write some suspend and wakeup scripts.

      1. Thank you so much for replying! Can you recommend somewhere I can read up on the kind of scripts I would need to write?

  6. Hi, thank you for the great tutorial!
    On my device, bluetooth is not working . Does anyone know how to solve?
    I have the suspend problem aswell. Is there a solution yet?

Leave a Reply

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