Saturday, January 11, 2014

Xubuntu on Lenovo Ideapd Z510

Introduction

My wife gifted me a Lenovo Ideapad Z510 for Christmas :-) The laptop has great specifications:
  • Intel(R) Core(TM) i7-4700MQ CPU
  • Integrated Intel(R) HD Graphics 4600
  • 8 GB RAM (I intend to increase this to 16 GB)
  • 1 TB Hard Drive
  • 1920x1080 screen resolution
  • AccuType back-lit keyboard
  • Bluetooth
  • VGA + HDMI out
  • JBL Speakers
  • DVD RW Drive
I usually run Linux on my laptop for my various hobby projects. I installed Xubuntu 13.10 on this laptop with a few tweaks which I want to share with other folks who have been exploring installing Xubuntu (or Ubuntu) on their Ideapads. This information is not a tutorial but lists tweaks and caveats for folks who are familiar with Linux installation steps.

LiveCD

Xubuntu 13.10 boots fine on Ideapad except when X starts you get a blank screen. The reason is the backlight of the screen is turned off for some reason. You can turn it on by increasing the screen brightness by pressing Fn+F12 a few times. Also make sure that Linux has booted in EFI mode by checking that /sys/firmware/efi does exist. If not then check that BIOS has EFI turned on.

Partitions

Make sure gparted has detected the partition as GPT type. If you are not planning to store lots of data on Windows then you can shrink the primary Windows partition labeled as Windows8_OS using gparted to a smaller size like 300 GB. The hard disk comes with many other partitions for windows use which I did not change. I created the usual swap, home and root partitions for Linux. Here is the output of blkid command after partitioning:

/dev/sda1: LABEL="WINRE_DRV" UUID="1E6E08E66E08B893" TYPE="ntfs"
/dev/sda2: LABEL="SYSTEM_DRV" UUID="D60B-686A" TYPE="vfat"
/dev/sda3: LABEL="LRS_ESP" UUID="560B-B719" TYPE="vfat"
/dev/sda5: LABEL="Windows8_OS" UUID="5A560F07560EE39B" TYPE="ntfs"
/dev/sda6: LABEL="NO_LABEL" UUID="DEDC67F9DC67CA7B" TYPE="ntfs"
/dev/sda7: UUID="3cefbe49-3512-4949-919e-0f474d8e7164" TYPE="swap" LABEL="SWAP"
/dev/sda8: LABEL="ROOT" UUID="665aa505-9dae-47fc-885e-a17ad78563aa" TYPE="ext4"
/dev/sda9: LABEL="HOME" UUID="30fc2cad-1abc-4a0a-bd1e-a402a1fa2636" TYPE="ext4"
/dev/sda10: LABEL="ROOT2" UUID="751076e8-41ea-4f43-951c-1799bfa40199" TYPE="ext4"
/dev/sda11: LABEL="LENOVO" UUID="5AC81599C815748B" TYPE="ntfs"
/dev/sda12: LABEL="PBR_DRV" UUID="36B61179B6113AB7" TYPE="ntfs"

Wireless

Wireless will not work in default installation. Z510 has Broadcom BCM43142  which the standard Linux kernel does not seem to support yet. I had to install the DKMS package, bcmwl-kernel-source from the Ubuntu repository to get the wireless to work. This will taint the kernel though.

Bluetooth

The laptop has a built-in Broadcom BCM43142A0 Bluetooth adapter. It is connected to an internal USB port. The vendor/product Id revealed by lsub command is 105b:e065. This Bluetooth adapter requires the correct firmware otherwise you get a flaky behavior. The Linux version of the firmware can be built from the Windows firmware file. Download the hex2hcd tool from https://github.com/jessesung/hex2hcd. The windows firmware for this adapter is here -- C:\Windows\System32\drivers/BCM43142A0_001.001.011.0161.0172.hex. Copy this file to your Linux partition and run:

hex2hcd BCM43142A0_001.001.011.0161.0172.hex fw-105b_e065.hcd

Note that the name of the generated firmware should match the vendor/product Id obtained by lsusb. Copy the generated firmware file, fw-105b_e065.hcd to /lib/firmware. Unload and then reload the kernel module btusb. If this does not work then reboot the laptop.

Display

When X display manger starts, the screen would turn dark because the screen brightness gets reset to zero for some unknown reason. To workaround this problem, add the following to your /etc/rc.local:

echo 50 > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness

Touchpad

The laptop has ALPS GlidePoint touchpad which incorrectly gets recognized as a generic PS/2 mouse. The latest Linux kernel does not support this revision of hardware but a patch exists and was discussed here-- http://askubuntu.com/questions/398568/ubuntu-13-10-touchpad-drivers-not-working-synaptics-not-loaded-lenovo-ideapad/417518#417518

Just follow the steps in the weblink and ALPS GlidePoint would start working.

Suspend/Resume

Suspend is fine but resume occasionally has issues. Sometimes, the laptop would re-suspend itself immediately after resume and sometimes it would hang after resume. I haven't investigated this yet. 

Conclusion

Ideapad Z510 makes a great laptop both as a Linux based development and as a entertainment platform. The built-in Intel GPU supports OpenGL 3.0 on Linux and runs openarena well. The feel of the keyboard is excellent. I specially love the full arrow keys which are handy if you are using an editor like emacs.

4 comments:

Polly Deniz said...

Where did you buy the 1080p screen variant i was told that the model is not launched in india

Sonal Santan said...

@Polly Deniz: I bought this from Lenovo's US website.

Christian De Propris said...

please can you help me with bluetooth because I have a problem 1 day it's ok and the day after don't run it's broken. can you write me step by step what can I do? i'm not very professional ubuntu user

Rick Amaya said...

I also have this laptop and I can't get the bluetooth to work. The only difference is that I do not have Ubuntu. I am running Mint 18. Is your solution specific to Ubuntu?

I opened a thread in the Mint forum
https://forums.linuxmint.com/viewtopic.php?f=49&t=226773
but no help has been offered yet. Any help you can provide will be extremely appreciated. Thank you.