Asus Zenbook Duo (2024 / UX8406MA) & NixOS

I was able to disable rfkill in wayland KDE with the help of the following:

Build from source went without a hitch.

and here is my keyd config file:


[ids]

*

[main]

wlan = esc

i basically remapped the wlan to esc so that when keyboard is removed/attached it does not disable the wifi

1 Like

Yeah I also tried to upgrade and encountered the same issues on arch gnome, I rolled back to the 6.8, the computer is again responsive but the bottom screen does not work, as if something else is causing the issue other than the kernel.

Between 6.10.3 and 6.10.5 there seems to be a functional regression in the i915 driver on the Zenbook Duo. For me the experience was worse than “freezes randomly”; the display never left the console mode to become graphically functional at all. Upgrading not recommended at this time.

I’ll see if I can pull together enough information to file an additional i915 bug report.

Aug 21 13:17:01 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* [CRTC:134:pipe B] flip_done timed out
Aug 21 13:17:01 zenbook-nixos kernel: ------------[ cut here ]------------
Aug 21 13:17:01 zenbook-nixos kernel: i915 0000:00:02.0: drm_WARN_ON(!(val & ((u32)(((((1UL))) << (31)) + ((int)(sizeof(struct { int:(-!!((sizeof(int) == sizeof(*(8 ? ((void *)((long)(31) * 0l)) : (int *)8))) && ((31) < 0 || (31) > 31))); })))))))
Aug 21 13:17:01 zenbook-nixos kernel: WARNING: CPU: 10 PID: 2277 at drivers/gpu/drm/i915/display/intel_psr.c:2035 intel_psr_exit+0x324/0x500 [i915]
Aug 21 13:17:01 zenbook-nixos kernel: Modules linked in: uhid cmac algif_hash algif_skcipher af_alg af_packet bnep snd_ctl_led snd_soc_skl_hda_dsp snd_soc_hdac_hdmi snd_sof_probes snd_soc_intel_hda_dsp_common hid_sensor_custom_intel_hinge hid_sensor_accel_3d hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_custom hid_sensor_hub nls_iso8859_1 nls_cp437 snd_hda_codec_hdmi intel_ishtp_hid vfat fat snd_hda_codec_realtek snd_hda_codec_generic snd_hda_scodec_component snd_soc_dmic snd_sof_pci_intel_mtl snd_sof_intel_hda_generic xt_conntrack soundwire_intel nf_conntrack soundwire_cadence snd_sof_intel_hda_common nf_defrag_ipv6 nf_defrag_ipv4 snd_soc_hdac_hda snd_sof_intel_hda_mlink snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp ip6t_rpfilter ipt_rpfilter snd_sof iwlmvm snd_sof_utils snd_hda_ext_core snd_soc_acpi_intel_match xt_pkttype soundwire_generic_allocation snd_soc_acpi xt_LOG soundwire_bus nf_log_syslog xt_tcpudp nft_compat snd_soc_core mac80211 nf_tables snd_compress
Aug 21 13:17:01 zenbook-nixos kernel:  sch_fq_codel ac97_bus intel_uncore_frequency snd_pcm_dmaengine intel_uncore_frequency_common snd_hda_intel snd_intel_dspcfg x86_pkg_temp_thermal snd_intel_sdw_acpi intel_powerclamp uvcvideo snd_hda_codec snd_hda_scodec_cs35l41_spi cmdlinepart regmap_spi r8153_ecm videobuf2_vmalloc coretemp uvc spi_pxa2xx_platform snd_hda_scodec_cs35l41_i2c crc32_pclmul dw_dmac btusb videobuf2_memops snd_hda_scodec_cs35l41 cdc_ether 8250_dw snd_hda_core spi_nor iTCO_wdt ptp dw_dmac_core videobuf2_v4l2 btrtl usbnet uinput snd_hda_cs_dsp_ctls intel_pmc_bxt polyval_clmulni pps_core polyval_generic xe mei_gsc_proxy mtd watchdog intel_rapl_msr libarc4 iwlwifi snd_hwdep btintel gf128mul snd_soc_cs_amp_lib videodev ghash_clmulni_intel processor_thermal_device_pci cs_dsp r8152 snd_pcm processor_thermal_device drm_gpuvm btbcm loop intel_ish_ipc snd_soc_cs35l41_lib processor_thermal_wt_hint asus_nb_wmi btmtk drm_exec rapl processor_thermal_rfim videobuf2_common snd_timer hid_asus intel_cstate mii ucsi_acpi cfg80211 bluetooth
Aug 21 13:17:01 zenbook-nixos kernel:  intel_uncore intel_ishtp libphy mc asus_wmi wmi_bmof processor_thermal_rapl platform_profile typec_ucsi tun intel_lpss_pci i2c_i801 mei_me gpu_sched intel_rapl_common snd intel_lpss igen6_edac idma64 processor_thermal_wt_req typec tap drm_suballoc_helper i2c_mux spi_intel_pci mousedev mei processor_thermal_power_floor spi_intel crc16 i2c_smbus intel_vpu soundcore 8250_pci virt_dma rfkill drm_ttm_helper joydev edac_core hid_multitouch thermal roles processor_thermal_mbox fan serial_multi_instantiate ac i2c_hid_acpi uas macvlan battery i2c_hid int3403_thermal tiny_power_button tpm_crb int340x_thermal_zone intel_pmc_core bridge tpm_tis intel_vsec tpm_tis_core intel_hid int3400_thermal pmt_telemetry acpi_tad pmt_class pinctrl_meteorlake soc_button_array acpi_thermal_rel acpi_pad sparse_keymap stp button evdev llc mac_hid serio_raw kvm_intel kvm fuse efi_pstore configfs nfnetlink zram efivarfs dmi_sysfs ip_tables x_tables autofs4 dm_crypt cbc encrypted_keys trusted asn1_encoder tee tpm rng_core libaescfb
Aug 21 13:17:01 zenbook-nixos kernel:  ecdh_generic ecc sd_mod usb_storage scsi_mod scsi_common hid_generic usbhid hid nvme nvme_core nvme_auth t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic input_leds led_class thunderbolt xhci_pci atkbd xhci_pci_renesas crct10dif_pclmul libps2 crct10dif_common vivaldi_fmap sha512_ssse3 sha256_ssse3 xhci_hcd sha1_ssse3 aesni_intel crypto_simd cryptd rtc_cmos vmd i8042 serio dm_mod dax btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq i915 i2c_algo_bit drm_buddy video wmi backlight ttm intel_gtt drm_display_helper firmware_class cec
Aug 21 13:17:01 zenbook-nixos kernel: CPU: 10 PID: 2277 Comm: X Not tainted 6.10.5 #1-NixOS
Aug 21 13:17:01 zenbook-nixos kernel: Hardware name: ASUSTeK COMPUTER INC. ASUS Zenbook Duo UX8406MA_UX8406MA/UX8406MA, BIOS UX8406MA.306 05/03/2024
Aug 21 13:17:01 zenbook-nixos kernel: RIP: 0010:intel_psr_exit+0x324/0x500 [i915]
Aug 21 13:17:01 zenbook-nixos kernel: Code: 8b 6f 50 48 85 ed 75 03 48 8b 2f e8 d6 ae 21 dd 48 c7 c1 20 94 8a c0 48 89 ea 48 c7 c7 ce be 8c c0 48 89 c6 e8 5d 9a a1 dc 90 <0f> 0b 90 90 e9 55 fe ff ff 48 8d bf 48 0d 00 00 e8 c7 2d a4 dc 48
Aug 21 13:17:01 zenbook-nixos kernel: RSP: 0018:ffffa5538b62fdc0 EFLAGS: 00010286
Aug 21 13:17:01 zenbook-nixos kernel: RAX: 0000000000000000 RBX: ffff9882c93fa188 RCX: 0000000000000027
Aug 21 13:17:01 zenbook-nixos kernel: RDX: ffff98862ff21848 RSI: 0000000000000001 RDI: ffff98862ff21840
Aug 21 13:17:01 zenbook-nixos kernel: RBP: ffff9882c2fcfad0 R08: ffffffff9ec5a120 R09: 000000009f61adea
Aug 21 13:17:01 zenbook-nixos kernel: R10: ffffffffffffffff R11: ffffffff9ed3a168 R12: ffff9882c5ca0000
Aug 21 13:17:01 zenbook-nixos kernel: R13: 0000000000061800 R14: ffff9882c5ca0000 R15: ffff9882c5ca0618
Aug 21 13:17:01 zenbook-nixos kernel: FS:  00007fb123dfa9c0(0000) GS:ffff98862ff00000(0000) knlGS:0000000000000000
Aug 21 13:17:01 zenbook-nixos kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 21 13:17:01 zenbook-nixos kernel: CR2: 00007fa9ec006f40 CR3: 000000012f2ea006 CR4: 0000000000f70ef0
Aug 21 13:17:01 zenbook-nixos kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Aug 21 13:17:01 zenbook-nixos kernel: DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
Aug 21 13:17:01 zenbook-nixos kernel: PKRU: 55555554
Aug 21 13:17:01 zenbook-nixos kernel: Call Trace:
Aug 21 13:17:01 zenbook-nixos kernel:  <TASK>
Aug 21 13:17:01 zenbook-nixos kernel:  ? __warn+0x80/0x120
Aug 21 13:17:01 zenbook-nixos kernel:  ? intel_psr_exit+0x324/0x500 [i915]
Aug 21 13:17:01 zenbook-nixos kernel:  ? report_bug+0x164/0x190
Aug 21 13:17:01 zenbook-nixos kernel:  ? handle_bug+0x3d/0x80
Aug 21 13:17:01 zenbook-nixos kernel:  ? exc_invalid_op+0x17/0x70
Aug 21 13:17:01 zenbook-nixos kernel:  ? asm_exc_invalid_op+0x1a/0x20
Aug 21 13:17:01 zenbook-nixos kernel:  ? intel_psr_exit+0x324/0x500 [i915]
Aug 21 13:17:01 zenbook-nixos kernel:  intel_psr_invalidate+0x24b/0x2c0 [i915]
Aug 21 13:17:01 zenbook-nixos kernel:  __intel_fb_invalidate+0x36/0xd0 [i915]
Aug 21 13:17:01 zenbook-nixos kernel:  intel_fbdev_client_restore+0x5c/0x80 [i915]
Aug 21 13:17:01 zenbook-nixos kernel:  drm_client_dev_restore+0x69/0xc0
Aug 21 13:17:01 zenbook-nixos kernel:  drm_release_noglobal+0x4f/0x70
Aug 21 13:17:01 zenbook-nixos kernel:  __fput+0xee/0x2c0
Aug 21 13:17:01 zenbook-nixos kernel:  __x64_sys_close+0x3c/0x80
Aug 21 13:17:01 zenbook-nixos kernel:  do_syscall_64+0xb7/0x200
Aug 21 13:17:01 zenbook-nixos kernel:  entry_SYSCALL_64_after_hwframe+0x77/0x7f
Aug 21 13:17:01 zenbook-nixos kernel: RIP: 0033:0x7fb1240d1194
Aug 21 13:17:01 zenbook-nixos kernel: Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 80 3d b5 de 0e 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 73
Aug 21 13:17:01 zenbook-nixos kernel: RSP: 002b:00007ffc3d278c08 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
Aug 21 13:17:01 zenbook-nixos kernel: RAX: ffffffffffffffda RBX: 0000000007419dd0 RCX: 00007fb1240d1194
Aug 21 13:17:01 zenbook-nixos kernel: RDX: 000000000742a489 RSI: 0000000007419f10 RDI: 000000000000000c
Aug 21 13:17:01 zenbook-nixos kernel: RBP: 0000000007419f20 R08: 0000000000000002 R09: 0000000000000001
Aug 21 13:17:01 zenbook-nixos kernel: R10: 0000000000000007 R11: 0000000000000202 R12: 0000000007419e10
Aug 21 13:17:01 zenbook-nixos kernel: R13: 0000000000000000 R14: 000000000000000c R15: 000000000742d560
Aug 21 13:17:01 zenbook-nixos kernel:  </TASK>
Aug 21 13:17:01 zenbook-nixos kernel: ---[ end trace 0000000000000000 ]---
Aug 21 13:17:11 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* flip_done timed out
Aug 21 13:17:11 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* [CRTC:134:pipe B] commit wait timed out
Aug 21 13:17:22 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* flip_done timed out
Aug 21 13:17:22 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* [CONNECTOR:250:eDP-2] commit wait timed out
Aug 21 13:17:32 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* flip_done timed out
Aug 21 13:17:32 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* [PLANE:84:plane 1B] commit wait timed out
Aug 21 13:17:42 zenbook-nixos kernel: i915 0000:00:02.0: [drm] *ERROR* [CRTC:134:pipe B] flip_done timed out
3 Likes

