Tweaking ASUS Zenbook UX305CA on Linux

Lately I was searching for mobile notebook that I could use for remote work. I checked f ThinkPad series but they were huge bricks that have nothing in common with ‘mobile’ word. Then I saw ASUS Zenbook that I didn’t take into account before and it was exactly what I was searching for.

Configuration of Skylake based notebook right now is not straightforward – there are still glitches and small bugs that are waiting to be fixed. I want to sum up what I’ve done after installation. I started with fresh Ubuntu 16.04 to get Debian based distro with possibly latest kernel and patches.

Some SSD tweaks

Change mount options for filesystems on SSD from:

/dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1


/dev/mapper/ubuntu--vg-root / ext4 discard,noatime,errors=remount-ro 0 1

And move /tmp to RAM with this additional line in /etc/fstab:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

Now add deadline scheduler for root disk – edit /etc/rc.local and add this line before exit 0:

echo deadline > /sys/block/sda/queue/scheduler
echo 1 > /sys/block/sda/queue/iosched/fifo_batch

I have configured swap but I don’t want to use it too much and setting low swappines sysctl option will help. Run this as root:

echo "vm.swappiness = 1" > /etc/sysctl.d/90-swappines.conf
sysctl -p /etc/sysctl.d/90-swappines.conf

Power usage tweaks

I’ve installed laptop-mode-tools to achieve lower power usage on battery. So:

apt-get install -y laptop-mode-tools

By default it’s cutting hard CPU performance on battery (half performance, no turbo) so I fixed this by changing /etc/laptop-mode/conf.d/intel_pstate.conf section On battery:

#On battery
BATT_INTEL_PSTATE_PERF_MIN_PCT=0 # Minimum performance, in percent
BATT_INTEL_PSTATE_PERF_MAX_PCT=100 # Maximum performance, in percent
BATT_INTEL_PSTATE_NO_TURBO=0 # Disable "Turbo Boost"?

Laptop mode tools won’t start automatically so we may integrate them with pm-utils (that are already installed on Ubuntu) to get it running when needed. We have to create new config file:

sudo touch /etc/pm/sleep.d/10-laptop-mode-tools
sudo chmod a+x /etc/pm/sleep.d/10-laptop-mode-tools

with content like this:

case $1 in
        /etc/init.d/laptop-mode stop
        /etc/init.d/laptop-mode stop
        /etc/init.d/laptop-mode start
        /etc/init.d/laptop-mode start
        echo Something is not right.

Now I will enable ALPM for SATA in AHCI mode optimizations:

echo SATA_ALPM_ENABLE=true | sudo tee /etc/pm/config.d/sata_alpm

And some kernel parameters in /etc/default/grub:


(config with additional drm.vblankoffdelay=1 i915.semaphores=1 worked for me on Ubuntu 16.04 but on 16.10 caused system stability problems so I don’t recommend it now)

After changes update grub with:


You may use powertop to nail power heavy processes. There is also powerstat to benchmark power usage through time – I have:

sudo pm-powersave true


System: 4.49 Watts on average with standard deviation 0.46 

It’s really nice. I should be able to run about 8~9h! Sweet!


Disable touchpad when writing

It’s crazy annoying when you tap touchpad during writing text and lose focus on editor window. There is solution for that, it’s even installed by default on Ubuntu and it’s called: syndaemon. It’s started by default like this:

syndaemon -i 1.0 -t -K -R

1 second feels too small for me. I will adjust it to 2s. There is no easy way to do this. I created script to run on login:

killall syndaemon
syndaemon -d -i 2.0 -t -K -R

Now better 🙂


I installed vdpauinfo tool to see if it’s working:

apt-get install -y vdpauinfo

It wasn’t:

# vdpauinfo 
display: :0   screen: 0
Failed to open VDPAU backend cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

I checked this library and couldn’t find it – it wasn’t installed. Easy fix:

apt-get install -y libvdpau-va-gl1

Check again:

# vdpauinfo 
display: :0   screen: 0
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
API version: 1
Information string: OpenGL/VAAPI/libswscale backend for VDPAU

Video surface:

name   width height types
420     1920  1080  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
422     1920  1080  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
444     1920  1080  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 

Decoder capabilities:

name                        level macbs width height
MPEG1                          --- not supported ---
MPEG2_SIMPLE                   --- not supported ---
MPEG2_MAIN                     --- not supported ---
H264_BASELINE                  51 16384  2048  2048
H264_MAIN                      51 16384  2048  2048
H264_HIGH                      51 16384  2048  2048
VC1_SIMPLE                     --- not supported ---
VC1_MAIN                       --- not supported ---
VC1_ADVANCED                   --- not supported ---
MPEG4_PART2_SP                 --- not supported ---
MPEG4_PART2_ASP                --- not supported ---
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE      51 16384  2048  2048
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

