Asus Zenbook Duo (2024 / UX8406MA) & NixOS

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