same here. 6.10.4 works for me, but 6.10.5 does not

@ultramarine 6.8.12 works fine on my system. Even after switching back and forth with 6.10.5 and having the system as up to date as possible (other than the kernel).

Edit: sorry I wanted to respond to ultramarine, but ended up doing it on my own message :person_facepalming:

I’ve been trying to narrow down the 6.10.5 issue and have found that, at least on my machine, on NixOS, it’s not a kernel issue. I was able to reproduce the same issue on 6.10.3 when I had other recent NixOS updates. So, after bisecting those recent nixpkgs upgrades, I’ve been able to identify that the error I posted above (flip_done timed out & etc) is caused by an upgrade to linux-firmware from 20240709->20240811 (linux-firmware: 20240709 -> 20240811 · NixOS/nixpkgs@be2751d · GitHub).

After this firmware package upgrade is excluded, I’m currently running 6.10.5 with no stability issues.

For NixOS users, you can exclude this upgrade by branching nixos-24.05 into your own nixpkgs, reverting be2751daf952676b1a6ab43b3e62d6d1f5cfc7a4, and using that branch as a package channel or flake. However, you’ll then have to keep that branch up-to-date with changes from nixos-24.05 with periodic merges.

I intend to try to report this issue upstream somewhere in the next few days.

edit: This seems promising for the issue being identified upstream already: Revert "i915: Update MTL DMC v2.22" (!276) · Merge requests · kernel-firmware / Linux Firmware · GitLab. Introduced in 20240811 which matches my bisect, related to this display hardware, and now reverted.

