Repository navigation
Microsoft Surface Laptop 7 15" (Snapdragon X Elite) — hardware support, open issues and testing #18966
Replies: 13 comments 8 replies
|
Everything from "What I'd like to send" is now open:
The omarchy-pkgs ones are drafts so they don't publish themselves before someone who knows those packages has looked. The three device tree changes each apply to One correction to the post above: the power profiles service is not specific to this laptop, and it has a clear cause, an ordering cycle with |
|
Second-day update, with two items moved out of "not tested". Headphone jack: broken on a stock install, fixed by an audio profile. Plugging in headphones gives no sound, because the audio system never offers a headphone output. The jack and the codec are fine. The laptop gets the ThinkPad T14s's UCM profile, which has three DisplayPort outputs where this sound card has two; the third has no jack control, always reads as available, and keeps the card on a profile without the headphones. With a profile that drops it, headphones and the headset microphone work and the output follows the plug. omacom/omarchy-pkgs#2819 (draft). It also removes the Battery drain asleep: 0.347 W. Overnight on battery, lid closed, Also confirmed since the first post:
Still not tested: external display and its audio, USB-C charging and data per port, USB-A storage, microSD. |
|
Thanks, this is a great write-up. Yes please to 1, 2 and 4.
I've taken 3. The firmware recipes are generated from arewearmyet's firmware table, so it gets fixed there. The 404 is Microsoft replacing the MSI with 26.101.6391.0. omacom/omarchy-pkgs#2821 follows the new one, keeps every installed file byte-identical, and adds the laptop's own 5 is done: arewearmyet's 15" entry now carries your report. For 6, please open the two issues. |
Touchpad: a usable setup while the physical click is missingUnder iptsd this laptop's touchpad does not register a physical press (linux-surface/iptsd#192), so clicking is by tap and press-and-drag is impossible. After a day of stray selections and pastes, this is what I settled on. It goes in hl.config({
input = {
touchpad = {
-- Rest three fingers and move to drag or select.
drag_3fg = 1,
-- Taps only click: tap-then-move no longer starts a drag.
tap_and_drag = false,
},
},
})
-- Three fingers drag now, so Omarchy's three-finger swipes move to four.
for _, direction in ipairs({ "left", "right", "up", "down" }) do
hl.gesture({ fingers = 3, direction = direction, action = "unset" })
end
hl.gesture({ fingers = 4, direction = "left", action = "unset" })
hl.gesture({ fingers = 4, direction = "right", action = "unset" })
hl.gesture({ fingers = 4, direction = "down", action = "unset" })
hl.gesture({ fingers = 4, direction = "left", action = function() hl.dispatch(hl.dsp.focus({ workspace = "r-1" })) end })
hl.gesture({ fingers = 4, direction = "right", action = function() hl.dispatch(hl.dsp.focus({ workspace = "r+1" })) end })
hl.gesture({ fingers = 4, direction = "up", action = "special", workspace_name = "qconsole" })
-- A three-finger tap is a middle click, which pastes the last selection.
-- Swallow it from the touchpad only; a mouse's middle button still works.
hl.bind("mouse:274", function() end, {
device = {
inclusive = true,
list = { "iptsd-virtual-touchpad-045e:0c77", "spi-045e:0c77-touchpad" },
},
})
-- Paste the last selection on purpose: four fingers down.
hl.gesture({ fingers = 4, direction = "down", action = function()
hl.dispatch(hl.dsp.exec_cmd("wl-paste --primary --no-newline | wtype -"))
end })What it costs: the three-finger menu swipe, four-finger "move window to the next workspace" and four-finger fullscreen, all of which keep their keyboard shortcuts. The gesture layout is my taste; the parts I'd call fixes are Notes from getting there:
The two generic pieces are offered as commented examples for the Prepared with Claude Fable 5.2. |
|
Awesome. Thanks for the follow up!
…On Sun, Nov 15, 2026 at 12:54 PM Birk Skyum ***@***.***> wrote:
Everything is merged now, thanks for all of it:
- linux-omarchy-dtbs 7.3-31: touchscreen, front camera and Iris (#2827
<#2827>, your three patches)
- microsoft-surface-laptop-7-firmware 20261115-1: the new MSI and
qcvss8380.mbn (#2821 <#2821>)
- alsa-ucm-conf 5: the two-DisplayPort profile (#2819
<#2819>)
- iptsd 4: the boot-time retry (#2798
<#2798>)
- omarchy: the board setup, with the unlock drivers, addresses and
iptsd (#18967 <#18967>)
The packages are on edge already. The board setup goes out with the next
hourly omarchy-dev build, around 18:35 UTC. To check on your laptop, run pacman
-Si omarchy-dev | grep Version: r7885 or later has it. Then omarchy update
installs everything, and its migration sets up the board and rebuilds the
boot image, so reboot afterwards. #18969
<#18969> is closed, since DHH's
#18978 <#18978> fixed the same
cycle.
—
Reply to this email directly, view it on GitHub
<#18966?email_source=notifications&email_token=AEMXHAFD3FTLN2RJ5CNQZLL5ZHUTZA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJWGM3TKOJXUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-19637597>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMXHAFDPSYB2TGURHSSUGT5ZHUTZAVCNFSNUABIKJSXA33TNF2G64TZHM4TSNBQHEZTCNRWHNCGS43DOVZXG2LPNY5TCMJTGEZDQNRQUF3AE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Update, end of day twoEverything in the first post's list has landed, thanks to @birkskyum and the maintainers. Running an up-to-date edge install now (r7886, kernel 7.3-63, Newly fixed here, sent upstream
Both input fixes are installed here as a locally built Tested since, working
Open
Not tested yetA USB 3 device, microSD, Surface Connect charging, the fan under load, hardware decode inside Chrome and mpv, the pen. One correction to my own notes, in case anyone searches for it: I first thought the display audio profile did not follow the cable. It does. A profile I had set by hand was saved by WirePlumber and took precedence. Prepared with Claude Fable 5.2. |
|
Battery on the Surface Laptop 7 15": what Linux shows, and what the Surface controller knows A finding, not a fix, in case it saves someone the same digging.
So the capacity and charge figures are right, and the percentage can be trusted. The cycle count is always 0 and the model and maker are generic. Windows showed 203 cycles on this laptop the day before, which fits SAM's 204. The SAM column comes from asking the controller directly with the four read-only requests the kernel's Why not just switch to SAM's battery? Because the two sources can't both be the battery, and each has something the other lacks:
For a laptop used every day I'm keeping the charge limit, so nothing changes here. If you want the cycle count, it is one read-only request to SAM away. Open question: Under Windows the Surface app offers an 80% limit on this laptop (reportedly since an August 2025 firmware update). Whether that goes through SAM or through the Qualcomm service I don't know. The SAM battery commands that are publicly documented don't include one, and I'm not going to send undocumented commands to the controller that manages charging. If anyone knows which driver in Microsoft's package implements it, that would settle whether SAM could offer both. Kernel 7.3.0-63, Surface UEFI 175.361.235, SAM 27.101.139.0. Prepared with Claude Fable 5.2. |
|
Battery, part two: Windows reads this laptop's battery from the Surface controller, and a way to get the cycle count on Linux today This answers the open question in my note above, and ends with a question for the maintainers. What Microsoft's driver package shows. I read the Surface Laptop 7 driver package statically (the MSI
Sent to the laptop: that one extra read. SAM answered So there are two charge-limit mechanisms on this laptop: the Qualcomm battery service, which Linux uses and which works (charging stops at 80% and resumes below 75% here), and SAM's own, which Windows uses and whose set command isn't public. Cycle count on Linux today, without a second battery. Since only the cycle count and the pack's identity are missing, I left the kernel's battery alone and read those from SAM on the side:
UPower still sees one battery and the charge limit is untouched. What it doesn't do: UPower and the bar's tooltip still show 0 cycles, because they read the kernel. I looked at fixing that in the kernel with a power-supply extension, but Installed here on kernel 7.3.0-66 today and run once; it hasn't been through a reboot yet, so treat it as a recipe, not a tested package. The files: surface-laptop-7-battery-info (root, /usr/local/lib/surface-laptop-7/)#!/usr/bin/env python3
"""Publish what the Surface Aggregator (SAM) knows about the battery pack.
Linux reads this laptop's battery through the Qualcomm battery service, which
has the charge limit but reports a placeholder identity and a cycle count of
0. SAM has the pack's own data. This sends SAM ONE read-only request, the
"static information" read the kernel's surface_battery driver uses on other
Surfaces (category 0x02, command 0x02), and writes the result, without the
serial number, to /run/surface-laptop-7-battery/info for battery-health to
show. It never sends anything that sets or changes state. Needs root (the SAM
device node); run by surface-laptop-7-battery-info.service.
"""
import ctypes, fcntl, os, struct, subprocess, sys, time
SSAM_CDEV_REQUEST = 0xC028A501 # _IOWR(0xA5, 1, struct ssam_cdev_request), 40 bytes
BIX_FORMAT = "<B15I21s11s5s21s" # struct spwr_bix, packed, 119 bytes
OUT_DIR = "/run/surface-laptop-7-battery"
def read_bix():
dev = "/dev/surface/aggregator"
loaded_here = False
if not os.path.exists(dev):
subprocess.run(["modprobe", "surface_aggregator_cdev"], check=True)
loaded_here = True
for _ in range(50):
if os.path.exists(dev):
break
time.sleep(0.1)
try:
buf = ctypes.create_string_buffer(119)
# category BAT, target 1, command 2, instance 1, has-response, no payload
req = bytearray(struct.pack("<BBBBHhQH6xQH6x", 0x02, 0x01, 0x02, 0x01, 0x01, 0,
0, 0, ctypes.addressof(buf), len(buf)))
fd = os.open(dev, os.O_RDWR)
try:
fcntl.ioctl(fd, SSAM_CDEV_REQUEST, req, True)
finally:
os.close(fd)
status = struct.unpack_from("<h", req, 6)[0]
length = struct.unpack_from("<H", req, 32)[0]
if status != 0 or length != 119:
raise RuntimeError(f"SAM answered status {status}, {length} bytes")
return buf.raw
finally:
if loaded_here:
subprocess.run(["modprobe", "-r", "surface_aggregator_cdev"], check=False)
def main():
if os.geteuid() != 0:
sys.exit("Run as root (the service does).")
v = struct.unpack(BIX_FORMAT, read_bix())
text = lambda b: b.split(b"\0")[0].decode("ascii", "replace").strip()
info = {
"cycle_count": v[8], "design_capacity_mwh": v[2], "full_charge_capacity_mwh": v[3],
"design_voltage_mv": v[5], "model": text(v[16]), "type": text(v[18]), "maker": text(v[19]),
"read_at": int(time.time()),
}
if v[1] != 0: # power unit: 0 = mW/mWh
info = {k: val for k, val in info.items() if "capacity" not in k}
os.makedirs(OUT_DIR, mode=0o755, exist_ok=True)
tmp = f"{OUT_DIR}/.info.{os.getpid()}"
with open(tmp, "w") as f:
for k, val in info.items():
f.write(f"{k}={val}\n")
os.chmod(tmp, 0o644)
os.replace(tmp, f"{OUT_DIR}/info")
main()battery-health (/usr/local/bin/)#!/bin/bash
# Battery health on the Surface Laptop 7: cycle count and identity from the
# Surface controller (published by surface-laptop-7-battery-info.service),
# charge and limit from Linux's own battery. No root.
info=/run/surface-laptop-7-battery/info
bat=/sys/class/power_supply/qcom-battmgr-bat
declare -A v
[[ -r $info ]] && while IFS='=' read -r k val; do v[$k]=$val; done <"$info"
full=$(cat $bat/energy_full); design=$(cat $bat/energy_full_design); now=$(cat $bat/energy_now)
printf 'Charge %d%% (%s)\n' $(( (now * 100 + full / 2) / full )) "$(cat $bat/status)"
printf 'Health %d%% of design (%.2f of %.2f Wh)\n' $(( (full * 100 + design / 2) / design )) "$(( full / 10000 ))e-2" "$(( design / 10000 ))e-2"
if [[ -n ${v[cycle_count]:-} ]]; then
printf 'Cycles %s\n' "${v[cycle_count]}"
printf 'Pack %s %s, model %s\n' "${v[maker]}" "${v[type]}" "${v[model]}"
printf ' (read from the Surface controller %s)\n' "$(date -d "@${v[read_at]}" '+%Y-%m-%d %H:%M')"
else
echo 'Cycles not available: surface-laptop-7-battery-info.service has not run'
fi
printf 'Charge limit start below %s%%, stop at %s%%\n' "$(cat $bat/charge_control_start_threshold)" "$(cat $bat/charge_control_end_threshold)"surface-laptop-7-battery-info.service and .timer (/etc/systemd/system/)[Unit]
Description=Read the battery pack's cycle count and identity from the Surface controller
ConditionPathExists=/sys/bus/surface_aggregator
[Service]
Type=oneshot
ExecStart=/usr/local/lib/surface-laptop-7/surface-laptop-7-battery-info
[Unit]
Description=Refresh the battery pack's cycle count at boot and daily
[Timer]
OnBootSec=1min
OnUnitActiveSec=1d
[Install]
WantedBy=timers.targetQuestion for the maintainers. The Surface Laptop 8 and the Surface Pro 11 each have a Kernel 7.3.0-66, Surface UEFI 175.361.235, SAM 27.101.139.0. Prepared with Claude Fable 5.2. |
|
Fan on the Surface Laptop 7 15": part of its thermal throttling is a fan that starts a minute late, and it can be fixed The Snapdragon X Surfaces have a reputation for being thermally limited: put them under load and the chip runs into its temperature limit and slows down. That was my experience with this laptop under Windows too, so I set out to measure it under Omarchy. Some of it is simply a thin chassis. But part of it turned out to be a defect in the fan control that can be measured and worked around: the embedded controller decides when to start the fan from sensors that lag the chip by 40 to 60 seconds, so every heavy load spends its first minute at the temperature limit with the fan off. Under Windows a Microsoft policy driver steps in from the chip's side; under Linux nothing does. Below: the measurements, what Windows does, a workaround that starts the fan on time, and a kernel patch behind it. The workaround writes to the embedded controller, so please read the warning before copying it. Symptom. Put every core to work and the chip is at 95 to 97 C within about two seconds, but the fan stays at 0 rpm for 40 to 60 seconds. During that time the CPU's delivered frequency ( Cause. The fan belongs to the Surface controller (SAM), and SAM decides from its own board thermistors, not from the chip.
What Windows does. I read Microsoft's driver package for this model statically (nothing was run). Windows does not leave the fan to SAM alone. A policy framework ("SMF") reads the SoC's temperatures and writes fan parameters to SAM in target category Test. Sending category Effect. Same loads, from the same cool start (hottest sensor at or below 47 C), Performance mode, kernel 7.3.0-66; the CPU load is one busy loop per core, the GPU load glmark2's terrain scene off screen at 7680x4320:
So the gain is about 10% more work over the first minute of a full CPU load, and the GPU stays under its 95 C limit in a combined load. It is not a higher ceiling: once SAM's own fan handling catches up the two converge, and even with the fan at 3400 rpm from the start the cores sit at 96 to 97 C at about 2.2 GHz. GPU-only work heats the chip slowly enough that nothing changes. One run of each, so treat the percentages as rough. The workaround. A small root service reads the hottest of the 50 on-chip sensors once a second and sets the floor: 3000 rpm after 3 s at 75 C or more, 3400 rpm after 3 s at 85 C or more, back to 0 after 20 s below 60 C. It clears the floor when it stops, and is stopped before sleep and started again after. It has run here since it was installed, about 21 hours, through several reboots and a sleep, with no errors from SAM; over an ordinary working day it set a floor 18 times. The thresholds are my choice, not Microsoft's.
surface-laptop-7-fan-floor (Python, runs as root)#!/usr/bin/env python3
"""Start the Surface Laptop 7's fan when the chip is hot, not a minute later.
The fan is run by the Surface controller (SAM) from a board sensor that lags
the processor by 40 to 60 s, so a heavy load spends its first minute at the
thermal limit with no airflow. Under Windows, Microsoft's policy driver gives
the fan a minimum speed when things get hot. This does the same: it watches
the chip's own sensors (CPU, GPU and the rest, read live from the kernel) and
tells SAM a fan floor, with the request Microsoft's driver uses (category
0x05, command 0x0b, fan 1). It only ever writes 0, 3000 or 3400 rpm, the
values in Microsoft's policy for this model. Above the floor SAM still runs
its own curve.
Rules (every second, on the hottest on-chip sensor):
- at or above HOT (85 C) for HOLD_ON (3 s): floor 3400;
- at or above WARM (75 C) for HOLD_ON: floor 3000;
- below COOL (60 C) for HOLD_OFF (20 s): floor 0, the fan is SAM's again.
Short spikes, which this chip produces within a tenth of a second, do not
start the fan. On exit, and before sleep (the unit stops it), the floor is
set back to 0.
surface-laptop-7-fan-floor run (root; the service does)
surface-laptop-7-fan-floor --reset set the floor to 0 and exit
surface-laptop-7-fan-floor --selftest check the rules, touching nothing
"""
import ctypes, fcntl, glob, os, signal, struct, subprocess, sys, time
SSAM_CDEV_REQUEST = 0xC028A501
DEV = "/dev/surface/aggregator"
WARM, HOT, COOL = 75.0, 85.0, 60.0
HOLD_ON, HOLD_OFF = 3, 20
ALLOWED = (0, 3000, 3400)
class Rules:
"""Decides the floor from one temperature a second."""
def __init__(self):
self.floor = 0; self.warm = self.hot = self.cool = 0
def step(self, temp):
self.hot = self.hot + 1 if temp >= HOT else 0
self.warm = self.warm + 1 if temp >= WARM else 0
self.cool = self.cool + 1 if temp < COOL else 0
if self.hot >= HOLD_ON:
self.floor = 3400
elif self.warm >= HOLD_ON and self.floor < 3000:
self.floor = 3000
elif self.cool >= HOLD_OFF:
self.floor = 0
return self.floor
def selftest():
def run(seq):
r = Rules(); return [r.step(t) for t in seq]
assert run([45] * 5 + [96, 96] + [45] * 5)[-1] == 0, "a 2 s spike must not start the fan"
assert run([45] * 2 + [96] * 3)[-1] == 3400
assert run([45] * 2 + [78] * 3)[-1] == 3000
assert run([96] * 3 + [78] * 30)[-1] == 3400, "no step down while still warm"
assert run([96] * 3 + [65] * 60)[-1] == 3400, "held between COOL and WARM"
assert run([96] * 3 + [55] * 19)[-1] == 3400 and run([96] * 3 + [55] * 20)[-1] == 0
assert run([96] * 3 + [55] * 10 + [70] + [55] * 19)[-1] == 3400, "cool-down restarts after a bump"
assert all(f in ALLOWED for f in run([45, 96, 96, 96, 78, 55] * 40))
p = ctypes.create_string_buffer(struct.pack("<H", 3400), 2)
r = request(p)
assert len(r) == 40 and bytes(r[:6]) == bytes([5, 1, 0x0b, 1, 0, 0]) and struct.unpack_from("<H", r, 16)[0] == 2
print("selftest ok")
def request(payload):
return bytearray(struct.pack("<BBBBHhQH6xQH6x", 0x05, 0x01, 0x0b, 0x01, 0, 0,
ctypes.addressof(payload), len(payload), 0, 0))
def set_floor(fd, rpm):
if rpm not in ALLOWED:
raise ValueError(rpm)
payload = ctypes.create_string_buffer(struct.pack("<H", rpm), 2)
r = request(payload)
fcntl.ioctl(fd, SSAM_CDEV_REQUEST, r, True)
status = struct.unpack_from("<h", r, 6)[0]
if status:
raise OSError(f"SAM status {status}")
def open_sam():
if not os.path.exists(DEV):
subprocess.run(["modprobe", "surface_aggregator_cdev"], check=True)
for _ in range(50):
if os.path.exists(DEV):
break
time.sleep(0.1)
return os.open(DEV, os.O_RDWR)
def zones():
# Every sensor on the chip itself; not the battery, PMICs or SAM's board sensors.
keep = ("cpu", "gpu", "nsp", "video", "camera", "mem", "aoss")
out = []
for z in glob.glob("/sys/class/thermal/thermal_zone*"):
try:
if open(z + "/type").read().startswith(keep):
out.append(open(z + "/temp", "rb", buffering=0))
except OSError:
pass
return out
def hottest(files):
best = -273.0
for f in files:
try:
f.seek(0); best = max(best, int(f.read()) / 1000)
except (OSError, ValueError):
pass
return best
def main():
if "--selftest" in sys.argv:
return selftest()
if os.geteuid() != 0:
sys.exit("Run as root.")
fd = open_sam()
if "--reset" in sys.argv:
set_floor(fd, 0); os.close(fd)
return
files = zones()
if not files:
sys.exit("No on-chip temperature sensors found.")
def stop(*_):
raise SystemExit(0)
signal.signal(signal.SIGTERM, stop); signal.signal(signal.SIGINT, stop)
rules, current = Rules(), None
print(f"watching {len(files)} sensors; floor 3000 at {WARM:.0f} C, 3400 at {HOT:.0f} C, off below {COOL:.0f} C for {HOLD_OFF} s", flush=True)
try:
while True:
temp = hottest(files)
want = rules.step(temp)
if want != current:
set_floor(fd, want)
print(f"floor {want} rpm (hottest sensor {temp:.0f} C)", flush=True)
current = want
time.sleep(1)
finally:
try:
set_floor(fd, 0)
print("floor 0 rpm (stopping)", flush=True)
finally:
os.close(fd)
main()systemd units# surface-laptop-7-fan-floor.service
[Unit]
Description=Start the Surface Laptop 7's fan when the chip is hot
ConditionPathExists=/sys/bus/surface_aggregator
# Stopped before sleep and started again after, so no floor is left set while asleep.
Before=sleep.target
Conflicts=sleep.target
[Service]
ExecStart=/usr/local/lib/surface-laptop-7/surface-laptop-7-fan-floor
ExecStopPost=/usr/local/lib/surface-laptop-7/surface-laptop-7-fan-floor --reset
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
# surface-laptop-7-fan-floor-resume.service
[Unit]
Description=Restart the Surface Laptop 7 fan service after sleep
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl start surface-laptop-7-fan-floor.service
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.targetThe proper fix: a kernel patch. A daemon writing to the controller is a stopgap. I have a patch for surface_fan: fan1_min (against v7.3)--- base/surface_fan.c 2026-11-16 01:32:53.421069561 -0500
+++ mod/surface_fan.c 2026-11-16 01:33:25.914441974 -0500
@@ -1,14 +1,17 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Surface Fan driver for Surface System Aggregator Module. It provides access
- * to the fan's rpm through the hwmon system.
+ * to the fan's rpm and to its minimum rpm through the hwmon system.
*
* Copyright (C) 2023 Ivor Wanders <ivor@iwanders.net>
*/
#include <linux/hwmon.h>
#include <linux/kernel.h>
+#include <linux/minmax.h>
#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/pm.h>
#include <linux/surface_aggregator/device.h>
#include <linux/types.h>
@@ -18,15 +21,59 @@
.command_id = 0x01,
});
+/*
+ * Minimum fan speed in rpm. The EC runs the fan on its own curve from its own
+ * (slow) board sensors and never below this floor; 0 leaves the fan to the EC
+ * alone. Windows sets it from its thermal policy, typically 0 or a few
+ * thousand rpm. The EC offers no request to read it back.
+ */
+SSAM_DEFINE_SYNC_REQUEST_CL_W(__ssam_fan_rpm_min_set, __le16, {
+ .target_category = SSAM_SSH_TC_FAN,
+ .command_id = 0x0b,
+});
+
+/* The range Microsoft's policy files give for the fan speed channels. */
+#define SURFACE_FAN_RPM_MAX 10000
+
+struct surface_fan {
+ struct ssam_device *sdev;
+ struct mutex lock; /* protects min_rpm against concurrent writes */
+ u16 min_rpm; /* last value written, the EC cannot be asked */
+};
+
+static int surface_fan_rpm_min_set(struct surface_fan *fan, u16 rpm)
+{
+ __le16 value = cpu_to_le16(rpm);
+
+ return ssam_retry(__ssam_fan_rpm_min_set, fan->sdev, &value);
+}
+
+static umode_t surface_fan_hwmon_is_visible(const void *data,
+ enum hwmon_sensor_types type,
+ u32 attr, int channel)
+{
+ if (type == hwmon_fan && attr == hwmon_fan_min)
+ return 0644;
+
+ return 0444;
+}
+
static int surface_fan_hwmon_read(struct device *dev,
enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
{
- struct ssam_device *sdev = dev_get_drvdata(dev);
+ struct surface_fan *fan = dev_get_drvdata(dev);
int ret;
__le16 value;
- ret = __ssam_fan_rpm_get(sdev, &value);
+ if (attr == hwmon_fan_min) {
+ mutex_lock(&fan->lock);
+ *val = fan->min_rpm;
+ mutex_unlock(&fan->lock);
+ return 0;
+ }
+
+ ret = __ssam_fan_rpm_get(fan->sdev, &value);
if (ret)
return ret;
@@ -35,14 +82,36 @@
return 0;
}
+static int surface_fan_hwmon_write(struct device *dev,
+ enum hwmon_sensor_types type, u32 attr,
+ int channel, long val)
+{
+ struct surface_fan *fan = dev_get_drvdata(dev);
+ int ret;
+
+ if (type != hwmon_fan || attr != hwmon_fan_min)
+ return -EOPNOTSUPP;
+
+ val = clamp_val(val, 0, SURFACE_FAN_RPM_MAX);
+
+ mutex_lock(&fan->lock);
+ ret = surface_fan_rpm_min_set(fan, val);
+ if (!ret)
+ fan->min_rpm = val;
+ mutex_unlock(&fan->lock);
+
+ return ret;
+}
+
static const struct hwmon_channel_info *const surface_fan_info[] = {
- HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT),
+ HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_MIN),
NULL
};
static const struct hwmon_ops surface_fan_hwmon_ops = {
- .visible = 0444,
+ .is_visible = surface_fan_hwmon_is_visible,
.read = surface_fan_hwmon_read,
+ .write = surface_fan_hwmon_write,
};
static const struct hwmon_chip_info surface_fan_chip_info = {
@@ -52,16 +121,77 @@
static int surface_fan_probe(struct ssam_device *sdev)
{
+ struct surface_fan *fan;
struct device *hdev;
+ int ret;
+
+ fan = devm_kzalloc(&sdev->dev, sizeof(*fan), GFP_KERNEL);
+ if (!fan)
+ return -ENOMEM;
+
+ fan->sdev = sdev;
+ ret = devm_mutex_init(&sdev->dev, &fan->lock);
+ if (ret)
+ return ret;
+
+ ssam_device_set_drvdata(sdev, fan);
hdev = devm_hwmon_device_register_with_info(&sdev->dev,
- "surface_fan", sdev,
+ "surface_fan", fan,
&surface_fan_chip_info,
NULL);
return PTR_ERR_OR_ZERO(hdev);
}
+/* Hand the fan back to the EC: a floor must not outlive whoever set it. */
+static void surface_fan_release(struct surface_fan *fan)
+{
+ mutex_lock(&fan->lock);
+ if (fan->min_rpm)
+ surface_fan_rpm_min_set(fan, 0);
+ mutex_unlock(&fan->lock);
+}
+
+static void surface_fan_remove(struct ssam_device *sdev)
+{
+ struct surface_fan *fan = ssam_device_get_drvdata(sdev);
+
+ surface_fan_release(fan);
+ mutex_lock(&fan->lock);
+ fan->min_rpm = 0;
+ mutex_unlock(&fan->lock);
+}
+
+static void surface_fan_shutdown(struct device *dev)
+{
+ surface_fan_release(dev_get_drvdata(dev));
+}
+
+/* No floor while asleep; put it back on resume. */
+static int surface_fan_suspend(struct device *dev)
+{
+ surface_fan_release(dev_get_drvdata(dev));
+
+ return 0;
+}
+
+static int surface_fan_resume(struct device *dev)
+{
+ struct surface_fan *fan = dev_get_drvdata(dev);
+ int ret = 0;
+
+ mutex_lock(&fan->lock);
+ if (fan->min_rpm)
+ ret = surface_fan_rpm_min_set(fan, fan->min_rpm);
+ mutex_unlock(&fan->lock);
+
+ return ret;
+}
+
+static DEFINE_SIMPLE_DEV_PM_OPS(surface_fan_pm_ops, surface_fan_suspend,
+ surface_fan_resume);
+
static const struct ssam_device_id ssam_fan_match[] = {
{ SSAM_SDEV(FAN, SAM, 0x01, 0x01) },
{},
@@ -70,10 +200,13 @@
static struct ssam_device_driver surface_fan = {
.probe = surface_fan_probe,
+ .remove = surface_fan_remove,
.match_table = ssam_fan_match,
.driver = {
.name = "surface_fan",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
+ .pm = pm_sleep_ptr(&surface_fan_pm_ops),
+ .shutdown = surface_fan_shutdown,
},
};
module_ssam_device_driver(surface_fan);Questions for the maintainers.
Prepared with Claude Fable 5.2. |
|
Video in Chrome on the Snapdragon laptops: hardware decode works with two changes, and hardware encode is two more away A summary of what is in the pull requests, since it spans four places. Decode (works, proposed). Chrome decodes video on the hardware only through VA-API, and nothing provided VA-API for the Qualcomm decoder, so Chrome decoded everything in software (
Both are Radxa's work (Xilin Wu); what is new is that it runs on the X1E80100 and is packaged for Omarchy. As a side effect ffmpeg's VA-API encode and Omarchy's screen recorder use the hardware encoder too. Encode in Chrome (shown possible, not shippable yet). Chrome's hardware encoder needs its input as NV12 buffers, and two things refuse them:
With both supplied (the Hyprland patch run nested, and a test wrapper that takes NV12 buffers from minigbm), Chrome encodes H.264 on the hardware at 640x480 to 1920x1080 and the output decodes to the right pictures. Only constant bitrate, and only H.264: those are limits of Chrome's Linux encoder. I have not tried a real call. So decode is ready for review; encode waits on Mesa, or on a decision to carry an allocator for it. Prepared with Claude Fable 5.2. |
|
CPU: the 4.0 GHz boost step works under Linux, but nothing uses it by default. A note for owners, with numbers. The X1E-80-100 runs all cores up to 3.4 GHz and one or two cores up to 4.0 GHz. On kernel 7.3.0-72-omarchy the second step is listed and switched off: Switching it on is not enough. With Geekbench 6.7.1 (Linux/AArch64 preview), three runs each, on AC, Performance profile, same boot:
For scale, reviews of this laptop under Windows report about 2,800 single-core and 14,500 multi-core. So the laptop is at Windows level on multi-core as shipped, and on single-core once the step is used. What it costs: one busy thread sits at 88 to 90 C with the fan near 3,400 rpm, against about 70 C and often no fan without it. An idle laptop is no warmer (51 C, fan off). I have not measured the effect on battery life, and I am not leaving it on: a reboot undoes both lines. Two things to know when measuring this:
This is a kernel matter, not Omarchy's, and it is being worked on upstream: Written with Claude Fable 5.2. I ran every test on my own laptop. |
|
There's now a hardware test for Omarchy, and I'd like a run from your laptop on the Surface Laptop 7's page beside your report: https://arewearmyet.com/models/microsoft-surface-laptop-7-15
|
|
Surface Laptop 7 13.8" ( Edge, Omarchy 4.0.0.r8160, kernel 7.3.0-75-omarchy, Works as installed: display, GPU, backlight and brightness keys, keyboard, speakers, Wi-Fi (linux-firmware's own board record, no extra file), USB-A, both USB-C ports (a USB 3.2 Gen1 stick enumerates at SuperSpeed on each) and USB-C charging, lid switch, deep sleep and resume, keyboard at the disk unlock prompt (Omarchy's romulus13 block). Needed a fix, all open:
Still open or untested on the 13.8":
Drafted with Claude Opus 5.5 via Claude Code; the tests ran on my own laptop. |
Uh oh!
There was an error while loading. Please reload this page.
I wiped Windows from a Surface Laptop 7 15" and installed Omarchy on 14 November 2026. I intend to use it as my daily machine. This is what I found on the first day, what I changed to get it working, and what I'd like to send upstream. I worked through it with Claude (Fable 5.2); I ran every command and test on my own laptop, and the diagnosis and files are AI-assisted.
Where things stand
iptsd(#17617), plus a retry for a boot-time racemicrosoft-surface-snapdragon-addresses, not installed on this modelspi10qcvss8380.mbnfrom the Pro 11 MSIThe machine
Surface_Laptop_7th_Edition_2037microsoft,romulus15What a new owner hits on a stock install
In the order I hit them:
ath12k-board-fallback(among other things). This laptop has no Ethernet port, so that means a USB adapter or tethering.00:03:7f:…placeholder), so the router sees a new device each time.What works now, and how
Already in Omarchy, just not installed on this model
These three needed nothing new. Omarchy has the fix for a sibling machine and this laptop has no board script to apply it.
pwm_bl,leds_qcom_lpgand the foursurface_aggregator/surface_hidmodules early, plus the Adreno firmware. It is almost the listsurface-pro-11.shalready writes.lsinitcpiowithlsmod: all were missing from the image. After the rebuild, the prompt is lit and the built-in keyboard types the passphrase. Every boot since.pacman -S iptsd(#17617 does this; still open)libinput debug-eventsshowed the multitouch node silent and all motion on the mouse node before; gestures work after.pacman -S microsoft-surface-snapdragon-addressesMacAddressEmulationAddressvariable minus two, which matches what Windows used; Bluetooth is minus one, and headphones pair and play. That makes this the third model the layout holds on.New: device tree additions
I boot the stock
x1e80100-microsoft-romulus15.dtbwith three overlays merged in byfdtoverlay.touchscreen@0node onspi10(QSPI, interrupt GPIO 51, reset GPIO 48, power GPIO 64), withgpi_dma1enabled. The same wiring appears in ItsLucas/surface-laptop-7-ubuntu-kernel, taken from this model's ACPI.045E:0C6F; iptsd picks it up in touchscreen mode. Touch works. 15" only: the 13.8" has a different (I2C) touchscreen.&irisenabled withfirmware-name = "qcom/x1e80100/microsoft/Romulus/qcvss8380.mbn".h264_v4l2m2mat about 13x real time, byte-identical to software decode.The video codec firmware is not in
microsoft-surface-laptop-7-firmware. I tookqcvss8380.mbnfrom Microsoft's Surface Pro 11 driver MSI (SHA-2562e37684e…f85ebc, the hash in the Pro 11 package's recipe). Microsoft's signature is accepted on the Surface Laptop 7.New: workarounds
iptsd-romulus15-resume.servicedoes not cover this case: it restarts units that exist, and here none does.gpio-keys(the lid switch) and for the USB-A port's controller (a400000.usb)v4l2-ctl --set-ctrl digital_gain=6144on the sensorWhat still doesn't work
dp_hs_phy_2) each signalled a wake with nothing touched, both at about 35 s in (17 s in the first two runs). Two unrelated lines firing at the same moment suggests one cause behind both. Only the power button wakes the laptop; keyboard, touchpad and lid-open do not.ov02c10, and the driver lacksget_selection. An app using Qt Multimedia reports the camera unavailable, also through libcamera's V4L2 shim.cycle_countreads 0, there is nocapacityattribute, and full-charge energy reads higher than Windows reported the same day.omarchy-powerprofiles-floor.serviceis dropped at boot by a systemd ordering cycle withpower-profiles-daemon.serviceandmulti-user.target. Probably not specific to this laptop.panel-edp: "Unknown panel SHP 0x1577, using conservative timings", with a WARN. It runs at 2496x1664, 120 Hz.Works out of the box
Display at 120 Hz with backlight control, GPU (Adreno X1-85, freedreno), Wi-Fi 7 on 6 GHz (after the first update), speakers, internal microphones, built-in keyboard and touchpad pointer in the desktop, NVMe, USB host, CPU frequency scaling, thermal sensors, power profiles, lid switch.
Not tested yet
External display and its audio over USB-C (the DAI links and jacks are there), USB-C charging and data on each port, USB-A storage, microSD, headphone jack, battery drain asleep, charge limit, fan under load, keyboard backlight, function keys, Surface pen, video encode, HEVC/VP9/AV1 decode, whether Chrome uses the hardware decoder.
What I'd like to send, if it's welcome
install/hardware/microsoft/surface-laptop-7.shthat Install iptsd on the Surface Laptop 7 15" #17617 adds, with the initramfs drop-in andmicrosoft-surface-snapdragon-addresses. I'd rather build on Install iptsd on the Surface Laptop 7 15" #17617 than open a competing PR.linux-omarchy-dtbs: three patches forx1e80100-microsoft-romulus15.dts: touchscreen, front camera, Iris.microsoft-surface-laptop-7-firmware: addqcvss8380.mbn. Also, the Surface Laptop 7 MSI URL in that recipe returns 404 today, and the published Pro 11 firmware package doesn't contain theqcvss8380.mbnits recipe installs.iptsd: the boot-time retry, or a better fix in the udev rule.omarchy-powerprofiles-floorordering cycle.I can test anything on this hardware. Logs and the exact files are available on request; I've kept serial numbers and addresses out of this post.
All reactions