Difference between revisions of "ASUS Zenbook Prime UX31A"

From ArchWiki
Jump to: navigation, search
(deleted some old stuff about the backlight keys)
m (Ambient Light Sensor (ALS): Links fix)
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:ASUS]]
 
[[Category:ASUS]]
 +
[[ja:ASUS Zenbook Prime UX31A]]
 
{{poor writing|reason=This should '''only''' have information specific to the hardware. Other content should not be duplicated here. Also avoid maintaining scripts and programs here.}}
 
{{poor writing|reason=This should '''only''' have information specific to the hardware. Other content should not be duplicated here. Also avoid maintaining scripts and programs here.}}
 
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.
 
This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.
Line 56: Line 57:
  
 
=== Screen backlight ===
 
=== Screen backlight ===
Screen backlight should work with any recent kernel (after 3.7). The brightness is managed via hardware (the brightness buttons don't send signals to the OS), so it should work across all DE's.
+
Screen backlight should work with any recent kernel (after 3.7). The brightness is managed via hardware, so it should work across all DE's.
  
 
=== Keyboard backlight ===
 
=== Keyboard backlight ===
Line 62: Line 63:
  
 
==== Manually setting the brightness ====
 
==== Manually setting the brightness ====
You can control the brightness of the keyboard backlight through the {{ic|brightness}} file in {{ic|/sys/class/leds/asus::kbd_backlight/}} or {{ic|/sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/}} by writing  a value to it. You can retrieve the maximum from {{ic|max_brightness}}:
+
The easiest way to change the keyboard brightness is to use the UPower D-Bus interface. This even works without root.
 +
 
 +
  # Get current brightness
 +
  dbus-send --type=method_call --print-reply=literal --system --dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness
 +
  # Set brightness to 2
 +
  dbus-send --type=method_call --print-reply=literal --system --dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:2
 +
 
 +
You can also control the brightness of the keyboard backlight through the {{ic|brightness}} file in {{ic|/sys/class/leds/asus::kbd_backlight/}} or {{ic|/sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/}} by writing  a value to it. This needs root. You can retrieve the maximum from {{ic|max_brightness}}:
  
 
{{hc|# get maximum brightness value
 
{{hc|# get maximum brightness value
Line 70: Line 78:
  
 
==== Using asus-kbd-backlight from AUR ====
 
==== Using asus-kbd-backlight from AUR ====
Install {{AUR|asus-kbd-backlight}} from AUR. To allow users to change the brightness, say:
+
{{AUR|asus-kbd-backlight}} from the AUR is a convenient way to manage the backlight brightness, if one doesn't want to use UPower. To allow users to change the brightness, write:
  
 
  # asus-kbd-backlight allowusers
 
  # asus-kbd-backlight allowusers
Line 90: Line 98:
 
  $ asus-kbd-backlight show
 
  $ asus-kbd-backlight show
  
And finally, add some convenient keyboard shortcuts [[Extra keyboard keys in Xorg|by the method of your choice]].
+
You can then set the XF86KbdBrightnessDown and XF86KbdBrightnessUp keys to the above functions. See [[Extra keyboard keys in Xorg]].
 
 
==== UPower Script ====
 
 
 
Upower allows control of the keyboard backlight as an ordinary user. Use of these scripts requires installation of [[D-Bus]], {{Pkg|upower}} and if you want the OSD notifications, [[libnotify]].
 
 
 
This script increases the keyboard brightness and provides onscreen notification of the current brightness:
 
 
 
#! /bin/bash
 
# get current keyboard brightness from UPower
 
current_state=$(dbus-send --type=method_call --print-reply=literal --system \
 
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)
 
# strip leading 9 characters "  int32 "
 
current_state=${current_state:9}
 
# get maximum keyboard brightness from UPower
 
max_brightness=$(dbus-send --type=method_call --print-reply=literal --system \
 
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness)
 
# strip leading 9 characters "  int32 "
 
max_brightness=${max_brightness:9}
 
# if the current keyboard brightness is less than max, increment brightness by one
 
if [ $current_state -lt $max_brightness ] ; then
 
dbus-send --type=method_call --print-reply=literal --system \
 
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \
 
int32:$((current_state+1))
 
notify-send "Keyboard brightness reset to $((current_state+1))"
 
else
 
# if the keyboard brightness is already at maximum, complain
 
notify-send "Keyboard brightness already at maximum"
 
fi
 
 
 
This script decreases the keyboard brightness and provides onscreen notification of the current brightness:
 
  
#! /bin/bash
 
# get current keyboard brightness from UPower
 
current_state=$(dbus-send --type=method_call --print-reply=literal --system \
 
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness)
 
# strip leading 9 characters "  int32 "
 
current_state=${current_state:9}
 
min_brightness=0
 
# if the current keyboard brightness is greater than zero, decrement brightness by one
 
if [ $current_state -gt $min_brightness ] ; then
 
dbus-send --type=method_call --print-reply=literal --system \
 
--dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness \
 
int32:$((current_state-1))
 
notify-send "Keyboard brightness reset to $((current_state-1))"
 
else
 
# if the keyboard brightness is already at zero, complain
 
notify-send "Keyboard brightness already at zero"
 
fi
 
 
==== Automatic Backlight Control ====
 
This C program will automatically turn off the backlight after a given idle time, and turn it on proportionally to the screen brightness. Written for Asus N56DP but will probably work here as well. Please email me if not. Note that you must run it as root, or if using some other user, give that user write permission to the backlight brightness file. This program works in plain tty mode as well as in X, but if you're using X you must start the X server first before starting this program, otherwise the X server will hang.
 
[[User:Hyc|Hyc]] ([[User talk:Hyc|talk]]) 13:24, 16 January 2013 (UTC)
 
/* Author: Howard Chu <hyc@symas.com> 2013-01-15
 
  *
 
  * monitor keyboard activity and toggle keyboard backlight
 
  * for Asus laptops. Tested on Asus N56DP.
 
  */
 
#include <sys/types.h>
 
#include <sys/stat.h>
 
#include <fcntl.h>
 
#include <poll.h>
 
 
static char dummybuf[8192];
 
 
/** @brief How many milliseconds before turning off kbd light */
 
#ifndef IDLE_MSEC
 
#define IDLE_MSEC 7000
 
#endif
 
 
int main(int argc, char *argv[])
 
{
 
struct pollfd pfd; // No recognized key
 
int rc, blfd, scfd;
 
int brt, timeout, prev = -1;
 
char bm[2] = "0\n";
 
 
scfd = open("/sys/class/backlight/acpi_video0/brightness", O_RDONLY);
 
blfd = open("/sys/class/leds/asus::kbd_backlight/brightness", O_WRONLY);
 
pfd.fd = open("/dev/input/by-path/platform-i8042-serio-0-event-kbd", O_RDONLY);
 
pfd.events = POLLIN;
 
 
timeout = IDLE_MSEC;
 
while (1) {
 
rc = poll(&pfd, 1, timeout);
 
/* Kbd brightness ranges from 0 to 3.
 
* Screen brightness ranges from 1 to 10.
 
* Make the keyboard brightness
 
* depend on the screen brightness.
 
*
 
* Assume 10 means working in a bright room.
 
* In that case, leave the kbd light off.
 
* map screen 1-9 to kbd 1-3.
 
*/
 
if (rc) {
 
/* got keyboard input, flush it all and
 
* wait for the next event. Also check
 
* the screen brightness and set the kbd
 
* backlight accordingly.
 
*/
 
read(pfd.fd, dummybuf, sizeof(dummybuf));
 
timeout = IDLE_MSEC;
 
read(scfd, dummybuf, sizeof(dummybuf));
 
lseek(scfd, 0, SEEK_SET);
 
brt = atoi(dummybuf);
 
if (brt == 10) {
 
brt = 0;
 
} else {
 
brt = (brt + 2) / 3;
 
}
 
} else {
 
/* once we've gotten a timeout, turn off
 
* kbd backlight and wait forever for
 
* the next keypress
 
*/
 
timeout = -1;
 
brt = 0;
 
}
 
if (brt == prev)
 
continue;
 
bm[0] = brt + '0';
 
write(blfd, bm, 2);
 
lseek(blfd, 0, SEEK_SET);
 
prev = brt;
 
}
 
}
 
 
==== Ambient Light Sensor (ALS) ====
 
==== Ambient Light Sensor (ALS) ====
 
The Zenbook has an ambient light sensor which enables adjustment of the keyboard and LCD backlights based on the light environment in which the Zenbook finds itself.
 
The Zenbook has an ambient light sensor which enables adjustment of the keyboard and LCD backlights based on the light environment in which the Zenbook finds itself.
The AUR contains packages to build the necessary kernel module and userspace programs to change keyboard and backlights and to turn the sensor on and off. The kernel module package is [https://aur.archlinux.org/packages/als-driver-git/ als-driver-git] and the userspace programs in [https://aur.archlinux.org/packages/als-controller-git/ als-controller-git].
+
The AUR contains packages to build the necessary kernel module and userspace programs to change keyboard and backlights and to turn the sensor on and off. The kernel module package is {{AUR|als-dkms}} and the userspace programs in {{AUR|als-controller}}.
 
===== ALS Driver =====
 
===== ALS Driver =====
 
The ALS driver is a module named {{ic|als}}. The resulting device is represented in sysfs in the directory {{ic|/sys/bus/acpi/devices/ACPI0008:00}}. The ambient light sensor is enabled by writing a "1" to the file {{ic|enable}}:
 
The ALS driver is a module named {{ic|als}}. The resulting device is represented in sysfs in the directory {{ic|/sys/bus/acpi/devices/ACPI0008:00}}. The ambient light sensor is enabled by writing a "1" to the file {{ic|enable}}:
Line 266: Line 150:
  
 
==Graphics==
 
==Graphics==
To use the Intel graphics card, install the xf86-video-intel package and read [[Intel graphics]]. For hardware accelerated video decoding read [[VA-API]].
+
To use the Intel graphics card, install the xf86-video-intel package and read [[Intel graphics]]. For hardware accelerated video read [[Hardware video acceleration]].
  
 
== Touchpad ==
 
== Touchpad ==
[[Touchpad_Synaptics#Buttonless_TouchPads_.28aka_ClickPads.29|Instructions to activate the right button]].
+
[[Touchpad Synaptics#Buttonless touchpads (aka ClickPads)|Instructions to activate the right button]].
 
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).
 
(As an alternative you cant try [http://ubuntuforums.org/showpost.php?p=12110689&postcount=73 This]).
  
Line 313: Line 197:
 
=== Disable Touchpad While Typing ===
 
=== Disable Touchpad While Typing ===
  
One of the criticisms this laptop gets (see reviews at Amazon) is that the placement of the touchpad results in frequent touchpad brushing during typing. You should use whatever touchpad disabling method you prefer. See [[Touchpad Synaptics#Disable trackpad while typing]].
+
One of the criticisms this laptop gets (see reviews at Amazon) is that the placement of the touchpad results in frequent touchpad brushing during typing. You should use whatever touchpad disabling method you prefer. See [[Touchpad Synaptics#Disable touchpad while typing]].
  
 
== HDMI plugged at boot ==
 
== HDMI plugged at boot ==
Line 338: Line 222:
  
 
== Powersave management ==
 
== Powersave management ==
For automatic powersaving when on battery configure [[Laptop Mode Tools]]. For manual power saving see [[Power saving]]
+
To configure some power saving options and tools, see [[Power saving]].
  
 
==Hardware and Modules==
 
==Hardware and Modules==
Line 384: Line 268:
 
|}
 
|}
  
====Other Devices and Drivers====
+
==== Other Devices and Drivers ====
 
 
=====rtsx_usb=====
 
 
 
The Realtek SD Card Reader used to use the rts1539 driver, which was in "staging" due to various technical issues with the driver. With the 3.16 kernel, this driver has been replaced with the rtsx_usb driver, which is in the main tree. The old driver was removed in May, 2014.[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=00d8521dcd236d1b8f664f54a0309e96bfdcb4f9] Note that the new driver initiall would not load automatically, and had to be modprobed manually, but that has been fixed as of 3.17.[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1813908986e36119228c158aae1c6a0267c99e77]
 
 
 
=====mei=====
 
 
 
PCE device 8086:1e3a, the Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 and the associated device "/dev/mei" (10,59) relating to an Intel-specific hardware monitoring technology called "Advanced Management Technology".
 
 
 
The MEI driver speaks to or through the "Local Manageability Service" or LMS. The LMS driver is available here. Note that with GCC 4.7.2-2, the driver will refuse to compile. I was able to convince it to compile by:
 
*adding "#include <unistd.h>" to src/tools/ATVersion.cpp
 
*adding "#include <stdio.h>" to src/tools/ATNetworkTool.cpp
 
 
 
It then installs the driver file lms in /usr/local/sbin and the init.d-type daemon file lms in /etc/init.d/.
 
 
 
=====rdrand=====
 
 
 
The i7 Core CPU has an on-chip random number generator ("rdrand") code named "Bull Mountain". It may be used as a randomness source by {{Pkg|rng-tools}} version 4.
 
 
 
In contrast to other hardware random number generators, rdrand does not create a character device in {{ic|/dev}}. However, ''rngd'' version 4 does appear to detect and use it.
 
 
 
First, make sure ''rngd'' sees it:
 
 
 
[root@asarum system]# rngd -v --no-tpm=1
 
Available entropy sources:
 
    DRNG
 
 
 
Second, start ''rngd'':
 
 
 
[root@asarum log]# rngd -f --no-tpm=1
 
 
 
The options for the {{ic|rngd.service}} are set in {{ic|/etc/conf.d/rngd}}; example for configuration:
 
  
# RNGD_OPTS="-o /dev/random -r /dev/urandom"
+
===== MEI =====
RNGD_OPTS=" -o /dev/random --no-tpm=1"
 
  
Test:
+
If you know what you are doing and want to use the i7 MEI, you need the Intel Local Manageability Service. You can find it as [[AUR|intel-lms]] in the AUR.
 
 
[root@asarum system]# cat /dev/random | rngtest -c 1000
 
rngtest 4
 
Copyright (c) 2004 by Henrique de Moraes Holschuh
 
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
rngtest: starting FIPS tests...
 
rngtest: bits received from input: 20000032
 
rngtest: FIPS 140-2 successes: 1000
 
rngtest: FIPS 140-2 failures: 0
 
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
 
rngtest: FIPS 140-2(2001-10-10) Poker: 0
 
rngtest: FIPS 140-2(2001-10-10) Runs: 0
 
rngtest: FIPS 140-2(2001-10-10) Long run: 0
 
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
 
rngtest: input channel speed: (min=891.472; avg=2161.828; max=2788.585)Kibits/s
 
rngtest: FIPS tests speed: (min=28.682; avg=47.816; max=146.719)Mibits/s
 
rngtest: Program run time: 9434482 microseconds
 
  
 
=====watchdog=====
 
=====watchdog=====
Line 480: Line 313:
 
  ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)
 
  ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)
  
In this case an lsmod shows that the gpio_ich module doesn't wind up being loaded
+
This is just a warning that the ACPI has reserved some memory regions for other use. Nothing to worry about!
 
 
# lsmod | grep gpio
 
#
 
 
 
I then rebooted with apci_enforce_resources=lax. A cat /proc/ioports showed the conflict:
 
 
 
      0420-042f : ACPI GPE0_BLK
 
      0428-042f : gpio_ich
 
 
 
and
 
 
 
      0500-057f : pnp 00:05
 
        0500-053f : gpio_ich
 
 
 
In contrast, here's the same lines without acpi_enforce_resources=lax:
 
 
 
      0420-042f : ACPI GPE0_BLK
 
 
 
and
 
 
 
      0500-057f : pnp 00:05
 
 
 
So, net/net, there's no real problem.
 
 
 
====Problem with USB and Laptop_Mode_Tools====
 
 
 
USB mouse problems and hotplug does not working in some cases with messages in dmesg like:
 
 
 
      xhci_hcd 0000:00:14.0: setting latency timer to 64
 
      xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 0 with no TDs queued?
 
 
 
The solution is to set "CONTROL_USB_AUTOSUSPEND" in /etc/laptop-mode/conf.d/usb-autosuspend.conf to 1 and having a long "AUTOSUSPEND_TIMEOUT"
 
 
 
==BIOS Version Problems==
 
 
 
It seems that updating the BIOS to versions 215 and higher causes problems with ACPI handling of the battery charge levels. In particular it seems that one cannot charge the battery beyond 91%-93%. The problem does not seem to be present in Windows however. For further details please see the forum thread [https://bbs.archlinux.org/viewtopic.php?pid=1211033#p1211033 here]. The most up to date BIOS version without any problems is 212. Unless it's absolutely necessary, refrain from updating your BIOS.
 
 
 
==See also==
 
*[[Power saving]]
 
  
 
== Additional resources ==
 
== Additional resources ==

Revision as of 02:16, 20 September 2017

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: This should only have information specific to the hardware. Other content should not be duplicated here. Also avoid maintaining scripts and programs here. (Discuss in Talk:ASUS Zenbook Prime UX31A#)

This page contains instructions, tips, pointers, and links for installing and configuring Arch Linux on the ASUS Zenbook UX31A and UX21A Ultrabooks. Most of it should also hold for UX32VD.

See previous generation ASUS Zenbook UX31E page that has mostly orthogonal information to those here (may be only partially applicable to UX31A)

Installation

To install Arch Linux on UX31A, you can follow the official Installation guide. Since the UX31A uses UEFI and GPT, make sure to also read the UEFI, GPT and UEFI Bootloaders pages. To prepare a UEFI USB device, read UEFI#Create UEFI bootable USB from ISO.

Boot from USB medium

Press Escape to get into the boot menu. If the USB bootable device is not listed, enter the configuration menu and directly press F10 to save. Press Escape again on reboot: This time the USB bootable device should appear in the menu.

Make sure to boot the USB in EFI-Mode, to easily install the bootloader later.

Function keys

Note: A working keymap means that there is some output in xev when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut by the method of your choice or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.

This table shows the function keys, their intended function, what keycode (if any) X recognizes and whether the function key operates at the BIOS level or if it needs a shortcut.

Keys Function X sees shortcut needed
Fn+F1 Sleep XF86Sleep no
Fn+F2 Turn off WLAN and Bluetooth XF86WLAN & XF86Bluetooth no
Fn+F3 Dim keyboard backlight XF86KbdBrightnessDown yes
Fn+F4 Brighten keyboard backlight XF86KbdBrightnessUp yes
Fn+F5 Dim LCD backlight XF86MonBrightnessDown no
Fn+F6 Brighten LCD backlight XF86MonBrightnessUp no
Fn+F7 Turn off LCD No named key no
Fn+F8 Toggle display XF86Display yes
Fn+F9 Toggle touchpad XF86TouchpadToggle yes
Fn+F10 Audio mute/unmute XF86AudioMute yes
Fn+F11 Audio volume down XF86AudioLowerVolume yes
Fn+F12 Audio volume up XF86AudioRaiseVolume yes
Fn+a Ambient light sensor m:0x0 + c:248 yes
Fn+c Switch display profiles XF86Launch1 yes
Fn+v Webcam XF86WebCam yes
Fn+space Switch power profiles XF86Launch6 yes

Screen backlight

Screen backlight should work with any recent kernel (after 3.7). The brightness is managed via hardware, so it should work across all DE's.

Keyboard backlight

Keyboard backlight should work automatically with any recent kernel. Desktop environments that use UPower, like GNOME or KDE, work out the box and don't need any tool or script to register the keys and change the keyboard brightness.

Manually setting the brightness

The easiest way to change the keyboard brightness is to use the UPower D-Bus interface. This even works without root.

 # Get current brightness
 dbus-send --type=method_call --print-reply=literal --system --dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness
 # Set brightness to 2
 dbus-send --type=method_call --print-reply=literal --system --dest="org.freedesktop.UPower" /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:2

You can also control the brightness of the keyboard backlight through the brightness file in /sys/class/leds/asus::kbd_backlight/ or /sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/ by writing a value to it. This needs root. You can retrieve the maximum from max_brightness:

# get maximum brightness value
cat /sys/class/leds/asus::kbd_backlight/max_brightness
3
# set to a particular value:
echo 2 > /sys/class/leds/asus::kbd_backlight/brightness

Using asus-kbd-backlight from AUR

asus-kbd-backlightAUR from the AUR is a convenient way to manage the backlight brightness, if one doesn't want to use UPower. To allow users to change the brightness, write:

# asus-kbd-backlight allowusers

Users of systemd can use the unit file included in the package.

# systemctl daemon-reload
# systemctl start asus-kbd-backlight.service
# systemctl enable asus-kbd-backlight.service

Now you can easily change keyboard backlight in terminal:

$ asus-kbd-backlight up
$ asus-kbd-backlight down
$ asus-kbd-backlight max
$ asus-kbd-backlight off
$ asus-kbd-backlight night
$ asus-kbd-backlight 2
$ asus-kbd-backlight show

You can then set the XF86KbdBrightnessDown and XF86KbdBrightnessUp keys to the above functions. See Extra keyboard keys in Xorg.

Ambient Light Sensor (ALS)

The Zenbook has an ambient light sensor which enables adjustment of the keyboard and LCD backlights based on the light environment in which the Zenbook finds itself. The AUR contains packages to build the necessary kernel module and userspace programs to change keyboard and backlights and to turn the sensor on and off. The kernel module package is als-dkmsAUR and the userspace programs in als-controllerAUR.

ALS Driver

The ALS driver is a module named als. The resulting device is represented in sysfs in the directory /sys/bus/acpi/devices/ACPI0008:00. The ambient light sensor is enabled by writing a "1" to the file enable:

# echo "1" > /sys/bus/acpi/devices/ACPI0008:00/enable

However, it is better to use the userspace controller described below. Note that the module will need to be rebuilt with every kernel update.

If the sensor is not visible at /sys/bus/acpi/devices/ACPI0008:00, you should set acpi_osi='!Windows 2012' at the end of GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and then rebuild sudo grub-mkconfig -o /boot/grub/grub.cfg and reboot.

ALS Controller

The als-controller package will build the als-controller program and an example userspace script. The als-controller program is installed as /usr/share/als-controller/service/als-controller. If the programs is run as root and without parameters it will start the als-controller daemon and create a pidfile and socket for it in /var/run:

# /usr/share/als-controller/service/als-controller

The als can then be enabled and disabled by running als-controller as an unprivileged user with the appropriate parameter ( -e or -d. To enable:

$ /usr/share/als-controller/service/als-controller -e

and to disable

$ /usr/share/als-controller/service/als-controller -d

The project, which seems to be Ubuntu-centric, doesn't yet include a systemd service file. I use the following (overly verbose) one:

[Unit]
Description=Ambient Light Sensor Daemon
 
[Service]
User=root
Group=root
PIDFile=/var/run/als-controller.pid
ExecStart=/usr/share/als-controller/service/als-controller
Restart=on-failure

[Install]
WantedBy=multi-user.target
Sample Script

The sample userspace script is installed as /usr/share/als-controller/example/switch.sh. The script is designed to be run by being bound to a key combination. It requires that libnotify be installed to have OSD confirmation of state change appear. If you wish to bind enabling/disabling to the same [Fn]+[a] combination as in Windows, the relevant keycode under X is 248. If you are using xbindkeys, add the following to your .xbindkeysrc file:

# Ambient Light Sensor (ALS) Toggle [Fn a]
"/usr/share/als-controller/example/switch.sh"
m:0x0 + c:248

More information can be found in the project's README file.

Solid State Drive

If you're using a SSD, make sure to read Solid State Drives.

Graphics

To use the Intel graphics card, install the xf86-video-intel package and read Intel graphics. For hardware accelerated video read Hardware video acceleration.

Touchpad

Instructions to activate the right button. (As an alternative you cant try This).

Multifinger taps work out of the box.

Tip: Multifinger taps: Two finger for middle click; three fingers for right click.

Multitouch gestures

To enable multitouch gestures like those under Windows, one can install toucheggAUR from the AUR. Using touchegg will require disabling some input-handling that is done by the synaptics input driver. Edit your /etc/X11/xorg.conf.d/10-synaptics.conf

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Option "TapButton1" "1"
        Option "TapButton2" "0"
        Option "TapButton3" "0"
        Option "ClickFinger2" "0"
        Option "ClickFinger3" "0"
        Option "HorizTwoFingerScroll" "0"
        Option "VertTwoFingerScroll" "0"
        Option "ClickPad" "true"
        Option "EmulateMidButtonTime" "0"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
EndSection

An alternative to X.org configuration files is to use the synclient command within the .xinitrc script. This method will limit changes to your desktop environment.

 synclient TapButton2=0 TapButton3=0 ClickFinger2=0 ClickFinger3=0 HorizTwoFingerScroll=0 VertTwoFingerScroll=0

touchegg will need to be autostarted for multitouch gestures to be activated. This can be done with touchegg & in your .xinitrc, or using the autostart/startup applications functionality of your desktop environment. ~/.config/touchegg/touchegg.conf can then be configured as necessary.

Multi-tap, two-finger scrolling doesn't work

Check "xinput list" and see whether the Elantech touchpad was recognized as an Elantech Click-pad. If so, brenix's comment in psmouse-elantech AUR fixed it for me.

Multitouch gestures in Gnome 3

GNOME 3's gnome-shell does its own mouse-handling, which can interfere with synaptics and touchegg settings unless the appropriate plugin is disabled.

 gsettings set org.gnome.settings-daemon.plugins.mouse active false

Note that disabling this plugin will cause the the current settings within the Mouse & Touchpad section of System Settings to be ignored.

Disable Touchpad While Typing

One of the criticisms this laptop gets (see reviews at Amazon) is that the placement of the touchpad results in frequent touchpad brushing during typing. You should use whatever touchpad disabling method you prefer. See Touchpad Synaptics#Disable touchpad while typing.

HDMI plugged at boot

There seems to be a problem whereby having an HDMI device plugged in at boot results in the screens being switched and also the laptop screen not coming on. To make this more bearable you can automate switching HDMI on with the following udev rule and script:


Add the following script as root:

/usr/local/share/hdmi-plugged-startup
#!/bin/bash

export XAUTHORITY=/home/$USER/.Xauthority
export DISPLAY=:0

/usr/bin/xrandr -display :0 --output eDP1 --auto --output HDMI1 --auto --above eDP1

then make it executable

# chmod +x /usr/local/share/hdmi-plugged-startup

And add the following udev rule:

# echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/local/share/hdmi-plugged-startup"' >> /etc/udev/rules.d/10-local.rules

Suspending, unplugging the HDMI cable, and resuming is a way to enable the Zenbook's screen without rebooting if it was booted with the cable plugged in.

Powersave management

To configure some power saving options and tools, see Power saving.

Hardware and Modules

Devices

Description Device Id Driver/Module
Intel Corporation 3rd Gen Core processor DRAM Controller 8086:0154 ivb_uncore
Intel Corporation 3rd Gen Core processor Graphics Controller 8086:0166 i915
Intel Corporation Device 8086:0153 none
Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller 8086:1e31 xhci_hcd
Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 8086:1e3a mei_me
Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 8086:1e2d ehci_hcd
Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller 8086:1e20 snd_hda_intel
Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 8086:1e10 pcieport
Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 8086:1e12 pcieport
Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 8086:1e26 ehci_hcd
Intel Corporation HM76 Express Chipset LPC Controller 8086:1e59 lpc_ich
Intel Corporation 7 Series Chipset Family 6-port SATA Controller 8086:1e03 ahci
Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller 8086:1e22] i2c_i801
Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller 8086:1e24 none
Intel Corporation Centrino Advanced-N 6235 8086:088e iwlwifi
Chicony Electronics Co., Ltd Asus 720p CMOS webcam 04f2:b330 uvcvideo
Intel Corporation [Bluetooth Device] 8087:07da btusb
Realtek Semiconductor Corp. RTS5139 Card Reader Controller 0bda:0139 rtsx_usb

Other Devices and Drivers

MEI

If you know what you are doing and want to use the i7 MEI, you need the Intel Local Manageability Service. You can find it as intel-lms in the AUR.

watchdog

The chipset also has an hardware watchdog:

root@asarum chris]# wdctl
Device:        /dev/watchdog
Identity:      iTCO_wdt [version 0]
Timeout:       30 seconds
Timeleft:       2 seconds
FLAG           DESCRIPTION               STATUS BOOT-STATUS
KEEPALIVEPING  Keep alive ping reply          0           0
MAGICCLOSE     Supports magic close char      0           0
SETTIMEOUT     Set timeout (in seconds)       0           0

Activating the watchdog under systemd is trivial, as systemd author Lennart Poettering explains in this blog post.

All you do is go into /etc/systemd/system.conf, uncomment the RuntimeWatchdogSec=0 line and change zero to how long the watchdog should go without receiving a ping before it reboots the system. I used 30s, which is the default setting for iTCO_wdt and seemed sane.

#RuntimeWatchdogSec=0
RuntimeWatchdogSec=30

Check after next boot:

[root@asarum chris]# journalctl | grep -i watchdog
Oct 06 06:36:27 asarum kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10
Oct 06 06:36:27 asarum systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
Oct 06 06:36:27 asarum systemd[1]: Set hardware watchdog to 30s.

Problem with ACPI and gpio_ich

The gpio_ich module causes the following error:

ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 2 (20120711/utaddress-251)
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20120711/utaddress-251)
ACPI Warning: 0x0000000000000500-0x000000000000053f SystemIO conflicts with Region \GP01 2 (20120711/utaddress-251)
lpc_ich: Resource conflict(s) found affecting gpio_ich
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \SMB0 1 (20120711/utaddress-251)
ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 2 (20120711/utaddress-251)

This is just a warning that the ACPI has reserved some memory regions for other use. Nothing to worry about!

Additional resources