4 Likes

I can confirm that rolling back linux-firmware to 202407 solved the freezing issues, with latest kernel 6.10.6 on arch. Maybe @LGiusti84 your linux-firmware package is tied to the kernel update on fedora?

1 Like

Quick python script to enable the brightness control using keyboard for both displays. I wrote this in an hour. Currently hardcoded to 2 screens and device selection disabled. It works when keyboard is detached, i.e in bluetooth mode.

Next step is to attempt to allow brightness control when keyboard is attached, i can see the event for Fn key using hid-recorder, the trick is to disable the function keys when Fn + F5 is pressed and instead control the brightness.

Running on Fedora 40 under KDE Plasma 6 on X11 Kernel: 6.8.5-301.fc40.x86_64 (64-bit):

1 Like

This kernel patch fixes the rfkill keypress from being emitted when the Zenbook’s wireless keyboard is connected.

2 Likes

Hi @ultramarine,

Kinda noob here, so if something doesn’t makes sense, let me know.

Regarding

your linux-firmware package is tied to the kernel update on fedora?

It doesn’t seems to be that way, currently I’m using kernel 6.8.12-300 and the the linux-firmware is 20240811-2.fc40.
The latter was update much more recently (2024-08-19) than the kernel 6.8 I’m using with it (2024-07-04). Kernel 6.10.5 was installed on 2024-08-20