Output surface:

name              width height nat types
B8G8R8A8          8192  8192    y  
R8G8B8A8          8192  8192    y  
R10G10B10A2       8192  8192    y  
B10G10R10A2       8192  8192    y  
A8                8192  8192    y  

Bitmap surface:

name              width height
B8G8R8A8          8192  8192
R8G8B8A8          8192  8192
R10G10B10A2       8192  8192
B10G10R10A2       8192  8192
A8                8192  8192

Video mixer:

feature name                    sup
INVERSE_TELECINE                 -
NOISE_REDUCTION                  -
SHARPNESS                        -
LUMA_KEY                         -

parameter name                  sup      min      max
VIDEO_SURFACE_WIDTH              -  
VIDEO_SURFACE_HEIGHT             -  
CHROMA_TYPE                      -  
LAYERS                           -  

attribute name                  sup      min      max
BACKGROUND_COLOR                 -  
CSC_MATRIX                       -  
SHARPNESS_LEVEL                  -  
LUMA_KEY_MIN_LUMA                -  
LUMA_KEY_MAX_LUMA                -

Looks better now… But not impressive, there’s only H264 support.

I’ve tried it in VLC but it was crashing from time to time the whole VLC (leaving it running in background). Time to test VA-API 🙂


Like earlier I have to install one tool to see what we have: vainfo

apt-get install -y vainfo

Checking what we have on system:

$ vainfo 
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.7.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      :	VAEntrypointVLD
      VAProfileH264MultiviewHigh      :	VAEntrypointEncSlice
      VAProfileH264StereoHigh         :	VAEntrypointVLD
      VAProfileH264StereoHigh         :	VAEntrypointEncSlice
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice

