Repository navigation
Conversation
One monitor scale of 3 for every phone only suits the Pixel 7 Pro
(1440x3120 at 512 px/in: 480x1040 logical). The Pixel 9a's 1080x2424
at 422 px/in came out 360 px wide, its UI 21% larger, and the Pixel 8
Pro's 2992 px don't divide by 3: Hyprland moved it to 3.2, with a
warning.
hypr/display-scale.lua works each screen's scale out from its mode and
the millimetres DRM reports, which Hyprland 0.57's Lua has for every
monitor: a DSI panel gets the 7 Pro's 170.7 logical px per inch, an
external screen 110, one of unknown size 1, snapped to the nearest
k/120 that divides the mode into whole logical pixels. That is 3 on the
7 Pro (480x1040), 2.4 on the 9a (450x1010, the UI at 97% of the 7 Pro's
size) and 8/3 on the 8 Pro (504x1122, 93%); a phone not yet supported
gets its scale the same way. omamobile-setup-user loads it at the top
of monitors.lua, once, while the monitor scale is still a default
("auto" or 3; a 9a's 8 / 3 from 0.2.35 and any user's own value stay).
The panel's scale goes through omarchy_monitor_scale, so a rule that
copies Omarchy's line (the reference 7 Pro has a 60 Hz one) keeps it,
GDK_SCALE follows it rounded up, and other outputs get rules of their
own, each in the mode that output already has. A number there, or a
rule for one output further down (Omarchy's display scaling writes one),
still wins. No mode changes: the module makes no rule for the panel,
setup-user changes only monitors.lua's two `local` lines, and a user's
own rule (a 60 Hz mode for the battery) is left exactly as it is.
The rules come from the config rather than from `hyprctl eval` at run
time: a runtime rule is dropped at the next config reload, which Omarchy
causes often, and the scale would jump back and forth. On a cold start
Hyprland reads the config before it has any outputs, so a panel whose
scale isn't the fallback 3 costs one `hyprctl reload` when it appears
(none on the 7 Pro), as does an output plugged in later.
omamobile-display-scale shows the numbers, read-only. Picture-in-picture
is 62.5% of the screen's shorter side wide (300x169 on the 7 Pro), the
home screen's geometry defaults come from the screen, and the comments
that took 480 px for every phone say which phone they mean. The README
has the cost of a fractional scale: a client without
wp-fractional-scale-v1 (GTK 3, squeekboard) draws at 3 and Hyprland
scales it down, 1.56 times the panel's pixels on the 9a.
For the maintainer: a new 9a user gets 2.4 rather than the owner's 8/3
(device/tegu NOTES, 2026-10-25), and an 8 Pro still on the seeded 3
moves to 8/3. Grok Bot's factor on a new 9a is 0.62 (0.70 before):
setup-user works it out before the compositor runs, at 3. CI now
installs lua, so the Lua tests run there (phone-rules.lua was skipped
too).
Tested: omamobile-shell's test/all, with display-scale.lua's sums and
rules on Lua 5.4, 5.5 and LuaJIT against Hyprland 0.57's own scale check
and rule order, and the monitors.lua setup-user writes from Omarchy's
template and from this package's earlier one; tests/grep-q-pipes. On
the 7 Pro (7.3.0-rc6-omamobile-g2219cc6cda77), read-only: hyprctl and
Hyprland's Lua report DSI-1 at 1440x3120 and 71x155 mm, and
omamobile-display-scale gives it 3. Not run on a phone: the module in a
live Hyprland, a cold start on a 9a or an 8 Pro.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, @jkjoplin. The module is well thought through: doing it in the config rather than with Three things before it can land, and a few I have to decide. 1. Please guard the module's load. The line the setup step writes into the user's local ok, m = pcall(dofile, "/usr/share/omamobile/shell/hypr/display-scale.lua")
local omamobile_display = ok and m.setup() or { monitor_scale = function(f) return f end, gdk_scale = function(f) return f end }and a case in 2. The version. Main took 0.2.116 and 0.2.117 this afternoon, and #636 says 0.2.116 too. I'll set the number at merge, so no need to renumber; but the number is also in the text this adds to AGENTS.md (twice) and in the "0.2.35-0.2.115" comment, so please write those so they don't depend on it, or I'll fix them when I merge. 3. It needs to run on phones first. This changes what every phone's session does at start, and nothing has run in a live Hyprland yet. I'll do the 7 Pro myself once the guard is in (install, log in, cold start with no reload, a manual reload, rotation, picture-in-picture, then back to main's package to check the guard). For the other two, could you or the owners post one cold start each on a 9a and an 8 Pro: Smaller things: the picture-in-picture height is now 168.75 on the 7 Pro rather than 169 ( What I need to decide, and your view is welcome:
|
…licy The first comet submission after issue derekross#143: the descriptor, curated hardware observations, the remaining gates and an inert boot-policy package. Boot-success stays off: the package ships no boot-success script, unit or devinfo writer and enables nothing, and status, install and README agree. SOC_COMPATIBLE stays commented out, as on tegu, so install-phone and flash refuse comet until the public board DTB lands. The storage guard allows only the five slot-B boot images and userdata. NOTES records the 2026-11-07 stock restore (CP3A.261005.005 on both slots), the commands that put Linux back on slot B, the slot-B marking and the fresh protected backup, and marks the 2026-10-30 slot-state paragraphs as historical. BRINGUP-M1 writes out both recovery procedures as fastboot commands now that slot A is a live stock fallback. The package starts at 0.1.0. It no longer depends on omamobile-shell and the descriptor drops MONITOR_SCALE (the panel-size scale is derekross#635's job). The AoC blacklist names the modules the comet zumapro kernel builds, not gs201's. reboot-to.c follows cheetah's current copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…licy The first comet submission after issue derekross#143: the descriptor, curated hardware observations, the remaining gates and an inert boot-policy package. Boot-success stays off: the package ships no boot-success script, unit or devinfo writer and enables nothing, and status, install and README agree. SOC_COMPATIBLE stays commented out, as on tegu, so install-phone and flash refuse comet until the public board DTB lands. The storage guard allows only the five slot-B boot images and userdata. NOTES records the 2026-11-07 stock restore (CP3A.261005.005 on both slots), the commands that put Linux back on slot B, the slot-B marking and the fresh protected backup, and marks the 2026-10-30 slot-state paragraphs as historical. BRINGUP-M1 writes out both recovery procedures as fastboot commands now that slot A is a live stock fallback. The package starts at 0.1.0. It no longer depends on omamobile-shell and the descriptor drops MONITOR_SCALE (the panel-size scale is derekross#635's job). The AoC blacklist names the modules the comet zumapro kernel builds, not gs201's. reboot-to.c follows cheetah's current copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
One monitor scale of 3 for every phone only suits the Pixel 7 Pro. At 3, the Pixel 9a's 1080x2424 panel (422 px/in) came out 360 px wide, so its UI was 21% larger than the 7 Pro's. The Pixel 8 Pro's 2992 px don't divide by 3, so Hyprland moved it to 3.2, with a warning. Several shell rules also assumed a 480-px-wide screen.
This PR works out each screen's scale from its mode and the millimetres DRM reports (Hyprland 0.57's Lua exposes
physical_width/physical_heightfor every monitor). The UI then comes out the same physical size on every phone, including boards that aren't supported yet.hypr/display-scale.lua(new):omamobile-setup-userloads the module at the top ofmonitors.lua, once, and only while the scale is still a default ("auto"or 3). A 9a's 8/3 from 0.2.35-0.2.115, and any user's own value, stay.omarchy_monitor_scale, andGDK_SCALEfollows it, rounded up. Other outputs get rules of their own.omarchy_monitor_scale, or a rule for one output further down (Omarchy's display scaling writes one).locallines ofmonitors.lua.hyprctl evalat runtime: a rule set that way is dropped at the next config reload, which Omarchy causes often, so the scale would jump back and forth. Everything here comes from the config.hyprctl reloadwhen it appears (none on the 7 Pro). An output plugged in later costs one too.omamobile-display-scale(new, read-only): shows the numbers for every output, or for a panel given asW H MMW MMH.wp-fractional-scale-v1(GTK 3 apps, squeekboard) draws at 3, and Hyprland scales it down. On the 9a that is 1.56 times the panel's pixels. X11 apps come out up to 25% larger than the rest.lua. Without it, every Lua test (phone-rules.luaincluded) was being skipped.For the maintainer to decide:
omamobile-setup-userworks it out before the compositor runs, so it uses scale 3. The window still fits.Device and build
uname -r): 7.3.0-rc6-omamobile-g2219cc6cda77 (the phone the read-only checks ran on)Checks (no phone needed)
tools/pr-check origin/mainpassestests/allpasses. On the phone I worked on, it stops attests/kernel-pr-check("the kernel config doesn't configure"), which fails the same way onmainthere. That's the environment, not this change.tests/pr-check,tests/tools-helpandtests/grep-q-pipespass on their own. CI runs the whole suite.tests/packagespasses (or the packages I touched: omamobile-shelltest/all, 310 checks, nothing skipped)versionbumped, and the new version is in the commit subjectCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:What the tests cover:
test/display-scale.lua(new, on Lua 5.4, 5.5 and LuaJIT):omarchy_monitor_scale), at a reload and on a cold start;test/setup-user.sh:monitors.luathat is a symlink;test/phone-rules.lua: the picture-in-picture size at 480, 450, 504 and 360 px wide, and on its side.On the phone
I ran this on my own phone, booted into this build
Runbook steps passed (plan, step, result): none run yet. The runbook is below.
What I did not test:
Only read-only checks ran, on the 7 Pro:
hyprctl monitors -jand Hyprland's Lua report DSI-1 at 1440x3120 and 71x155 mm, andomamobile-display-scalegives it 3.Nothing in this change writes outside slot B and
userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)Runbook for a phone. Steps 3 and 4 restart the session or reload the config, so announce them first.
omamobile-display-scaleshows DSI-1's expected scale.~/.config/hypr/monitors.luastarts with the module's block, and the twolocallines readomamobile_display.monitor_scale(3)andomamobile_display.gdk_scale(3).hyprctl reloadfrom the module.hyprctl reload, nothing changes.local omarchy_monitor_scale = 3andlocal omarchy_gdk_scale = 3.tools/phone-smokereportNot attached: no phone has been booted into this build yet.
🤖 Generated with Claude Code