RSS

How I Used AI to Turn My Zenbook A14 (Snapdragon X1) into a Perfect Linux Laptop

24 min read

  • linux
  • fedora
  • arm64
  • snapdragon
  • zenbook
  • ai
  • claude-code
  • kernel

Fedora on an ASUS Zenbook A14 (UX3407QA, Snapdragon X1P42100): nine problems, five kernels and one AI pair programmer.

TL;DR

  • The laptop: ASUS Zenbook A14 UX3407QA. Its Snapdragon X1P42100 chip is codenamed "Purwa". I run Fedora aarch64 with KDE Plasma. I started on Fedora 44 and moved to Fedora 45.
  • Out of the box: the speakers were quiet, the webcam didn't exist, Shut Down rebooted the machine, the fan ran all the time (even while suspended), the chip never reached deep sleep and the Fn keys did nothing. Then kernel 7.3 broke the lid switch, an external monitor started killing USB-C (and with it, suspend), and 7.3.6 made the keyboard erratic.
  • What I did: I worked through every one of them with Claude Code, running in a terminal on the laptop itself. We found each root cause from evidence (kernel logs, interrupt counters, power-state counters, ACPI tables, kernel source) and fixed it with the smallest thing that worked. Depending on the problem that was a kernel patch, a tiny out-of-tree module, a device-tree overlay applied at runtime or a userspace daemon.
  • Kernel updates: everything lives in one repo with a zenbook-a14 CLI that enables, disables and rebuilds the fixes for each kernel. It refuses to build when upstream changed the code a patch touches.
  • Results: the laptop now sleeps at 0.21 W (previously 0.28–2.24 W, without ever reaching deep sleep). Idle draw went from 5.6 W to 3.5 W in one test run. The fan is off when the laptop is idle. The speakers run under calibrated DSP protection with the volume cap lifted. The webcam works at ~30 fps.

The laptop and the problem

The Zenbook A14 is thin, light hardware with a Snapdragon X1 chip. Linux support for these laptops has come a long way: Fedora's kernel ships a device tree for this exact model and it boots. But "it boots" is a long way from "it's my daily laptop".

Here's what I was dealing with:

Problem What I saw
Speakers Quiet. Without speaker protection, the kernel caps the amplifier gain
Webcam No camera at all
Shut Down The laptop came back on about 63 s later, every time
Fan ~3300 rpm all the time, awake and asleep. The keyboard backlight stayed on while asleep
Deep sleep The chip never reached its deep sleep states, so standby drained more than it should
Fn keys Brightness, keyboard backlight and touchpad toggle did nothing
Lid (kernel 7.3) Closing the lid did nothing
External monitor USB-C died, and after that every suspend failed. The laptop stayed awake all night with the lid closed
Keyboard (kernel 7.3.6) Erratic, with 400 to 1700 spurious interrupts per second while idle

I'm comfortable on Linux, but I'm not a Qualcomm kernel developer. On my own, most of these would have stayed "known issues".


How I worked with the AI