I do not have the packages needed to downgrade to a version of 202407 (did a quick web search and found there is one 20240709 for fedora 40, probably will try after work).


To check linux-firmware version and available packages I used:
dnf list --showduplicates linux-firmware

linux-firmware.noarch                                     20240811-2.fc40                                     @updates
Available Packages
linux-firmware.noarch                                     20240312-1.fc40                                     fedora  
linux-firmware.noarch                                     20240811-2.fc40                                     updates 

To get more data on my current linux-firmware version I used rpm -qi linux-firmware

Version     : 20240811
Release     : 2.fc40
Architecture: noarch
Install Date: lun 19 ago 2024 01:51:16
Group       : Unspecified
Size        : 39114245
License     : GPL+ and GPLv2+ and MIT and Redistributable, no modification permitted
Signature   : RSA/SHA256, vie 16 ago 2024 07:29:12, Key ID 0727707ea15b79cc
Source RPM  : linux-firmware-20240811-2.fc40.src.rpm
Build Date  : vie 16 ago 2024 06:44:41
Build Host  : buildvm-s390x-01.s390.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.kernel.org/
Bug URL     : https://bugz.fedoraproject.org/linux-firmware
Summary     : Firmware files used by the Linux kernel
Description :
This package includes firmware files required for some devices to
operate.

EDIT:

I couldn’t help myself and went for it. I tried installing:

  • intel-gpu-firmware-20240709-1.fc40.noarch.rpm
  • linux-firmware-20240709-1.fc40.noarch.rpm

from linux-firmware-20240709-1.fc40 | Build Info | koji
First I only the gpu-firmware, then with both. But I had no luck, 6.10.5 kernel is still not working for me (6.10.6 neither).
Guess I should try installing all the rpm files there (or use the .src one), but I have not much time to keep trying this right now. Will try later.

I personally used an utility called downgrade to revert only linux-firmware and I kept the rest up to date.
Just to add to the weird bugs and glitches that this dual setup is suffering for me at the moment:

  1. Using gnome 40 and wayland sometimes if I have the pointer on specific areas of the upper screen, namely the ones close to the dockbar, the lower screen weirdly shifts rapidly and horizontally like in a flicker.
  2. From the recent updates when I wake the system from sleep with the keyboard detached the touchpad is wrongly configured, specially scrolling with two fingers does not work. Attaching/detaching the keyboard solves the issue.

Did any of you experience one of these and maybe managed to fix?

Hi @ultramarine

