[28648 views]

[]

[toggle ads]

Gentoo on Asus Zenbook UX31

Hardware features

After the thermal death of my Mac Book Pro I had to buy a new laptop. I chose this Asus Ultrabook because its hardware is superior to the Mac Book Air, especially the higher screen resolution. My Zenbook is precisely a 2012 UX31E: dmidecode, lspci, lsusb, /proc/bus/input/devices

Hardware issues

I really like its design. It's small, light and the metal gives it a high quality look. But don't let the look fool you.

Though the design of the Zenbook is really neat, it has serious hardware quality issues. I had to send in my model four times for repairs now, within the first 6 months after I bought it. It's a bit much, isn't it.

First the LCD panel died. It just wouldn't display anything anymore. They replaced the panel and the main board.

It happened to me, and there are numerous reports around the Inter Webs as well: some UX31 can enter a sort of dead state. They just won't boot. The symptoms can vary: it powers up and immediately turns off again, it powers up but screen stays black with only the power, caps lock and wifi lights on or it doesn't power up at all. Symptoms can change depending on remaining battery life and depending on whether power is plugged in or not.

You need to drain the battery completely in order to make it boot up again. You can connect an USB device to the powered USB port to help draining the battery (given there actually is power on the USB port). It takes hours. But after that it will be back to life, until it happens again.

I guess this is due to a bad component (capacitor, Zener diod) on the main board somewhere. Probably a batch of flaky components made it into the production chain, given there are so many people with this problem. In any case you should send your Zenbook in for repair (RMA) if it exhibits this problem, before the warranty runs out.

Once it came back from repair with broken RAM chips. I noticed when gcc suddenly died with memory corruption errors. Running memtest86+ revealed the bad chips.

Finally the charger connector was loose. It would heat up so much during charging that eventually the plastic inside the metal connector melted and deformed.

And that is just the bad components that actually broke during normal operations. The Zenbook however has issues with its hardware components even when they are not broken:

The LCD screen is just horrible: it has massive backlight bleeding which becomes very apparent under even small angles. It's near to impossible to look at the monitor and not have bleeding or false colors. Image editing: impossible!

The keyboard is bad: keys don't work if you don't hit them dead center. It's very annyoing when you type a lot.

Booting

Hold down F2 during boot to enter the BIOS. BIOS supports firmware upgrade directly from USB stick - no OS necessary. Note however, that you can not downgrade itself, only upgrade! So this is a one-way road! Do not upgrade unless you want to address a specific issue. Put the System Rescue CD on an USB stick and boot from it (through BIOS). The Gentoo minimal CD won't work because of missing wireless drivers. Perform a Gentoo installation as usual.

Partitioning, Filesystem

The choice of filesystem was easy: ext4 is still the fastest in most cases

I erased all existing partitions and created a single partition with an ext4 filesystem. No swap, there is plenty of RAM. Make sure to mount ext4 with the discard option as we are running on an SSD:

/dev/sda1               /               ext4            noatime,discard

Kernel

I got a 3.7 kernel out of git. Here is my kernel config for x86_64.

I got a 3.6 kernel out of git. Here is my kernel config for x86_64.

I got a 3.5 kernel out of git. Here is my kernel config for x86_64.

I got a 3.4 kernel out of git. Here is my kernel config for x86_64. It produces the this dmesg output.

Grub is used as a boot manager. /boot/grub/grub.conf:

default 0
timeout 3

title Linux 3.6
root (hd0,0)
kernel /boot/linux-3.6.1 libahci.ignore_sss=1 root=/dev/sda1 rootfstype=ext4 video=1600x900 pcie_aspm=force quiet

Portage

/etc/make.conf:
CFLAGS="-march=native -O2 -pipe"
USE="aio autoipd avahi bacula-nodir cleartype corefonts ddate fat fontconfig
     g3dvl gimp git gudev hpn icu idn jce kvm laptop lm_sensors logrotate
     mdnsresponder-compat mmx msn netlink network-cron networkmanager ntp raw
     smp sna sse sse2 sse4_1 ssse3 timezone urandom v4l vaapi wifi xa xvmc
     zeroconf zip -R -acl -bluray -cdda -cddb -cdr -cracklib -dvd -eds -gdbm
     -gles -joystick -kerberos -ldap -nowlistening -oss -ppp -pulseaudio
     -semantic-desktop"
INPUT_DEVICES="evdev mouse keyboard synaptics"
VIDEO_CARDS="intel i965"
You need to keyword more recent Intel graphics drivers. The stable ones as of this writing are too old and cause artifacts in KDE (popup menus not drawn properly, background image not drawn). /etc/portage/package.keywords:
=x11-drivers/xf86-video-intel-2.19.0
=x11-libs/libdrm-2.4.33

Useful software

The following ebuild are useful on this device:

RF Kill

To put the RF Kill switch (Fn-F2) into a consistent state at boot, include the following init script:

/etc/init.d/rfkill

#!/sbin/runscript

depend() {
        after coldplug
        before net bluetooth
}

start() {
        ebegin "Unblocking RF"
        rfkill unblock all
        eend $?
}

stop() {
        return 0
}

Xorg

Xorg starts up perfectly without any configuration. However, there are things to improve by putting config files in /etc/X11/xorg.conf.d

Fonts

Tell Xorg about your installed fonts with /etc/X11/xorg.conf.d/00-fonts.conf. Without that Google Earth for instance will not display any fonts.

Touchpad

The Elantech touchpad works as a mouse out of the box. That's bad because you can't click and drag. You need to keyword at least xf86-input-synaptics-1.5.0 to use it with the synaptics driver, and CONFIG_MOUSE_PS2_ELANTECH in your kernel config. Configure the touchpad via xinput at runtime or in /etc/X11/xorg.conf.d/10-touchpad.conf.

Suspend

According to some Ubuntu guys you need to switch off USB during suspend or you risk corruption of your memory controller (which needs disassembly of the Zenbook to resolve!). Fixed as of kernel 3.2.17, and an even better fix is in 3.4.5 and 3.5-rc7. For earlier kernels include this script into /etc/pm/sleep.d:
EHCI_BUSES="0000:00:1a.0 0000:00:1d.0"
case "${1}" in
        hibernate|suspend)
                for bus in ${EHCI_BUSES}; do
                        echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/unbind
                done
                ;;
        resume|thaw)
                for bus in ${EHCI_BUSES}; do
                        echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/bind
                done
                ;;
esac
My zenbook doesn't actually have the 0000:00:1a.0 bus, but it doesn't hurt to keep it.

Save some power

The enable-devpm script implements the power savings. Put it in your startup scripts like /etc/local.d/10-devpm.start. The much suggested pcie_aspm=force kernel option does not make a big difference. You can safely leave it away. By default the GPU uses "only" the C6 sleep level. If you want to enable C6p and C6pp, then add 'i915.i915_enable_rc6=7' to your kernel command line, but this may exhibit random shutdowns. As Chris Wilson has put it: "only rc6=1 is supported by your hw, and even that is a bit broken on some machines" My Zenbook uses about 7 W when idle, and 26 W when at 100% CPU (compiling). Use the latest (keyword!) powertop to inspect your power consumption.

Data transfer

To copy over the data from my broken Mac, I connected the two with an Ethernet cable, set up static IPs, mounted the home directory via NFS and used rsync to copy everything. This procedure is fast and preserves permissions.