Repository navigation
linux-omarchy-aarch64: let the Snapdragon X1 laptops reach DDR sleep and CX collapse in suspend - #1315
Merged
ryanrhughes merged 3 commits intoOct 20, 2026
Conversation
turbineBMW
force-pushed
the
upstream/linux-omarchy-aarch64-sp11-sleep
branch
from
October 19, 2026 19:01
38e4a3e to
37f42b1
Compare
turbineBMW
marked this pull request as ready for review
October 19, 2026 19:01
ryanrhughes
force-pushed
the
upstream/linux-omarchy-aarch64-sp11-sleep
branch
from
October 20, 2026 03:00
37f42b1 to
ff7c9fa
Compare
ryanrhughes
enabled auto-merge (squash)
October 20, 2026 03:31
…d go qcom_battmgr takes the charger supplies' online state from the battery's status response and never announces it, so UPower kept the charger state it read at startup. Patch 2002, applied to the power-supply tree as 87fd20da8ca8, announces the change. Validated on a Surface Pro 11 with the patched module built against 7.2.8-7: OnBattery follows plugging in and out with Omarchy's udev rule turned off.
Brings the Microsoft Surface Pro 11 (X1E80100, microsoft,denali-oled) onto linux-omarchy-aarch64 as patches 2100-2169 from turbineBMW/linux sp11/n1x-7.2.8, with SPI HID, IMX681 and VD55G0 as modules, so it no longer needs its own kernel package. Changes that are tested only on the Surface Pro 11 are gated to microsoft,denali. Validated on a Surface Pro 11 with this patch set on 7.2.8: keyboard at the LUKS prompt, touch and pen, Wi-Fi, Bluetooth, speakers, all three cameras and the privacy LED, and suspend and resume.
…and CX collapse in suspend On 7.2.8 an X1 in suspend never collapses CX or puts DDR into self-refresh: gcc never reaches sync_state() because the GPU's GMU has no driver, the root ports stay in D0 so pcie-qcom keeps a DDR vote, the geni UART keeps its clocks, and the ADSP wakes about 100 times a second without the Modern Standby message Windows sends. Add Akhil P Oommen's GMU driver series with fixes, 7.3's geni UART force suspend, a Qualcomm-only backport of 7.3's root-port D3 change, and the ADSP Modern Standby notification from justririll/x1e-sleep. On a Surface Pro 11, CX, AOSS and DDR are asleep 99.9% of a one-hour deep suspend, about 0.23 W instead of 0.75 W. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryanrhughes
force-pushed
the
upstream/linux-omarchy-aarch64-sp11-sleep
branch
from
October 20, 2026 04:22
ff7c9fa to
2f67200
Compare
Contributor
This was referenced Oct 20, 2026
turbineBMW
added a commit
to turbineBMW/omarchy-pkgs
that referenced
this pull request
Oct 21, 2026
The Surface Pro 11 patches, the KIP pairing node and the IMX681 gain control among them, landed in linux-omarchy with omacom#1315, and linux-omarchy-n1x is gone. Point the README and the pairing tool at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
ryanrhughes
pushed a commit
that referenced
this pull request
Oct 21, 2026
…eyboard pairing and pen resume (#825) * Add surface-pro-11-support with Wi-Fi board data and audio The Surface Pro 11's WCN7850 reports generic identifiers that match no linux-firmware board record, so Wi-Fi cannot load board data. Extract Qualcomm's reference-design record from linux-firmware-atheros at build time, unmodified and checked by size and SHA-256, and ship it as board.bin until the Surface's own board data reaches linux-firmware. Stripping is disabled because the record is an ELF image. Build the AudioReach topology from pinned upstream source, checked against the binary validated on the device, and ship ALSA UCM routing for the speakers and microphones, derived from alsa-ucm-conf's Surface Pro 12in profile with its attribution and BSD-3-Clause licence kept. Hide the monochrome infrared sensor from camera pickers in WirePlumber, so apps see the front and back cameras only. The package is aarch64-only, tagged for the Qualcomm platform guard and published to edge. Validated with test.sh and a package build whose board data and topology are byte-identical to a working Surface Pro 11 installation, where Wi-Fi, speakers and microphones work and PipeWire offers exactly the front and back cameras. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Restore the Surface Pro 11's charge window after resume The battery firmware can lose its charge window across suspend while the kernel driver still reports the thresholds that were set. A sleep hook now writes those same thresholds back after resume. It never chooses a limit, leaving that to UPower or Omarchy's power settings, and does nothing when no limit is set. The kernel driver already restores the window when the battery-manager service restarts. Validated with test.sh and on a Surface Pro 11: a 75-80% window is written back unchanged after suspend and resume. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Cap the Surface Pro 11's CPU frequency per power profile The Surface's firmware power profile does not limit short CPU loads. A service now follows power-profiles-daemon and caps every cpufreq policy at 1.92 GHz in power-saver and 2.52 GHz in balanced, restoring the full range in performance. Validated with test.sh and on a Surface Pro 11: each profile sets its ceiling on all policies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Restart iptsd across suspend on the Surface Pro 11 The touch controller resets its firmware during resume ("Spontaneous FW reset!") and a running iptsd never recovers, leaving pen and touch dead until it is restarted. A sleep hook now stops the active iptsd instances before sleep and starts them again one second after resume. Validated with test.sh and on a Surface Pro 11: the pen works after suspend and resume. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Take the Surface Pro 11's Wi-Fi and Bluetooth addresses from surface-snapdragon-addresses The WCN7850's Wi-Fi interface gets a per-boot placeholder address and its Bluetooth controller stays unconfigured until it is given a public address. surface-snapdragon-addresses sets both from the MacAddressEmulationAddress UEFI variable, the way Windows does, and the Surface Laptop 8 shares it, so this package depends on it instead of carrying its own copy. Validated with the package's test.sh and a makepkg build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Give stock libcamera the Surface Pro 11 front camera's black level Ship the IMX681 simple-IPA tuning file where libcamera looks for per-sensor tuning, in place of the copy built into the patched libcamera-surface-pro-11. With the linear gain control now in linux-omarchy-n1x's IMX681 driver, stock libcamera drives the front camera and the libcamera fork is no longer needed. Validated on a Surface Pro 11 with Arch's libcamera 0.7.2-4, which loaded this file and gave the same front camera picture as the patched libcamera, before and after suspend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop the Surface Pro 11 CPU cap service omarchy-power-profiles-daemon caps the CPU clusters on every Snapdragon X laptop now (#1029), so the SP11's own service would only fight it over scaling_max_freq. The python, python-dbus, python-gobject and power-profiles-daemon dependencies were only there for it. Validated with test.sh and a clean makepkg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pair the Surface Flex Keyboard over Bluetooth when it is attached Attaching the keyboard runs surface-pro-11-flex-autopair: with no bond, or a bond that stopped working because another host re-keyed it, it hands the keyboard the tablet's address and a fresh key over the connector and pairs with LE legacy out-of-band pairing, as Windows does. A working bond is left alone. Detaching runs surface-pro-11-flex-reconnect, which connects the keyboard over Bluetooth and marks the bond for re-pairing if it never connects. surface-pro-11-flex-pair pairs by hand. Pairing turns the adapter pairable for the pair only, since the kernel stores the keys only while it is bondable and Omarchy leaves Pairable off. It also stores a 7.5-11.25 ms connection interval for the keyboard, which never asks for one; at Linux's default its touchpad reports arrive in bursts. Validated on a Surface Pro 11 with linux-omarchy-n1x 7.2.8-7 (#975's KIP pairing node and LE legacy OOB pairing): attaching paired a keyboard bonded to another host, it typed over Bluetooth when detached, reattaching left the working bond alone, attaching it after a Surface Pro 12 had re-keyed it took it back in about 25 s, and the touchpad moved smoothly over Bluetooth with the stored interval. test.sh covers the attach and detach decisions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Arm the Surface Pro 11's lid wake only when the lid is closed Now that linux-omarchy lets the SoC collapse CX in suspend, the lid line (gpio2) shows a false edge about 0.3 s after the collapse when the cover is open. Lid wake is on by default, so every suspend with the cover open wakes the machine at once. A sleep hook now arms lid wake before suspend only when logind reports the lid closed, and turns it off otherwise; an unknown lid state counts as open. Suspending with the cover closed keeps the default, so opening the cover still wakes the machine, and the power button wakes it either way. Validated with test.sh and on a Surface Pro 11 on linux-omarchy 7.2.8: with the cover open the machine stays asleep (5 h overnight, CX collapsed 99.9 %) and wakes on the power button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Name the Surface Pro 11's kernel linux-omarchy in surface-pro-11-support The Surface Pro 11 patches, the KIP pairing node and the IMX681 gain control among them, landed in linux-omarchy with #1315, and linux-omarchy-n1x is gone. Point the README and the pairing tool at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop the channels key from surface-pro-11-support The release ring replaced channels on master (61ff008) and metadata validation now refuses the key. The package publishes to edge on merge like every other package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop a stray source clone from surface-pro-11-support The lid wake commit picked up makepkg's audioreach-topology clone by mistake. In CI it lands in the build directory, and makepkg refuses it because it is not a clone of the source URL, so the build fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
4 tasks done
|
Thanks for the detailed write-up. One question about the Surface Pro 11 validation (99.9 % CX/AOSS/DDR, ~0.25 W): was Linux running at EL1 under Gunyah, as a stock Omarchy install boots, or at EL2 through slbounce? I ask because the other X1E reports I can find only reach CXSD/AOSD at EL2: an SP11 owner in dwhinham/archiso-aarch64-sp11#38 measured 1.06 W with no CXSD at EL1 and 0.26 W at EL2, and on linux-arm-msm Michael Burch's XPS 13 at EL1 stays at aosd/cxsd 0 with every APPS vote zeroed. My Galaxy Book4 Edge (NP940XMA) collapses at EL2 but didn't at EL1 when I tried in October. If yours was at EL1, these four fixes are what I'd try next there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #975, which this branch includes (and #975 sits on #1030), so until both land this diff shows their commits too. Only the last commit is new here.
On 7.2.8 an X1 in suspend never reaches its deepest state, even with the PDC and idle-state backports from #975: the CX rail never collapses and DDR never goes into self-refresh. On the Surface Pro 11 that is 0.75 W asleep, about 36% of the battery a day. This adds
2170-2179and takespkgrelto18, leaving17to #1277 (the Yoga Slim 7x webcam, also on #975); whichever lands second rebases.What kept it awake, and the fix for each:
sync_state(). The GPU's GMU node has no driver, so fw_devlink keeps gcc waiting for it, and until then genpd keeps every power domain that was on at boot powered, including ones nothing uses. Those hold CX up.2170-2174are Akhil P Oommen's "drm/msm: Attach a driver to the GMU" series (RFT;2174needed a small port to 7.2.8), and2178fixes three things I found reviewing it: the GMU was added to the match list even without a GPU, an empty match list could reach the component framework, and the GMU lock was initialised only after the GPU code could take it.2177backports that limited to Qualcomm PCIe controllers, so the N1x, GB10 and every other controller keep 7.2.8's behaviour. It goes away with 7.3.2175is 7.3's geni force suspend (d0cd9c8d0fd5).2176sends the same message.2179drops an unused include and documents why the send has to block: the ADSP queues no receive buffer on this channel in advance, so glink must ask for one and wait. I triedrpmsg_trysend()first, and it failed with-EBUSYat suspend, leaving the ADSP waking about 45 times a second. New module:QCOM_ADSP_PWR_LMTS.About
2176: it is Kirill's driver from github.com/justririll/x1e-sleep (0f3f55b), GPL-2.0 by its SPDX header, carried with him as author and the source linked. His repo has noSigned-off-by, so the README lists it with2154and2165as carried without the author's sign-off. I've asked him for it, and whether he wants to send it upstream himself, in justririll/x1e-sleep#2. Nothing here is going to mainline in the meantime.Patches
2170-2179come from github.com/turbineBMW/linuxsp11/n1x-7.2.8-sleep, on top of #975's2169.Validation, on a Surface Pro 11 (X1E80100, OLED), 2026-10-19, booted from this recipe with the package's own device tree: gcc, the interconnects and the other providers reach
sync_state()on their own at boot, the GPU binds with its GMU, and the ADSP takes the standby message on the way into and out of suspend. In a 10.6-minute deep suspend on battery, CX, AOSS and DDR were asleep 99.9% of the time with five exits, and the battery gauge read about 0.25 W; an earlier one-hour run of2170-2177measured 0.23 W, against 0.75 W with none of them asleep. Resume by the power key with the display, NVMe, Wi-Fi, Bluetooth and audio back, and no kernel warnings. Not booted on another X1 laptop or an N1x. On the N1x the GMU, geni and ADSP drivers never bind, and the root-port check finds no Qualcomm controller.To check another X1 laptop (as root):
cat /sys/bus/platform/devices/100000.clock-controller/state_syncedshould read 1, and/sys/kernel/debug/qcom_stats/cxsdshould count up across a suspend.