Asus Zenbook Duo (2024 / UX8406MA) & NixOS

Hey Tomass, could you share how you compiled the kernel for fedora with these patches? Just the code snippets would be enough :slight_smile:

I am using bluebuild (fedora), we can leverage their experimental Stages feature to have an rpm-ostree image with the compiled kernel directly (no need to do things locally)

Thanks!

Hello, I am not a developer and I have quite basic knowledge of Linux. Also I don’t use bluebuild. I followed this tutorial:

I saved the revert patch as linux-kernel-test.patch in the “kernel” directory and it compiled and installed. B

1 Like

Thanks for the help, I am trying to do it on rpm-ostree using bluebuild. Feel free to follow my progress here if interested: GitHub - mecattaf/zen: Fedora Atomic spin for Asus Zenbook Duo

1 Like

Since people are sharing the relevant Fedora kernel, and I’m trying to follow developments, thought I would share my OpenSUSE build with patches too: Show home:ponyisi:branches:openSUSE:Factory - openSUSE Build Service
Patches in https://build.opensuse.org/source/home:ponyisi:branches:openSUSE:Factory/kernel-source/patches.addon.tar.bz2

Thanks for sharing. I gave up on the Stages approach, instead opting to build the custom kernel locally and pushing it to fedora COPR. It is my first time attempting kernel-level changes, so not really sure where to start.

Also on a sidenote, do we know if this will be fixed in the upcoming kernel 6.10? Since it is almost at stable release I could wait a few more days hoping it would get fixed magically…

Also on a sidenote, do we know if this will be fixed in the upcoming kernel 6.10?

I’m not terribly familiar with the DRM merge process, but I doubt it. It hasn’t yet been fixed by Intel, let alone submitted upstream.

So our best bet is to wait for this issue to be resolved and use the asus kernel?

Thanks for noticing this! I thought I was going crazy with the flickering… For what it’s worth this also solved it on sway wm (using kanshi):

profile Duo {
    output eDP-1 scale 2 position 0,0   adaptive_sync on
    output eDP-2 scale 2 position 0,900 adaptive_sync on
    exec swaymsg gaps outer 0
    exec busctl --user set-property rs.wl-gammarelay /outputs/eDP_1 rs.wl.gammarelay Temperature q 3850
    exec busctl --user set-property rs.wl-gammarelay /outputs/eDP_2 rs.wl.gammarelay Temperature q 3350
}

By the way, the wl-gammarelay commands are this way because my two screens were not properly color-calibrated out of the box. The wl-gammarelay-rs package is the only project I found that allows per-display gamma adjustments. Hopefully this helps somebody out.

Lastly, for brightness control, here is a script I use to control both screens at the same time with light

2 Likes

The secondary display issue is this issue, filed with the Intel display team: Asus Zenbook Duo UX8406MA Regression - Display Blank (#11488) · Issues · drm / i915 / kernel · GitLab. This is the issue that would need to be resolved, and then upstreamed, and then released. At this point there is no resolution to it. As a workaround, the patch that introduced the problem can be reverted.

1 Like

The patch file can be downloaded here (zenbook-i915-revert-93cbc1accbcec2740231755774420934658e2b18.patch · GitHub ) or generated from the linux source tree

You can also pull it directly from GitLab:

boot.kernelPatches = [
  {
    name = "drm-dual-display-fix";
    patch = pkgs.fetchpatch {
      url = "https://gitlab.freedesktop.org/drm/i915/kernel/-/commit/93cbc1accbcec2740231755774420934658e2b18.patch";
      revert = true;
      hash = "sha256-MuI8aNX7651ODXsRO/1AEQHenzY6Q201l3n+U6kZD6Y=";
    };
  }
];

I was really not comfortable building/compiling my own kernel.
Fortunately sentry the legend (maintainer of fsync kernel) has just incorporated the patch I requested
and it’s already available.
For even more added convenience the ublue team has just prepared a new kernel cache repo. Will report back here once I test it out and confirm that it works on my device. You can also just leverage the Fsync kernel copr directly.

1 Like

Update on how to solve broken bottom screen due to kernel 6.9.x and beyond thanks to fsync kernel:

  1. If on regular fedora, follow instructions from fsync copr repo
  2. If using Fedora Atomic (specifically project bluebuild), make sure to add the fsync copr repo in the rpm-ostree module and add the following script in the scripts module

Hope this helps, apologies for spamming your nixOS thread, and thanks again to @mfenniak and @hacker1024 for identifying the patch!

1 Like