It requires package i965-va-driver to work but on my system it was instal(ed (probably during VDPAU installation as dependency).

It was working almost fine… In VLC on my machine VA-API on X11 was drawing through all desktops. VA-API DRM was working better… But crashed my X11 server after few minutes of watching ;/


You may thing: for what the hell you need OpenCL on such tiny machine? I doesn’t care – I want it 🙂

First install clinfo package:

apt-get install -y clinfo

And run it:

# clinfo 
Number of platforms                               0

Not too much 😀

For Intel GPU/CPU OpenCL support we will need beignet package:

apt-get install -y beignet

# clinfo 
Number of platforms                               1
  Platform Name                                   Intel Gen OCL Driver
  Platform Vendor                                 Intel
  Platform Version                                OpenCL 1.2 beignet 1.1.1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_spir cl_khr_icd
  Platform Extensions function suffix             Intel

  Platform Name                                   Intel Gen OCL Driver
Number of devices                                 1
  Device Name                                     Intel(R) HD Graphics Skylake ULX GT2
  Device Vendor                                   Intel
  Device Vendor ID                                0x8086
  Device Version                                  OpenCL 1.2 beignet 1.1.1
  Driver Version                                  1.1.1
  Device OpenCL C Version                         OpenCL C 1.2 beignet 1.1.1
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Max compute units                               24
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None, None, None
  Max work item dimensions                        3
  Max work item sizes                             512x512x512
  Max work group size                             512
  Preferred work group size multiple              16
  Preferred / native vector sizes                 
    char                                                16 / 8       
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 0 / 8        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               0 / 2        (n/a)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (n/a)
  Address bits                                    32, Little-Endian
  Global memory size                              2147483648 (2GiB)
  Error Correction support                        No
  Max memory allocation                           1073741824 (1024MiB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        8192
  Global Memory cache line                        64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             8192x8192 pixels
    Max 3D image size                             8192x8192x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Global
  Local memory size                               65536 (64KiB)
  Max constant buffer size                        134217728 (128MiB)
  Max number of constant args                     8
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      80ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            Yes
    SPIR versions                                 
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                __cl_copy_region_align4;__cl_copy_region_align16;__cl_cpy_region_unalign_same_offset;__cl_copy_region_unalign_dst_offset;__cl_copy_region_unalign_src_offset;__cl_copy_buffer_rect;__cl_copy_image_1d_to_1d;__cl_copy_image_2d_to_2d;__cl_copy_image_3d_to_2d;__cl_copy_image_2d_to_3d;__cl_copy_image_3d_to_3d;__cl_copy_image_2d_to_buffer;__cl_copy_image_3d_to_buffer;__cl_copy_buffer_to_image_2d;__cl_copy_buffer_to_image_3d;__cl_fill_region_unalign;__cl_fill_region_align2;__cl_fill_region_align4;__cl_fill_region_align8_2;__cl_fill_region_align8_4;__cl_fill_region_align8_8;__cl_fill_region_align8_16;__cl_fill_region_align128;__cl_fill_image_1d;__cl_fill_image_1d_array;__cl_fill_image_2d;__cl_fill_image_2d_array;__cl_fill_image_3d;
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_spir cl_khr_icd

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Intel Gen OCL Driver
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [Intel]
  clCreateContext(NULL, ...) [default]            Success [Intel]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Intel Gen OCL Driver
    Device Name                                   Intel(R) HD Graphics Skylake ULX GT2
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Intel Gen OCL Driver
    Device Name                                   Intel(R) HD Graphics Skylake ULX GT2

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.8
  ICD loader Profile                              OpenCL 1.2
	NOTE:	your OpenCL library declares to support OpenCL 1.2,
		but it seems to support up to OpenCL 2.1 too.


Suspend/Hibernate on lid close

Default configuration of Ubuntu 16.04 was that after I close lid screen was blocked and LCD disabled. But system was still working normally – I strongly prefer to hibernate in such case and use no battery at all.

I achieved that with systemd-logind. Edit /etc/systemd/logind.conf and uncomment line with HandleLidSwitch:


Now restart systemd-logind service with:

systemctl restart systemd-logind.service 

Problem with function keys

Function keys were mostly working but not always like I expected. For example when I disable touchpad – it’s not disabled 🙂

I found that module asus-nb-wmi is responssible for that and it’s still buggy. So I disabled it at all with:

echo "blacklist asus-nb-wmi" > /etc/modprobe.d/blacklist-ux305.conf

Volume UP/DOWN/MUTE are still working fine – that’s enough for me. Rest could be configured with some keyboard shortcuts – more info here.


I still face some bugs:

  • I could see occasional flickering from time to time. Rather after running notebook for some time than overheating/overloading it. This may be driver issue or maybe SNA acceleration method – I have to experiment a little to get this solved.
    Looks like disabling Virtualization support and VT-d in BIOS helped. It’s not final solution but for now I don’t need it… A lot 😉
  • Tapping sometimes behave strange, for ex. tap to click stops to work and I have to use touchpad buttons for that. I think this may be related to syndaemon configuration because it started after I tuned it.
    It was that. My hack for syndaemon broke touchpad. I will play with this a little more later.
  • I like to use copy by selection and paste by middle click on my desktop – I’m addicted to this option but it’s not working on my laptop. I’m not sure if this will be convenient enough on touchpad to use.
    To right click just tap with two fingers, to middle click (third button) tap with three fingers. Copy/paste is again easy like before.

If you found errors in my text of know better solutions for described problems, please tell in comments.

18 thoughts on “Tweaking ASUS Zenbook UX305CA on Linux”

  1. Bonjour / Hi.

    And thanks for the help! I just tried most of your receipes under Debian8, and it seems to work fine.
    Just to warn you of a small error in the /etc/pm/sleep.d/10-laptop-mode-tools example file above : there shall be no “d” after

    Bonne journée.

  2. Hi,

    Thanks for the great post — I’ve precisely bought the very same laptop, so I’m all eyes 🙂

    It seems that noatime is the default starting with kernel 2.6.30, so it’s probably not required there (though not harmful either).

    Best regards

    1. I thought it’s relatime the default option as it’s more consistent (updating atime when mtime change) – it sounds reasonable but I don’t know real programs that rely on atime value (except some mail servers – so not a notebook case).Then I always prefer to use noatime.

  3. Hello.
    Could you please run phoronix test suite and benchmark the system and disk performance please? I have an Asus S301LA (upgraded with an SSD) and I am not sure it is worth upgrading to UX205CA. But on my current notebook the display is way too bad (reflective and low brightness).
    Thank you.

    1. Hi, thanks for interest but for now I don’t have enough time to play with benchmarks. I bought this laptop as mobile shell/terminal so performance was not an important point for me. About screen I have to agree that it’s worst part of this lap. But still it’s quite competitive in that price.

  4. Hi, wonder if the machine will get too hot to use on the lap? And do you get the Full HD / QHD+? I wonder how HiDPI is supported?

    1. My Core M CPU have only 4W power usage on full load – so you could feel it warmer when using on the lap, but it’s far from being hot.
      I don’t have QHD+ screen, because didn’t wanted it. Full HD is good enough on such small screen. I even have to manually run few programs in bigger aspect ratio (about 1.3) to have better visibility on such small screen (chrome especially).

    2. Hi,

      My friend an I both have a UX305CA-DQ091T (that is, m5-6Y54 + QHD+).

      Mine doesn’t get very hot with ArchLinux + awesomeWM + heavy Firefox web browsing of light HTML + Emacs + dozens of shells (what I use most of the time), but I still put the laptop sleeve under the laptop itself to avoid the inconvenient heat.

      Hers, however, with Kubuntu or Windows 10 and heavy javascript-intensive Firefox web browsing (Outlook, Google Docs…) + LibreOffice, gets hot enough that we feel the need to put it on a cooler (in our case the Cooler Master NotePal U Stand Mini does a great job) — remember it’s a fanless laptop. You’d not want to use it on the lap without some isolation.

      QHD+ is great but I’m not sure FHD would have been significantly less enjoyable. There’s some setup (whatever the OS) to get everything properly sized (HiDPI looks rather well supported by recent Linux / KDE / Windows, but you often have to setup things manually in multiple places). Using both the QHD+ screen and an external “only” FHD monitor is not fun, though: on Linux, I haven’t yet managed to have stuff properly sized on both screens at the same time (can’t tell for Windows as I don’t use it personally).

      Best regards

    3. Much better reply than mine 🙂
      I have weaker CPU – M3-6Y30 so this might by a reason why I don’t feel it hot. Most of the time I use Chrome with dozens of tabs open (Inbox, WhatsApp, Keep, etc), few Github Atom editors open (NodeJS based), few terminal windows (Terminator), sometimes Thunderbird and Spotify. I could work with this app stack for almost 10h.
      In my opinion most heat is produced during playback of FullHD video (YouTube, Twitch, MPV).

  5. Hello and thanks for the post,

    after using it for a while, can you tell how long the battery last on average?

    Right now I am using a thinkpad x230t, on Ubunto 16.04 it doesn’t run under 12W, even with basically no brightness, and the 6-cells battery last less than 2 hours (5 hours on win7).

    Also the i5 is costantly at 58C, despite being idle and fan at 3500 rpm.

    So I was wondering how this behave.

    Thank you.

    1. I’m really satisfied with battery time in that Asus laptop. One day I was working remotely – chrome/mail/few atom instances/few terminals/spotify (most of apps have dark colors) – for about 9h and after that time I still had 15% of battery. Battery drains fastest during movie watching (FullHD) (it’s enough for about 3h). I didn’t test it on Windows – I deleted on first day.

    2. I concur with Timor. Not the same usage in fact : I rarely use it for extended periods, mostly as a mobile always-on device in a backpack to be openend and instantly powered up whenever it is needed. In the bus for instance, with bluetooth and 4g access through a phone to browse, have emails, triage pictures. Most of the time it is suspended to RAM, I never stop it. I recharge it at most once a week : that is spectacular and really usefull : an always instantly on PC.
      A clue : mine goes with the m3-6Y30 very low power CPU (base TDP is 4,5W) : not all UX305CA use the same one.

  6. Another typo : there is no /etc/sysctl.conf.d/ on stock Ubuntu 16.04.

    So :
    echo “vm.swappiness = 1” > /etc/sysctl.conf.d/90-swappines.conf
    ought to be changed to
    echo “vm.swappiness = 1” > /etc/sysctl.d/90-swappines.conf

    And another remark : the out-of-the box behaviour regarding what happens when the lid gets closed is that it goes to suspend-to-RAM state (the LED is blinking after 2 seconds or so) and it lasts forever.
    No real need to change /etc/systemd/logind.conf : hibernate consumes the SSD.

    A last on : in France at least, Asus has accepted to refund the Windows licence, I got 50€.

    Best regards, thanks again.

    1. I don’t remember where I get this sysctl.conf.d – I fixed this in description.
      About suspend/hibernation – I use suspend right now but I played for a while with hibernation – it was more problematic so I stick witch default option. But it’s good to know where I could change this.

  7. Thank you for the post and discussion. I think the laptop would be perfect for me. I do not see any complains about Linux compatibility, so I assume all is working fine. Im going to buy this model. It would be perfect to have FOSS drivers there but this is only a dream nowadays. What is the wifi card there?
    I’m also tempted to buy zenbook ux410ua (i3 version). Do you know anything about it?

    1. Hi,

      sorry for late response but I wasn’t here for a while… My friend have i3 version (I don’t know exact model) and he’s satisfied too. Those notebooks are really good piece of hardware, only touchpad could be less hard – I have occasion to compare it to this from Mac and touchpad in Mac is perfect, but for half price you can’t get everything 🙂

Leave a Reply

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