I assume you meant Fedora 40 (gnome is actually through v46), so:

  1. The same weird horizontal movement happened to me until I disabled PSR. To fix it, open a terminal:

sudo nano /etc/default/grub

in grub, search for this line below and add i915.enable_psr=0 after the existing parameters, like this:

GRUB_CMDLINE_LINUX=“rhgb quiet i915.enable_psr=0”

Then Ctrl+X to exit and ensure to save the file

After modifying GRUB, update the config with this command:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

  1. I have the same behavior with the keyboard, but what is really annoying for me is that palm rejection is not working. Even if I have the option ‘Disable trackpad when typing’ enabled, when I’m typing, the slightest movement on the trackpad causes the cursor to go to another position, and is really a pain. Don’t know if anyone else is having this issue and has managed to fix it.

Lastly, I’ve managed to fix the touchscreen issues with asus pen (bottom screen redirecting to top) following those steps, just in case you’re interested in fixing this:

  1. Run alesya script with parameter set-tablet-mapping
  2. Open Gnome Settings and go to Wacom tablet settings.
  3. From there, change the monitor assignment for both screens to automatic, run the calibration in both screen and cancel it with Esc key.
  4. Enable and disable ‘Keep aspect ratio’
  5. Switch back from automatic to ‘Whole screens’ and then install dconf-editor if you haven’t already with sudo dnf install dconf-editor
  6. All this steps done from gnome parameters GUI will create some keys that will be visible if you run dconf-editor.

Keys are located in /org/gnome/desktop/peripherals/tablets/04f3:425a and b respectively. So you can modify the keys to have the following values for each monitor:

[04f3:425a]
area=[0.0, 0.0, -1.0, 0.0]
keep-aspect=false
mapping=‘absolute’
output=[‘SDC’, ‘0x419d’, ‘0x00000000’, ‘eDP-2’]

[04f3:425b]
area=[0.0, 0.0, 0.0, -1.0]
keep-aspect=false
mapping=‘absolute’
output=[‘SDC’, ‘0x419d’, ‘0x00000000’, ‘eDP-1’]

I’m afraid I’m a linux newbie and I haven’t managed to do this setup through an script, so I’ve fiddled with gnome gui to create the dconf keys, and then modifying them.

PD. This fixes touch with a stylus, but If I use fingers, the bottom screen still redirects to the top. Wonder if someone have fixed this as well. Anyway, at least for me, the biggest issue is the palm rejection not working.

Yeah I meant the latest gnome version. Thank you for the first tip, I’ll try today.
2. Yes palm rejection is not working also for me, enabling click only on touchpad physical press somewhat helps but still does not solve the issue. At least you don’t get random clicks.

Hi all, is anybody experiencing Emergency Mode on reboot? It looks like the error is related to initrd-switch-root.service Failure.



One issue that is driving me mad which I don’t know if it is device specific but I never had on previous gnome installations. Vscode which is the main program I use daily is also the only one displaying blurry, I added all the flags to make it run natively under wayland but with lo luck.
https://wiki.archlinux.org/title/Visual_Studio_Code#Running_natively_under_Wayland
I don’t know if it is screen related, driver related or something else entirely. The screens are set at 200% so it’s not even fractional scaling.

I am suddenly getting an issue where the 2nd monitor not only stops to be synchronized (with zenbook-duo), but the primary monitor is also stuck at 100%. Not sure if it was from an update, but I have blocked updates from the Linux-firmware package as it was causing issues.

I also noticed that when I run duo sync-backlight, it gets the brightness level from the directory in /sys/class and the intel_backlight and card1-eDP-2-backlight directories are not shown, there is only an asus_screenpad folder. Not sure what this means but maybe there was a change to a driver?

What updates did you apply when this occurred? I haven’t seen similar myself yet.

It didnt apply directly after any updates, and I dont remember updating anything major. Just thought I would post it to see if anyone else had the same issue.

A couple updates:

  • linux-firmware 20240909 has been released which doesn’t have the same secondary display problems.
  • However, coincidental with the firmware 20240909, I did get a mysterious third display registering on my system on first boot… but I’m not sure if this is going to be a persistent problem/confusion or not. I’ve disabled it for now and I’ll see if anything else weird occurs.
  • The patch for the wireless disconnecting after connecting the keyboard has been included in Linux 6.11, which should be released as a new stable kernel soon. However, I haven’t tested this kernel to see if any other issues come up.
1 Like

A new commit was submitted that allows you to control the keyboard brightness. Limitations:

  • works only when the keyboard is attached
  • does not work through the FN key, only through command line (or I don’t know how to map the FN key yet)