I used Claude Code (Anthropic's agentic coding tool) in a terminal on the Zenbook itself. That matters: the AI wasn't guessing from my descriptions. It could read the journal, /proc/interrupts, sysfs, debugfs and the decompiled ACPI tables. It could also fetch the kernel source for the exact version I was running.

The loop for nearly every issue went like this:

  1. I described the symptom in plain words. One real example: "Sometimes the fan stays on and it's warm."
  2. Claude gathered evidence. It checked kernel logs from past boots, interrupt rates, sleep-state counters, device states in sysfs and the kernel source at the matching stable tag.
  3. It proposed a cause and wrote a staged test script. The scripts were reversible ("this boot only"), logged everything to a file and synced the disk after each stage, in case the laptop froze.
  4. I did the physical part. Closing the lid, plugging in the monitor, pulling the charger, pressing a key to wake it up. Then we read the log together.
  5. Only then came a fix. Each one got a README listing what was verified and what wasn't verified yet.

A few rules made this work, and I'd use them again:

  • Measure, don't guess. Every fix has a before/after number: interrupts per second, fan rpm, watts asleep, sleep-state residency.
  • Reversible by default. Test scripts change nothing permanently. Every fix has a disable that returns to stock Fedora.
  • Prove the build before trusting the patch. Before patching any kernel module, we build the unpatched upstream source and require its code to be identical to the module Fedora ships. That way a patched module can't silently drop a Fedora change.
  • Interlocks around anything that can damage hardware. For example, the speaker fix only lifts the volume cap if every protection piece is present. Otherwise it keeps the cap and logs a warning.
  • Write down what isn't verified. The commit messages and READMEs say "not booted yet" or "not tested on the hardware yet" when that's the truth.

The AI was wrong sometimes, and the process caught it. The first Shut Down fix assumed arm64 skipped the UEFI power-off path. It doesn't, so the module conflicted with the existing handler and failed with EBUSY. We removed it and wrote the correction down. Another time, kbuild's clean deleted every .ko under the build directory and wiped a module bundle. We restored it byte-identical from git, and builds now run in ~/.cache, never inside the repo. The rules above exist because of mistakes like these.


The fixes

1. Speakers: from capped volume to calibrated DSP speaker protection

The problem. Laptop speakers are tiny and easy to cook. On Windows, Qualcomm's speaker protection runs on the audio DSP. It reads voltage and current feedback ("V/I") from the WSA884x amplifiers, estimates the voice-coil temperature and pulls back before the speaker gets hurt. Linux doesn't have that, so the kernel caps the speaker gain. The result is safe but quiet.

The approach. I started from x1e-speakers, an experimental project that does this for the Vivobook S15, and ported it to the Zenbook A14:

  • The Zenbook's own calibration data. I took it from the Windows driver's acdb_cal.acdb, which ships in the qcacsp_crd8380 package and binds to this laptop's subsystem ID. The two laptops differ a lot:

    Zenbook A14 Vivobook S15
    Coil resistance R0 (25 °C) 8.016 / 7.981 Ω 7.345 / 7.567 Ω
    Thermal target 90 °C 80 °C
    Max excursion (Xmax) 0.6 mm 0.4 mm
    Max power 10 W 8 W
    Pilot tone 16 Hz 40 Hz
  • Kernel patches. These enable V/I sense capture on the amplifiers, send the protection module's configuration from the topology and fix a blob over-read. On top of the reference's 10 patches I added a build shim, the safety interlocks, a read-only debugfs window into the DSP and later a 0 dB digital-volume cap.

  • A device-tree overlay applied at runtime. Fedora embeds the DTB in the unified kernel image, so nothing in /boot is edited. Instead, a small module (zenbook_sp_overlay.ko) applies the V/I feedback link to the live device tree before the sound drivers bind. It's all or nothing: if the audio hardware is already bound, it does nothing.

  • A custom DSP topology with the speaker-protection modules and the Zenbook's calibration blobs.

Measuring instead of trusting. The V/I feedback turned out to be real (correlation 0.98, repeatable to 0.05%). Measured cold with a lock-in on the 16 Hz pilot tone, the coils were 7.418 / 7.590 Ω. The ACDB's "safe" values were 5–8% too high, which would have made the DSP read the coils about 30 °C colder than they really were. So the calibration uses the measured values.

Thermal test. I set a deliberately low 50 °C target and played pink noise at about 0.9 W for 67 s. Attenuation started when an independent estimate read 51.6–53 °C, held the coils at 52.4 / 51.3 °C (up to −5.8 dB of attenuation) and peaked at 54.3 °C. Protection works.

The rollout was staged:

  • Stage A: protection on, volume cap kept, with a factory-test variant to let the DSP measure the coils.
  • Stage B: the cap is lifted (+21 dB amplifier gain, digital volume held at 0 dB). This stage needed an explicit go-ahead from me and started at low volume.

The final setting is an 80 °C target, about 15 °C of margin below the speakers' 100 °C rating. The vendor's 90 °C is available but not the default.

The interlocks. The cap is lifted only if the device tree has the V/I link and the topology has the protection widget. Stock kernels never load the protection topology. If a kernel update lands without the patched modules, the options are ignored and the cap stays.

⚠️ Don't copy someone else's speaker calibration or lift the cap without protection that you've verified on your own unit. Speakers are cheap to destroy and expensive to replace.

2. The webcam

The problem. The front camera is an OmniVision OV02C10 on a CCI (camera I²C) bus, connected over 2 MIPI lanes. On kernel 7.2.15 there was no CAMSS (camera subsystem) support for the X1P42100 chip and no device-tree nodes for the camera pipeline at all.

The fix puts together several upstream patch series that hadn't landed yet, plus a few fixes of my own:

  • A backport of the "Purwa" CAMSS support series, adapted to the older CSIPHY handling the 7.2 kernel uses
  • A CCI fix that selects pin states during runtime PM, so the sensor isn't back-powered through SDA/SCL
  • An OV02C10 power-sequencing fix: supplies before the clock
  • A device-tree overlay module that adds the camera clock controller, CCI, CAMSS, regulators and sensor at runtime, and can be removed again
  • A privacy LED: the patched sensor driver registers an LED trigger that's on while the sensor is powered, and a udev rule attaches the camera indicator LED to it

The freeze. The first test hard-froze the laptop. The cause was a latent upstream bug: cci_probe() → cci_reset() always waits on bus 0's completion, but the driver only initialises completions for buses that have a device-tree child. My overlay described only bus 1, so bus 0 had an uninitialised wait queue. The result was a list_add corruption BUG with interrupts off. That CPU died and every other CPU soft-locked. The patched CCI driver now initialises every bus's completion up front. The re-test was split into stages (clocks/CCI → sensor → CAMSS → libcamera), with the log synced after each one.

The result: libcamera reports "Internal front camera" at ~30 fps, and PipeWire offers it as "Built-in Front Camera". Firefox and Chrome each need one flag to use PipeWire cameras. Image quality is basic: there's no tuning file for this sensor yet, so the software ISP is uncalibrated. The IR camera (Himax HM1092) isn't supported. It needs a new driver plus an IR flash.

3. Shut Down restarted the laptop

The problem. Every shutdown in the journal was clean ("System is powering down"), followed by a new boot 63 s later. A normal reboot also takes 63 s, so the laptop restarted immediately instead of hanging until a watchdog fired.

The investigation. On arm64 with UEFI runtime services enabled, the kernel powers off through UEFI ResetSystem(EfiResetShutdown) first and only falls back to PSCI SYSTEM_OFF if that returns. (This is the assumption the AI got wrong at first, as mentioned above.)

The fix. zenbook_psci_poweroff.ko registers a higher-priority power-off handler that calls PSCI SYSTEM_OFF directly and skips the UEFI path. Hibernation isn't affected. It's built for each kernel and is part of the default fix set.

4. The lid stopped working on kernel 7.3

The problem. From the first 7.3.3 boot, closing the lid did nothing. Docked, KWin never turned off the internal panel. Undocked, the laptop never suspended. The journal had plenty of "Lid closed" events on 7.2.15 and none on 7.3.3.

The cause. The lid is a GPIO (gpio92) that needs an interrupt on both edges. In 7.2, the pin controller handled it directly. In 7.3 (mainline commit 77fbc756d9cb), wake-capable GPIOs are routed through the PDC, Qualcomm's always-on wakeup interrupt controller, and the PDC only delivers one edge of a dual-edge interrupt. The counter confirmed it: the lid IRQ fired on open and never on close. The known fix is the pin controller's wakeirq_dual_edge_errata flag, which emulates dual edge by re-arming the opposite edge. It was not upstream, and Fedora didn't have it.

The fix. The pin controller driver is built into the kernel, so a small module (zenbook_lid_fix.ko) gives it a copy of its SoC data with the errata flag set, then re-applies both-edges to the lid interrupt. Because it copies private kernel structs, the rebuild tool checks the pin controller sources against the versions the layouts came from and stops if they changed. Once a kernel sets the flag itself, the module reports "not needed" and the tool marks that kernel NOT-NEEDED.

5. The fan never stopped (and the keyboard stayed lit while asleep)

The problem. The fan ran at ~3300 rpm all the time, including while suspended. The keyboard backlight stayed lit in suspend too, so the laptop looked like it never slept.

The cause: the embedded controller (EC) is never told anything. The fan and keyboard backlight belong to ASUS's EC, which sits on an I²C bus at 0x5b. It isn't in the device tree, so no Linux driver talks to it. Reading the decompiled ACPI tables (DSDT) showed two things that Windows does and Linux doesn't:

  1. Windows pushes the CPU temperature to the EC. It writes the current temperature into an EC register, and the EC runs the fan curve from that value. Under Linux nobody writes it, so the EC kept its boot value of 75 °C while the real CPU sat at 40 °C. Hence the constant 3300 rpm.
  2. Windows sends sleep notifications through ACPI (display off, Modern Standby entry, lowest power entry). The "lowest power" one is what turns the keyboard backlight off.

The fix: a userspace daemon, no kernel changes. zenbook-a14-ec (Python, no dependencies) replays exactly those ACPI register accesses over /dev/i2c-4:

  • A service pushes the hottest CPU/GPU thermal zone to the EC every 2 s, like Windows does.
  • A sleep hook sends the Windows-style notifications before suspend and reverses them after wake.

Measuring the fan's actual behaviour shaped the details:

Test Result
Real temperature (~40 °C) pushed Fan went 3291 → 2937 → 0 rpm in 4 s
Fan start threshold from standstill ~70–72 °C
Under real load 2331 rpm at 72 °C → 3857 rpm at 91 °C
41–44 °C handed over at suspend Fan kept spinning all night (hysteresis band)
38 °C cap at suspend Fan stops 1.4 s after entry, 0 rpm at wake

That's why the sleep hook hands the EC at most 38 °C before suspend. The CPU is off while asleep anyway. If the daemon crashes or stops, it keeps writing 75 °C until the fan spins, so the failure mode is "fan on", never "fan starved". These are systemd units rather than system-sleep hooks because SELinux confines those hooks.

6. The chip never reached deep sleep

The problem. Suspend looked fine: PM: suspend entry (deep), a clean PSCI suspend, a clean resume. But Qualcomm's sleep statistics showed 0 entries since boot for aosd (whole-chip sleep), cxsd (core rail collapse) and ddr (memory self-refresh). Only the CPUs slept.

The cause. Four resource providers never got their sync_state() callback, because a consumer described in the device tree never binds a driver:

Provider Held by Why the consumer never binds
aggre2 interconnect crypto engine Fedora doesn't build the Qualcomm crypto driver
DDR interconnect crypto engine Same
Global clock controller GPU GMU The GPU driver drives the GMU directly, and no driver matches its node
GPU clock controller GPU GMU Same

Until sync_state() runs, the interconnect framework keeps every bus voted at maximum, even for the sleep state. That alone rules out DDR self-refresh and rail collapse. The DDR clock had sat at its 4224 MHz maximum for about 13,500 of 13,600 seconds since boot. Fedora also disables the deferred-probe timeout, so the kernel never prints the usual "sync_state() pending" warning. Nothing in the log pointed at this.

The fix. At boot, a service forces sync_state() on these providers, but only if every consumer holding them is on a known "never binds" list. If some other driver is holding one, the service logs it and leaves it alone.

Reaching real deep sleep exposed two spurious wake sources that had never fired before:

  • The multiport USB controller's PHY woke the laptop within a millisecond of reaching deep sleep, with nothing plugged in. Wakeup is now off for that controller only. The USB-C ports keep it.
  • The lid's wake interrupt fired when the lid was already open. A lid that's already open can't open again, so its wakeup is turned off for suspends that start with the lid open and left on for lid-close suspends.

The result:

Before After
Deep sleep states (aosd / cxsd / ddr) 0 / 0 / 0 entries 90% / 91% / 93% residency
Long sleep on battery 0.28–2.24 W (coarse gauge) 0.21 W over 8539 s
Awake idle (one 20 s sample each, same session) 5.64 W 3.48 W

7. Fn keys

The problem. Fedora's aarch64 kernel doesn't include hid-asus, so the keyboard's Fn keys send ASUS vendor reports that nothing handles.

The fix. asus-fnkeys is a small daemon that reads those reports from hidraw:

  • Fn+F5 / Fn+F6: screen brightness, through uinput
  • Fn+F11: touchpad toggle
  • Fn+F4: keyboard backlight 0 → 1 → 2 → 3, sent straight to the keyboard

The level is saved, and the EC sleep hook restores it after wake.

8. An external monitor killed USB-C, and with it every suspend

The problem. It started with "Sometimes the fan stays on and it's warm." The laptop hadn't slept at all. Every suspend failed with xhci-hcd ... PM: failed to suspend async: error -22, and KDE's power manager retried every ~11 s with the lid closed: 2277 attempts in one night.

Cause 1: the USB controller died. Earlier in the same boot, a USB-C xHCI had stopped responding ("HC died"). Every death came seconds after my monitor's built-in USB hub came up at SuperSpeed on that port. When the hub came up USB 2-only, nothing died. PHY debug output showed the likely mechanism. With the monitor set to USB 2.0 (4-lane DisplayPort), a plug-in starts in USB3-only mode, and 0.48 s later the combo PHY switches to DP-only without telling the USB controller. If SuperSpeed linked up inside that window, the controller loses its clock and hangs. A dead controller's root hubs never reach the suspended state, so xhci_suspend() returns -EINVAL on every attempt until the controller is re-probed.

Cause 2: my own sleep hooks. The EC and socsleep sleep units were WantedBy=suspend.target. After a failed suspend that target never activates, so StopWhenUnneeded= was never checked again and the "after wake" hook never ran. That left 12 hours with the temperature daemon paused (the EC holding 38 °C while I was using the laptop) and the keyboard backlight off.

The fixes:

  • The sleep units are now WantedBy=sleep.target, which is reached before and stopped after every attempt, whether it succeeds or fails. The temperature daemon also ignores a "paused" flag older than 60 s of monotonic time.
  • The dead controller: before suspend, the hook scans this boot's kernel log for a dead xHCI. It tries to unbind and re-bind it once. A dead controller is wedged (Host halt failed, -110), so if the re-bind fails it stays unbound with wakeup off. The suspend then succeeds, and suspending resets the USB core. After wake, the hook binds it again.
  • A catch we found while testing: the Qualcomm USB glue driver dereferences the xHCI's driver data on suspend. With no driver bound, that's a NULL pointer. So while the xHCI is unbound, runtime PM is pinned on and wakeup is off.

Suspend now works with the dead controller set aside. That was verified twice, with the death reproduced on purpose using the monitor.

9. Kernel 7.3.6: the erratic keyboard

The problem. On the first 7.3.6 boot the keyboard became erratic. The I²C HID interrupt lines were firing constantly with nothing touched:

GPIO Device Interrupts/s (idle)
67 Keyboard 413
3 Touchpad 735
95 ASUS HID device (0B05:4543) 1663

That came to 600,000–1.2 million incomplete report errors per boot, against zero on 7.3.4.

The cause. This one was satisfying to track down. The PDC (the same wakeup controller as in the lid story) has a pass-through mode and a "secondary" mode that latches GPIO interrupts. The Windows firmware leaves it in secondary mode. The qcom-pdc driver resets it to pass-through at probe, but only for chips it recognises. Mainline fixed this for Purwa in one series of two commits:

  • 086eac130a94 updates the driver so it also resets the PDC for qcom,x1p42100-pdc. It has no Fixes: tag.
  • 13ca1c0b7d8a gives Purwa's PDC that new compatible in the device tree. It does have a Fixes: tag, so the stable kernels picked it up.

Stable 7.3.5–7.3.7 took the device-tree commit without the driver commit. The driver sees an unfamiliar compatible, skips the reset and assumes pass-through mode. The PDC is still latching, and nothing ever clears a latch, so an interrupt that fired once fires forever. Fedora's 7.3.4 and 7.3.6 device trees for this laptop differ only in that compatible string (plus one unrelated reserved GPIO).

The fix. zenbook_pdc_fix.ko makes the same secure register write the upstream driver commit makes, once, at load time. It refuses to load unless the machine is an X1P42100 with that PDC compatible. The rebuild tool only builds it for kernels that have the device-tree change but not the driver change, and marks every other kernel NOT-NEEDED.

The result: when I loaded it by hand, all three lines dropped to 0 interrupts/s, and the error count went from 1,199,685 to 1 (the read that was in flight at the time).


Taming kernel updates: the zenbook-a14 tool

Nine fixes, five of them per-kernel, on a distro that ships a new kernel every week or two. That stops being manageable without tooling. So everything lives in one repo with a single CLI:

zenbook-a14 status
sudo zenbook-a14 enable  [FIX...] [--variant V]
sudo zenbook-a14 disable [FIX...]
zenbook-a14 rebuild [KERNEL] [FIX...]
Fix What it does Rebuilt for each kernel?
pdc Erratic keyboard on 7.3.5+: puts the PDC in pass-through mode yes
poweroff Shut Down really powers off yes
lid Lid close works on 7.3 (dual-edge errata) yes
ec Fan follows the real CPU temperature; EC told about suspend no
socsleep Deep sleep, spurious wakes, dead USB-C xHCI no
fnkeys Fn keys no
speaker / speaker-stage-b DSP speaker protection / cap lifted yes
camera Front camera yes

After a kernel update, the routine is:

sudo dnf install kernel-devel-<new>
zenbook-a14 rebuild          # builds for the newest installed kernel
sudo zenbook-a14 enable      # pdc, poweroff and lid are ready for the first boot
sudo systemctl reboot
sudo zenbook-a14 enable      # on the new kernel: speaker and camera (another reboot)

The interesting part is what rebuild checks before it builds anything:

  • The source is the real source. It does a sparse checkout (~14 MB) of the matching stable tag, and the tag's commit must match what kernel.org reports.
  • The patches still fit. Every file a patch touches must be byte-identical to the version the patch was written for. If upstream changed one, the build stops and saves the upstream diff so the patches can be ported by hand. That's how most of the per-kernel stories below begin.
  • An unpatched build matches Fedora. The code sections of the unpatched build must be identical to Fedora's shipped modules before a patched build is trusted.
  • The lid module's struct layouts still hold. The pin controller sources must match what the layouts were copied from.
  • Kernels that don't need a fix are marked. lid and pdc get NOT-NEEDED on kernels that don't need them, so nothing fails to load at boot.

Everything built for one kernel goes in fixes/<fix>/kernels/<uname -r>/, with SHA256SUMS that the installers verify along with the module vermagic and the live device tree.


Kernel update log

Kernel 7.2.15-200.fc44 (Fedora 44): the starting point

  • Speaker protection was developed and calibrated here and finished on 2026-11-10: 13 patches on 7.2.15. Eight of the reference's 10 patches applied cleanly and two were rebased by hand. The production 80 °C calibration went live and the thermal test passed.
  • The camera worked the same night, after the CCI freeze was fixed: ~30 fps through libcamera and PipeWire.
  • The Shut Down investigation started on the 7.2 source.
  • The lid still worked, because 7.2 didn't route the lid through the PDC yet.

Kernel 7.3.3-200.fc44: 7.3 arrives and the lid breaks

  • The lid stopped working on the first boot (2026-11-14). The new PDC wake routing only reports one edge. This led to the lid module.
  • Speaker: the series was rebased onto stable v7.3.3. Three patches were reworked by hand: 7.3 added new topology tokens (ours moved after them), rewrote the V/I channel-map loop and changed firmware handling in topology init. A new patch, 0014, carries the stage B 0 dB digital-volume cap, which had previously existed only in a binary. In four boots on this kernel, the log showed "speaker protection active: PA limit lifted, WSA digital volume limited to 0 dB".

Kernel 7.3.3-300.fc45: the move to Fedora 45

  • Same upstream 7.3.3, built against Fedora 45's headers. All 14 speaker patches applied unchanged. The patched builds were code-identical to the Fedora 44 builds that had already run with protection on, and the device tree was byte-identical.
  • The lid module was first built here.

Kernel 7.3.4-300.fc45: the first real port, and the rebuild gate earns its keep

  • The rebuild tool was verified here. poweroff and lid built cleanly (the pin controller sources were byte-identical to 7.3.3, still without the errata flag).
  • Speaker: the build stopped at the gate, because 7.3.4 changed four of the patched files. 13 patches carried over unchanged, but 0005 had to be re-ported by hand. 7.3.4 added its own fix for the module-config blob over-read, but it reads the blob size field as excluding the 16-byte header, while our topology writes it including the header. Unpatched, 7.3.4 would have rejected the speaker-protection blobs with -EINVAL in every topology. The port keeps the header-inclusive size plus upstream's extra guards.
  • Camera: stopped at the gate (CAMSS changed upstream), so the port was postponed.
  • pdc: not needed. This kernel's device tree still used the X1E80100 compatible.
  • Consolidation (2026-11-22): the separate fix folders became one tree with per-kernel bundles. A rebuild from the new tree reproduced the committed modules byte for byte.
  • Deep sleep was root-caused and fixed on this kernel (stuck sync_state(), spurious wakes), as was the dead USB-C xHCI behind the failed suspends (2026-11-24/25).

Kernel 7.3.6-300.fc45: upstream catches up, and a new regression

  • Source check: v7.3.6 is commit 1a0388846, matching kernel.org. poweroff and lid rebuilt with code identical to their 7.3.4 builds. The lid fix is still needed: upstream still lacks the errata flag.
  • Speaker: the gate stopped again, and this time it was good news. Upstream merged the change from our patch 0001 (the V/I sense channel setup), so 0001 was dropped. Patch 0013 overlapped with a new upstream line in apm_remove(), so both changes were kept, with our debugfs teardown first. git range-diff confirmed that the other 11 patches are unchanged.
  • Camera: the first 7.3 port. All 5 patches rebased with identical diffs. But the port revealed that since 7.3 the base device tree has its own camera clock controller node. The old overlay module added one too, and refused to load when it already existed, so the camera could never have worked on any 7.3 kernel. The overlay now references the base tree's node, which matched the old one property for property.
  • New regression: the erratic keyboard. Stable picked up half of the Purwa PDC series, which caused the interrupt storm. This led to the pdc fix, which was verified by hand to bring the storm to zero.

Where things stand (December 1, 2026, kernel 7.3.6)

Fix Status on 7.3.6
ec, socsleep, fnkeys Running (they don't depend on the kernel)
poweroff, lid Built, code-identical to the 7.3.4 builds
pdc Built and verified loaded by hand. Not yet enabled at boot
speaker Ported and built, passes the installer's checks. Not installed or booted on 7.3.6 yet
camera Ported and built. Not tested on the hardware yet

What's still not perfect

I'd rather be honest than make it sound done:

  • Speaker and camera on 7.3.6 still need their staged checks on the hardware. Until then, audio runs stock with the cap, and the camera isn't installed.
  • The IR camera (Windows Hello) isn't supported.
  • Camera image quality is basic: there's no tuning file for the sensor yet.
  • There are no automatic rebuilds on dnf upgrade. No DKMS or kernel-install hook yet; I run rebuild myself.
  • The monitor-in-USB-2.0-mode problem is worked around at suspend time, not prevented. Setting the monitor to its USB 3 mode should avoid it, but that's still unconfirmed.
  • The PDC change in 7.3.6 means the lid and suspend behaviour, which were tuned on 7.3.4, need a re-test. The odd wake sources may even have come from the PDC handling on older kernels.
  • Asleep, the chip wakes about 11 times a second, in step with the audio DSP. It still reaches ~90% deep-sleep residency, but there's more to gain.

The good news is that most of this list shrinks by itself. Upstream already absorbed one of my speaker patches. The pdc and lid fixes are written to retire themselves as soon as Fedora ships kernels that include the upstream fixes.

What I learned about doing this with AI

  • Give it the machine, not a description. The breakthroughs came from data: interrupt counters, qcom_stats, state_synced in sysfs, the DSDT and the kernel source at the exact tag. An AI that can run journalctl across past boots finds patterns I'd never have spotted, like every USB death coming seconds after the monitor's hub reached SuperSpeed.
  • It's very good at reading code I'd never have read. It found why xhci_suspend() returns -EINVAL, why the interconnect framework holds an INT_MAX floor on the sleep bucket and why stable ended up with half a patch series.
  • Make it prove things. "Code-identical to Fedora's module", "byte-identical pre-image" and "0 interrupts/s after loading" are claims you can check. "Should work" isn't.
  • Keep the human on anything risky. The speaker cap was lifted only after calibration, a thermal test and my explicit OK. Anything permanent went through a test script first.
  • Expect it to be wrong sometimes, and build the process so you find out. The staged tests, the build gates and the "not verified yet" notes in the READMEs exist for exactly that.

Credits

None of this exists in a vacuum. Thanks to:

  • x1e-speakers, the speaker-protection work this port is based on
  • linux-msm/audioreach-topology
  • The aarch64-laptops project, for the DSDT dump
  • The Purwa CAMSS, camera clock controller and camera DT series authors, and the OV02C10/CCI power-cycling work on the kernel mailing lists
  • The lid wakeirq_dual_edge_errata fix, tested on the Zenbook 14 UX3480QA
  • Prior Zenbook A14 work: biemster's zenbook-a14-ubuntu-fixes and sppidy's ASUS EC driver
  • Everyone upstreaming Snapdragon X support, which makes all of this a thin layer on top instead of a fork

If you have a Zenbook A14 or another Snapdragon X laptop and you're fighting the same things, I hope the root causes here save you some time, even if the exact fixes don't fit your machine.

← All writing