16.04 on a zenbook


Okay. I spent a few days trying to improve hardware support in linux of a Zenbook. It's still a work in progress as several things don't work, but this page intends to show you the state of affairs right now and how to get there.

I've noticed that your mileage might vary. A lot. Some things work for people out of the box, others don't. I can only show you my pains and how I solved or ignored them.

I've logged my research trying to get stuff to work: Attempt 1 and attempt 2. Below are the conclusions but I'm leaving my notes up, maybe they'll help somebody else's exploration. Or catch keyword searches for people trying to install xubuntu 16 on a zenbook.

My version is the Asus Zenbook UX501VW-FJ024T. It is:

- 15" UHD (4k) touch screen
- 16G RAM
- 512GB SSD
- Elan touch pad
- Weighs about 2 kg
- About 5h or 6h battery while developing (ymmv) on xubuntu 15.10, kernel 4.3
- Not sure what else is relevant here.

Note! My first successful attempt was after updating the bios to version 300 (through the bios flasher in windows). Don't know if that was a requirement but it's how I ended. I also installed with secure boot disabled (mine was with a botched attempt to install nvidia from linux...). Also unsure if that's required but you'll need to disable it anyways when installing nvidia, and maybe other things as well.

Note that you get to the bios boot selection by pressing and/or holding escape when the initial ASUS boot screen is shown.

When I install (or "try") 16.04 on this zenbook through usb, the boot process freezes early. To fix this you need to update some grub params before booting. This is fairly easy:

When in the grub menu (the one where you pick "Try Xubuntu 16.04" or "Install 16.04" or bla at boot) press the arrow keys to move to the install. Don't press return but instead press e. This opens you in an editor where you can edit the grub parameters.

Look for GRUB_CMDLINE_LINUX_DEFAULT. It probably has quiet splash. Remove those two keywords (they suppress logging and hide it under a splash screen) and instead put i951.preliminary_hw_support=1 nogpumanager there. Then press F10 to boot with those params. This was all I needed to get to the installer.

There's a catch: it doesn't always work. About 1 in 5 or 10 attempts got me to the UI. Other times I get stuck in a "a job for cd installer blabla" dead end loop. When it happens just reboot (hard) and repeat the steps. Eventually it should work. Unfortunately that's all I can say about that.

Install as you normally would. I've included home drive encryption and third party code. My zenbook had secure boot disabled at this point so if all these steps fail, you may need to somehow do this as well. Ugh.

After the installer completes reboot into the new installer. But DONT FORGET to repeat the grub steps above. Except you don't need the nogpumanager anymore. That was just to get the installer to work.

In my case I initially got booted to a tty1, instead of X. I continued to apt-get update and apt-get upgrade -y, so this may be required. I can't tell for sure.

Also update grub permanently;

sudo nano /etc/default/grub
// replace the "quiet splash" line with
// GRUB_CMDLINE_LINUX_DEFAULT="i951.preliminary_hw_support=1 acpi_osi= acpi_backlight=native"
// this also fixes the backlight keys, hurray
sudo update-grub

Don't forget the grub update or you'll be stuck at boot again.

When rebooting you won't need to worry about grub anymore. Yay!

In xubuntu go to settings - display and set the resolution to HD (1920x1080) so you can read stuff. I couldn't get 4k (HiDpi) to work properly and it looks like support is pretty much shit for that, right now.

To get nvidia to work go to settings - additional drivers. But FIRST go to the first tab of that menu ("ubuntu software") and select "main server" from the drop down. Then CLOSE the popup so you can update the list. This may not be a required step for you, but if nvidia drivers refuse to install it could be. It was for me. Open additional drivers again. Select nvidia of your choice and apply. Also select the microcode firmware as I think it fixes some cpu hitches. Reboot may be needed to flush the drivers (dunno).

You'll know the drivers are working when glxgears from cli reports a number in the 16k range, instead of 60fps. Note that nvidia currently doesn't appear to support kernels 4.6 and higher so 4.5.7 seems to be the best we can do here? If it makes a difference, I don't see improved support in the newer kernels up to 4.8rc4 (but again, there are different reports there so ymmv).

With the resolution change you may want to change your cursor. I believe simply running theme configurator and forcing it to update will also fix the mouse cursor size. Sometimes a reboot still pops it back to huge mode but another reboot usually fixes that. *shrug*

So what works. Current state of affairs:

- nvidia: works with above steps (glxgears reports 16k fps, if you get 60 fps you're on crap drivers).
- touch screen: works out of the box
- touch pad: partially works. It's recognized as a regular mouse so you can click, right-click, and drag. You can't do multi-touch or gestures. Relevant bug to track
- fn keys:
- suspend (f1): works after configuring it properly in settings (enable the suspend key) with a small delay, no visual cue when pressing the key
- flight mode (f2): works I'm not sure if this was in 16.04 out of the box or after certain changes I've done (sorry..) but the key works properly for me at the moment without explicitly doing anything about it. It toggles wifi and bluetooth. Even the button light seems to properly go off when flight mode is active (kind of confusing but okay). There's no visual cue when pressing the key :(
- keyboard backlit up/down (f3/f4): works out of the box
- screen backlit up/down (f5/f6): works but require the grub kernel params (see above)
- screen toggle (f7): NOT WORKING, weird because many people report it working :( not vital to me. (maybe it's only a presentation mode thing?)
- screen extending (f8): works (opens display settings, I believe that's by design)
- touch pad toggle (f9): not working BUT the touchpad is currently not detected as a touch pad (but a mouse) so that may be the reason... TBD once the touch pad properly works
- mute + sound up/down (f10/f11/f12): works out of the box
- other fn keys (calc, home/end/ins/etc): all the other keys seem to work out of the box. Not sure about media keys as I don't use them. If only the arrow keys were fn keys for pgup/pgdn/home/end...
- sd card reader: apparently this doesn't work yet though I've not needed a card reader in a while so it's not vital to me either way.

Mmmmmm I think that's it for crucial parts. I've used exclusively intensively it on a business trip and only had some trouble pairing a bluetooth device. That wasn't a hardware problem, though. That's just (x)ubuntu's due to faulty (x)ubuntu bluetooth UI controls.

I'll try to keep this up to date if I figure out something new but for now I'm going to suspend further research into support. I hope the trackpad touch gets fixed as for me that's probably the biggest thing left. And it's probably just a driver away, maybe even a config value in the right place... Fingers crossed!