ASUS Zenbook UX534

From ArchWiki
Jump to navigation Jump to search

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Asus Zenbook UX533FTC also suffers from the same bugs. There are some hardware revisions or something, but UX533FTC should be added here as well. Using neofetch prints my laptop model as UX534 too. (Discuss in Talk:ASUS Zenbook UX534#)
Device Status
Intel Working
Nvidia Working
HDMI Working
Ethernet (USB cable) Working
Wireless Working
Audio Working
Integrated microphone Only on UX**4 models
Headphones jack Working
Touchpad Working
Camera Working
Card Reader Working
Bluetooth Working
Function keys Working
Face recognition sensor working
Battery autonomy 6.5-10+ hours
Battery charge threshold Working

ASUS UX334, UX434 and UX534 models with ScreenPad™ 2.0. These models most probably share almost the same hardware (the only difference is screen size and discrete NVidia GPU, and missing Display Port Alt-Mode on some models, even 15 inch seems to not include USB-C DP Altmode -), this article covers hardware specific configuration for all ZenBook 13 (UX334), ZenBook 14 (UX434) and ZenBook 15 (UX534).

However the first author is testing on an UX534FTC Full HD (no 4K), with NVidia GTX1650 Max-Q and a 10th generation 10510U Core I7.

Configuration

Secure Boot

In order to boot Arch (or any OS not supporting Secure Boot), enter the UEFI parameters by holding F2 (or ESC key and then selecting "Firmware Setup"), then navigate with the keyboard arrows to the "Security" tab and set "Secure Boot" to Off.

Video

See Intel Graphics and Hardware Acceleration. For models with discrete Nvidia graphics card, also see NVIDIA Optimus.

The Screenpad works as a secondary display and is completely separate from the touchpad: you just have a (non-touch) second screen under your fingers. Therefore it can be deactivated like any other display using one's Desktop environment settings for example, thus lowering power consumption while leaving the touchpad functionality intact.

The Screenpad requires a 'Rotation Portrait Left' and is most useful with a scale factor of 200% (Wayland allows to set a different scale factor of 100% if the main screen in only the Full HD version). If you dual boot, brightness is kept from the last Windows setting.

Audio

As of 2020-06-02, a workaround is needed to play sound on the internal speakers and headphones (USB and bluetooth audio works without it).

Install alsa-tools and run the following commands in this specific order:

# hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b
# hda-verb /dev/snd/hwC0D0 0x20 0x477 0x4a4b
# hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
# hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74

One way to make this fix persistent is to use a systemd service file to execute those commands at boot. First run

$ systemctl | egrep 'sound.*device' | awk '{print $1}'

to get the name of the device unit file for your sound card, then create the following service file:

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Add target suspend.target (and likely hibernate.target to the list), because these commands need to be executed after resuming laptop from sleep as well in order to have sound. Example here. (Discuss in Talk:ASUS Zenbook UX534#)
/etc/systemd/system/audio-fix.service
[Unit]
Description=Fix internal audio on ASUS Zenbook UX533/534
# The following options are needed to prevent the service from executing before the sound card is activated and thus failing
Requires=sys-devices-pci0000:00-0000:00:1f.3-sound-card0.device  # replace with the result of the previous command 
After=sys-devices-pci0000:00-0000:00:1f.3-sound-card0.device     # same

[Service]
Type=oneshot
ExecStart=hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b ; hda-verb /dev/snd/hwC0D0 0x20 0x477 0x4a4b ; hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf ; hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74

[Install]
# Make it part of the sound initialization routine
WantedBy=sound.target

Finally, start and enable audio-fix.service.

Tip: Follow this bug report for the latest updates.

Touchpad

See Libinput. See Screenpad in "Video"

Facerecognition login

This computer has built-in face recognition sensor. You can use it with the project Howdy [1]. See the howdy page for further informations.

Battery charge threshold

Merge-arrows-2.pngThis article or section is a candidate for merging with Laptop.Merge-arrows-2.png

Notes: Not specific to this model. (Discuss in Talk:ASUS Zenbook UX534#)

Kernel 5.4 brought the ability to set the battery charge threshold for some Asus laptops by modifying the charge_control_end_threshold variable exposed under /sys/class/power_supply/BAT0/[2]. By default, this value is set to 100[3].

The effect of its change can be demonstrated as follows:

$ cat /sys/class/power_supply/BAT0/status
Charging
$ cat /sys/class/power_supply/BAT0/capacity
74
# echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold
$ cat /sys/class/power_supply/BAT0/status
Not charging

systemd service

In order to make this change permanent, create the following systemd service:

/etc/systemd/system/battery-charge-threshold.service
[Unit]
Description=Set the battery charge threshold
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold'

[Install]
WantedBy=multi-user.target

and then enable it.

If this doesn't work, it probably means the service is executed before the battery sysfs path is made available. In that case, try adding an ExecStartPre=sleep 5 instruction to the unit [Service] section for a quick workaround, or for a cleaner solution look into path-based activation:

Warning: As of systemd 246, activation of this unit may cause to infinite restart of service above.
/etc/systemd/system/battery-charge-threshold.path
[Path]
PathExists=/sys/class/power_supply/BAT0/
Unit=battery-charge-threshold.service

[Install]
WantedBy=multi-user.target

Create this unit file and enable it. Service above should be disabled, since path unit activating it.

Note: According to some reports, systemd.tmpfiles are not working for this use case.

udev rule

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: udev method doesn't seem to work according to some comments. (Discuss in Talk:ASUS Zenbook UX534#)

In order to make this change permanent, create a corresponding udev rule such as:

/etc/udev/rules.d/99-battery-charge-threshold.rules
KERNEL=="BAT0", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="60"

(source)

Make sure you are using the proper parameters by listing the attributes of the device and then testing your rule before loading, e.g.:

$ udevadm info --attribute-walk --path=/sys/class/power_supply/BAT0
...
# udevadm test /sys/class/power_supply/BAT0
...
Reading rules file: /etc/udev/rules.d/99-battery-charging-threshold.rules
...

Troubleshooting

Suspend

Suspend is working out of the box, with the last version of Archlinux Linux 5.6.3-arch1-1 #1 SMP PREEMPT Wed, 08 Apr 2020 07:47:16 +0000 x86_64 GNU/Linux

Linux (4.17 at least) default to suspend-to-idle which is not very power effective. This is probably due to this change in 4.14-rc1. For better power effective you can use suspend-to-ram by adding mem_sleep_default=deep to the kernel cmdline.

Tips and tricks

Power saving and performance

As advertised by ASUS, these laptops are capable to last up to 9 hours on battery. In order to achieve this, see:

  • BIOS update - It is generally recommended to update BIOS, as it usually brings performance, power-saving and security features.
  • Power Saving - List of general recommendations to increase battery life.
  • SSD - Tips and tricks for Solid State Drives. These three laptops ship M.2 SSD by default.
  • Undervolting CPU - Decrease voltage for Intel CPU (reduce battery drain, reduce heat and therefore - reduce fan speed)
  • Bumblebee - If using bumbleblee and optimus, install 'bbswitch' to allow a good shutdown of NVidia Card ('nvidia-smi' return error if NVidia is power off, or information if it's in use)

UX534FT FHD perfom perfectly with Gnome 3, Bumblebee (bbswitch activated), Konkor (Gnome-extension) with Governor 'Power Save' does :

  • 10h+ (more than 10 hours probably arround 12h or more) watching a video from network using VLC with bluetooth audio, low brightness (not lowest)
  • 7.5h+ with brightness arround 60% watching a Youtube Video and using Firefox
  •  ? h (TODO) in heavy duty task (for example 'optirun' task using discrete Nvidia GPU