Repository navigation
Conversation
… limits On a phone power-profiles-daemon falls back to its placeholder, which offers only Power-saver and Balanced and changes nothing (derekross#1027). A drop-in starts it with its fake driver, which offers all three, and omamobile-power-profile follows the active profile: Power-saver caps each cluster near 60 % of its top speed, Balanced gives the full range, Performance raises each floor to about half the top. Both percentages can be set in /etc/omamobile/power-profile.conf.
…daemon power-profiles-daemon's own unit is ordered after multi-user.target, so a follower wanted by multi-user.target and ordered after the daemon was a cycle: at the palmtop's first boot with it, systemd deleted the follower's start job to break it, and the profiles changed nothing until it was started by hand. The follower is now wanted by the daemon and bound to it.
|
Ready. The palmtop has run this since 2026-11-24 08:34, through two kernels, with the card's three buttons each setting the limits as described and nothing logged as failing to set. One fix since the draft (a2a328f): the first boot with the package's unit showed |
derekross
left a comment
There was a problem hiding this comment.
Thank you, this is a neat answer to #1027: keeping Omarchy's daemon and card as they are, and making the three profiles mean something on a phone, with the limits taken from each cluster's own steps. The ordering-cycle fix and the day of use on the palmtop are good to have, and the test reads clearly.
One thing has to change before I can take it. Omarchy's omarchy-powerprofiles-set, which its autostart runs at every session start, picks performance on AC whenever the daemon offers it and the owner hasn't chosen anything for that source. Today the placeholder doesn't offer it, so phones land on balanced; with the fake driver, every phone that starts its session on the charger would sit at a 50 % floor on all clusters, while charging, which is when heat matters most. Could the phone start on balanced for both sources unless the owner picks otherwise, for example a once-only step in omamobile-setup-user that writes balanced into Omarchy's per-source state files where none exist, with a test that starts on AC with no state?
After that, two things are mine: whether phones should have CPU profiles now and with which numbers (this is also what the bar's power card in #1024 is waiting for), and a run on my Pixel 7 Pro, since it changes the CPU limits on every phone. I'll also want it to stay out of the way of #946 on the 8 Pro, which caps the same files from its thermal guard; a line in the README about the two writers would help.
…Balanced on the charger too Omarchy's omarchy-powerprofiles-set, which its autostart runs at every session start, picks Performance on AC whenever the daemon offers it and nothing is saved for that source. With the fake driver it is offered, so a phone that starts its session on the charger would hold every cluster's floor at half its top while charging. omamobile-setup-user now saves Balanced for both sources once, where nothing is saved; a profile the owner picks later is saved over it. The test runs Omarchy's own script on AC with a daemon offering all three: Performance with no state, Balanced after the step. omamobile-omarchy conflicts with an older omamobile-shell so the step comes with the driver, and lib/power-profile says how it shares the cpufreq files with a thermal guard such as the Pixel 8 Pro's (derekross#946).
|
Done in 35fe9f1. The new case in That puts a step in For #946 I put the two writers in |
|
Thanks @W4HO-ham, also for putting the two writers in the header. Yes please, a device-package flag that keeps the follower off devices with a thermal cap like the 8 Pro's guard in #946 would be great. The guard starts capping the CPU clocks at 58 C and holds them at the lowest step by 60 C, and lifting that cap even for one tick on a hot phone is what I want to avoid. |
…he power-profile follower off Somnius on derekross#1045: the Pixel 8 Pro's guard (derekross#946) caps the CPU from 58 C and holds the lowest step by 60 C, and a profile change lifting that cap for even one tick on a hot phone is what it must not do. A device package that ships /usr/share/omamobile/power-profile-off now keeps the follower out: the unit has a ConditionPathExists on it, and lib/power-profile writes nothing there, restore included.
|
@Somnius Done in 0496090. A device package that ships
For #946, the device-husky side is one empty file, |
…s#1045 follower stays off The guard owns the CPU caps on husky when it is on; the generic follower must not write or restore them. One empty flag file, installed always, and a test that install stages it. Version 0.1.22, since main has 0.1.21. Signed-off-by: Lef <me@lefteros.com>
|
Decision: yes to CPU power profiles on phones, but the phone must never move to |
…saved at every login, not once Derek's decision on derekross#1045: the phone must never move to Performance by itself. Saving Balanced only once left a gap: a state file removed later meant Omarchy's default, Performance on AC, at the next session start. The step now runs at every login, before the session starts, and only where nothing is saved, so an owner's choice is still never overwritten.
|
Thanks. Here's how the branch meets each point, with one change in e4e803b:
All three packages' tests and |
# Conflicts: # packages/omamobile-shell/version
…is branch's 0.2.162
|
Merged main (7d15883): omamobile-shell 0.2.162, and omamobile-omarchy's |
…which one a device keeps
|
The README line about the two writers is in (ac690bd, in the shell's plugins README beside the Battery saver tile, where the profiles are described): the follower writes each cluster's limits, and a device with its own thermal guard ships |
# Conflicts: # packages/omamobile-shell/version
derekross
left a comment
There was a problem hiding this comment.
Thank you, this now does what I asked for. I ran Omarchy's own omarchy-powerprofiles-set autodetect from the 4.5.0-3 package on AC with all three profiles offered: with nothing saved it picks Performance, after your login step it picks Balanced, which is the point of the decision. Running the step at every login rather than once is the right call, and the off switch for a device with its own thermal guard, restore included, is exactly what #946 needs; thanks to Somnius for confirming it from that side.
What's left is mine: a run on my Pixel 7 Pro, on and off the charger, with each of the card's three profiles and the limits read back, and then the numbers at merge. Several open pull requests claim the same shell and omamobile-omarchy versions, so I'll set both when it lands and keep the conflicts= line and the header comment in step with the shell's number.
Two small things, neither a condition. The step keeps any non-empty state file, and Omarchy falls back to Performance on AC for a value that isn't a profile name, so checking for one of the three names rather than -s would close that. And a phone without the shell profile marker never runs omamobile-setup-user, so a sentence in lib/power-profile's header saying the seed depends on it would help the next person.
One thing I'll decide rather than ask you to change: once an owner picks Performance while charging, Omarchy remembers it for the charger, so the phone goes back to Performance at every later plug-in. I read that as the owner's choice and I'm fine with it for now.
…or at 60 C (#946) * omamobile-device-husky 0.1.21: thermal guard caps the CPU clocks, floor at 60 C A loop (every 2 s) reads the big/mid/little/gpu zones and caps each CPU cluster's scaling_max_freq and the GPU's devfreq max_freq from the hottest, on temperature only: one level down per tick from 58 C, the lowest level at 60 C, one level up per tick below 56 C. The DT trips (80/95/105 C) are never written. The caps and CPU list found at start are saved in /run and restored on stop. The unit is enabled by a wants link. At the floor and still at 60 C, user.slice is squeezed onto fewer CPUs (0-7, 0-5, 0-3) through systemd AllowedCPUs, since this kernel has no cpu.max and refuses hotplug, and let out one level per tick below 56 C. A refused squeeze never holds back a release, and a cap that cannot be written or read counts as not at the floor, so it blocks the squeeze. The squeeze only happens while the CPUs are busy, measured per CPU from /proc/stat over the CPUs user.slice may use now (iowait as idle): in at >= 50 %, let out at once below 35 %, and going a level deeper always needs >= 50 %. It stops at 0-5 unless those CPUs are >= 90 % busy, back to 0-5 below 75 %. A tick with no busy reading holds the squeeze only while >= 56 C, and if no zone reads at all the caps hold and the squeeze is let out. The busy check came from the phone: on the charger the SoC sat at 61-62 C at the floor with load ~0.5, and squeezing to 0-3 put the UI on 4 little cores and froze it without cooling anything. * omamobile-device-husky: an idle phone at 56-57 C climbs back to the max On the phone the guard started over the old stopgap's caps at 56 C, load 0.4, and the caps went to the minimum and stayed there. A 58 C reading steps every cap down, and 56-57 C only held, so the odd 58 C tick on an idle phone ratcheted it to the floor with no way back up. In the 56-57 C band the caps now step up while the CPUs are idle (below squeeze_release_busy), step_down never reaches the lowest level (only floor does), and every cap starts from the hardware max instead of the cap found at start (stop still puts that one back). A test replays the phone: its OPP lists, the stopgap's caps, 300 ticks at 56-57 C with a 58 C reading every 20 ticks; it ends at the max. * omamobile-device-husky: README says what the 56-57 C band does now The README still said 56-57 C only holds, which was the rule before the ratchet fix. * omamobile-device-husky: test a missing user.slice cpuset.cpus With user.slice/cpuset.cpus missing the caps still work and the squeeze stays off. * omamobile-device-husky: thermal guard opt-in, no squeeze, numbers in NOTES The package no longer enables the guard: an owner turns it on with systemctl enable --now. The user.slice squeeze is gone, so a hot phone keeps its CPUs for the screen and call audio. The hold band's idle climb keeps its 35 % threshold as idle_busy. The test now holds 58-59 C for more ticks than there are levels, so stepping down to the lowest level below 60 C fails it. device/husky/NOTES.md has the measurements behind the defaults: idle, on the charger, the trips experiment, the floor under load, 120 vs 60 Hz, C2, Google's trips, and what is not measured yet. * omamobile-device-husky: NOTES, say what the thermal sources show * omamobile-device-husky: SPDX line in thermal.conf, the charger in the README thermal.conf gets the SPDX line the package's other files have. The README row says that on the charger the SoC sits above the 60 C floor, so the guard holds the lowest clocks while plugged in. NOTES no longer names a log that isn't in the repository. Signed-off-by: Lef <me@lefteros.com> * omamobile-device-husky: the charger sentence says it is one phone Signed-off-by: Lef <me@lefteros.com> * omamobile-device-husky 0.1.22: ship power-profile-off so the #1045 follower stays off The guard owns the CPU caps on husky when it is on; the generic follower must not write or restore them. One empty flag file, installed always, and a test that install stages it. Version 0.1.22, since main has 0.1.21. Signed-off-by: Lef <me@lefteros.com> --------- Signed-off-by: Lef <me@lefteros.com>
Fixes #1027 the way the issue's option list didn't have: keep Omarchy's power-profiles-daemon and its card, and make the profiles real on a phone.
What changes
POWER_PROFILE_DAEMON_FAKE_DRIVER=1. The fake driver is part of the daemon (0.30 here): it offers Power-saver, Balanced and Performance and, like the placeholder it replaces, changes nothing itself. It only reads keys when its output is a terminal, which under systemd it never is.powerprofilesctl listnames the driverfake.omamobile-power-profile.servicefollows the daemon'sActiveProfile(gdbus monitor, no polling) and sets each cpufreq policy's limits:schedutil still picks the speed in between, and thermal limits still win. Both percentages can be changed in
/etc/omamobile/power-profile.conf. When the service stops, or the daemon leaves the bus, every cluster gets its full range back.Nothing in Omarchy's card or scripts changes, so
omarchy-powerprofiles-set, its per-source memory and the card work as on a laptop.On my palmtop (Pixel 9a, by hand from this branch, switched with
omarchy-powerprofiles-set ac <profile>):A fixed job on a big core (
head -c 400M /dev/zero | sha256sum, pinned to CPU 7): 637 ms in Power-saver, 398 ms in Balanced, 375 ms in Performance.Tests:
test/power-profile.sh(fromtest/all) runs the script against a cpufreq tree shaped like the 9a's three clusters and its watch loop against stubbusctlandgdbus.tools/pr-check origin/mainpasses.test/allhas one failure that main has too on my laptop (qmlformat on two patched QML files in the real-package check), unrelated to this.Draft until it has run a day on my palmtop.