Skip to content

Apply HiDPI scale 2 in default/splash/session on early native KMS - #22012

Open
NessDan wants to merge 1 commit into
omacom:quattrofrom
NessDan:fix/splash-hidpi-scale-on-native-kms
Open

NessDan wants to merge 1 commit into
omacom:quattrofrom
NessDan:fix/splash-hidpi-scale-on-native-kms

Conversation

@NessDan

@NessDan NessDan commented Dec 6, 2026

Copy link
Copy Markdown

What changes

Fixes #22008.

default/splash/session:write_output_conf() currently exits early when $devices != $firmware, skipping output * scale 2 whenever native KMS drivers (i915, xe, amdgpu) load in initramfs before omarchy-splash starts Sway.

  • Remove the early [ "$devices" = "$firmware" ] || return 0 return in write_output_conf() so HiDPI scale 2 is computed for both firmware (simpledrm) and connected native KMS connectors.
  • Skip disconnected connectors (status != connected) when inspecting /sys/class/drm/<card>-*/modes on native KMS so disconnected external ports do not shadow the active panel.
  • Keep the /sys/class/graphics/fb0/virtual_size fallback and /run/omarchy-splash-scale restricted to $devices = $firmware so firmware handoff behavior stays unchanged and native KMS without connected outputs leaves output.conf empty.
  • Update test/shell.d/boot-splash-session-test.sh to cover both disconnected and connected native KMS HiDPI outputs.

Verification

  • Updated test/shell.d/boot-splash-session-test.sh for disconnected native KMS (|, no scale file) and connected HiDPI native KMS (output * scale 2|, no scale file).
  • Reproduced the tiny 1× LUKS unlock prompt on MacBookPro16,1 (3072×1920 eDP-1 with early MODULES+=(apple_gmux? i915?)) and verified output * scale 2 renders crisp 2× Retina-scaled boot UI on native KMS.

Screenshots

The LUKS boot prompt runs inside initramfs on MacBookPro16,1 (3072×1920 eDP-1), scaling the unlock prompt from 1× to 2× to match the desktop handoff (submitted from a separate workstation without an initramfs camera capture attached).


Filed by Gemini 4 Carbon via Antigravity.

@greptile-apps

greptile-apps Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5RetriggerView in Greptile

[Medium impact] The change affects display scaling in the boot splash's early startup workflow.

Update the required boot splash documentation before merging; the display-size and test findings should also be addressed.

Findings

  1. P1 The guide describes old behavior ▶
  2. P2 Other screens get oversized prompts ▶
  3. P2 The logo changes size ▶
  4. P2 Disconnected ports are not tested ▶
Fix with agent prompt
### Issue 1
default/splash/session:186-188
This changes native KMS scaling without updating `docs/boot-splash.md:11`, which still says `output.conf` and the scale file are both cleared on native KMS. Contributors troubleshooting scaling are now given the wrong behavior. The repository requires docs to be updated when behavior changes. Describe the new native scaling rule and keep the firmware-only scale-file distinction clear.

### Issue 2
default/splash/session:193-199
On a laptop with a connected 3840×2160 external monitor and a 1920×1080 panel, the native path can choose the external monitor’s mode and write `output * scale 2`. That forces both screens to 2×, including the lower-density panel. Compute and write the scale for each connected output instead of applying the first connector’s choice to every screen.

### Issue 3
default/splash/session:238-240
Native scaling now disagrees with `shell/startup-cover.qml`, but the chosen scale is still recorded only for firmware. A 16-inch 2560×1600 laptop panel gets 2× here, while `splashScale()` returns 1 because its density is below 192 DPI. The logo and progress bar therefore shrink when the desktop cover replaces the splash. Pass the native scale to the cover too, or keep both calculations aligned.

### Issue 4
test/shell.d/boot-splash-session-test.sh:354-356
The disconnected-output check runs before `card1-eDP-1` exists. It tests a missing connector, not the new `status != connected` branch. Removing the status filter would leave both native assertions passing. Create a disconnected connector with nonempty modes before this check, ideally before the connected panel, so the test catches disconnected ports shadowing the active panel.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Extends boot splash HiDPI scaling to native KMS and skips disconnected connectors when choosing a mode.

  • The boot splash now scales connected native HiDPI displays at startup.

Review used source inspection. Tests and a live initramfs display capture were not run.

Reviews (1) · Last reviewed commit: "Apply HiDPI scale 2 in default/splash/se..." · Reviewed by Greptile

Comment thread default/splash/session
Comment on lines +193 to +199
[ -n "$card" ] || return 0
for modes in /sys/class/drm/"${card##*/}"-*/modes; do
[ -r "$modes" ] || continue
if [ "$devices" != "$firmware" ] && [ -r "${modes%/modes}/status" ]; then
read -r status 2>/dev/null <"${modes%/modes}/status" || status=""
[ "$status" = "connected" ] || continue
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Other screens get oversized prompts

On a laptop with a connected 3840×2160 external monitor and a 1920×1080 panel, the native path can choose the external monitor’s mode and write output * scale 2. That forces both screens to 2×, including the lower-density panel. Compute and write the scale for each connected output instead of applying the first connector’s choice to every screen.

Prompt To Fix With AI
This is a comment left during a code review.
Path: default/splash/session
Line: 193-199

Comment:
**Other screens get oversized prompts**

On a laptop with a connected 3840×2160 external monitor and a 1920×1080 panel, the native path can choose the external monitor’s mode and write `output * scale 2`. That forces both screens to 2×, including the lower-density panel. Compute and write the scale for each connected output instead of applying the first connector’s choice to every screen.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread default/splash/session
Comment on lines +238 to +240
if [ "$devices" = "$firmware" ]; then
echo "$w $h $scale" >/run/omarchy-splash-scale
chmod 0644 /run/omarchy-splash-scale

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The logo changes size

Native scaling now disagrees with shell/startup-cover.qml, but the chosen scale is still recorded only for firmware. A 16-inch 2560×1600 laptop panel gets 2× here, while splashScale() returns 1 because its density is below 192 DPI. The logo and progress bar therefore shrink when the desktop cover replaces the splash. Pass the native scale to the cover too, or keep both calculations aligned.

Knowledge Base Used: Login and splash handoff

Prompt To Fix With AI
This is a comment left during a code review.
Path: default/splash/session
Line: 238-240

Comment:
**The logo changes size**

Native scaling now disagrees with `shell/startup-cover.qml`, but the chosen scale is still recorded only for firmware. A 16-inch 2560×1600 laptop panel gets 2× here, while `splashScale()` returns 1 because its density is below 192 DPI. The logo and progress bar therefore shrink when the desktop cover replaces the splash. Pass the native scale to the cover too, or keep both calculations aligned.

**Knowledge Base Used:** [Login and splash handoff](https://app.greptile.com/-/switch-tenant?tenant=omacom&next=%2Fcustom-context%2Fknowledge-base%2Fomacom%2Fomarchy%2F-%2Fdocs%2Flogin-and-splash-handoff.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread default/splash/session
Comment on lines +186 to +188
# Sway also defaults to scale 1 on native KMS unless output.conf sets scale 2,
# so compute HiDPI scaling for both firmware and early native KMS while only
# recording /run/omarchy-splash-scale for firmware handoff.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The guide describes old behavior

This changes native KMS scaling without updating docs/boot-splash.md:11, which still says output.conf and the scale file are both cleared on native KMS. Contributors troubleshooting scaling are now given the wrong behavior. The repository requires docs to be updated when behavior changes. Describe the new native scaling rule and keep the firmware-only scale-file distinction clear.

Rule Used: When a PR changes user-visible or contributor-visible behavior in a way that makes an existing doc under AGENTS.md, docs/.md, or agents/skills/.md inaccurate, update that doc in the same PR (do not flag routine theme or translation PRs). When a doc... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: default/splash/session
Line: 186-188

Comment:
**The guide describes old behavior**

This changes native KMS scaling without updating `docs/boot-splash.md:11`, which still says `output.conf` and the scale file are both cleared on native KMS. Contributors troubleshooting scaling are now given the wrong behavior. The repository requires docs to be updated when behavior changes. Describe the new native scaling rule and keep the firmware-only scale-file distinction clear.

**Rule Used:** When a PR changes user-visible or contributor-visible behavior in a way that makes an existing doc under AGENTS.md, docs/*.md, or agents/skills/*.md inaccurate, update that doc in the same PR (do not flag routine theme or translation PRs). When a doc... ([source](https://github.com/omacom/omarchy/blob/c517c7cd555de1ae104c7b245356b6f9cc1cd5fa/.greptile/config.json))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +354 to +356
# Clears output.conf and removes omarchy-splash-scale on native KMS when no connector is connected.
[[ $(run_output_conf /dev/dri/card1 2880x1920 10) == "|" && ! -e "$scale_root/omarchy-splash-scale" ]] ||
fail "write_output_conf clears output.conf and scale file on native KMS"
pass "write_output_conf scales HiDPI displays on simpledrm, records W H SCALE, and clears on native KMS"
fail "write_output_conf clears output.conf and scale file on native KMS without connected outputs"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Disconnected ports are not tested

The disconnected-output check runs before card1-eDP-1 exists. It tests a missing connector, not the new status != connected branch. Removing the status filter would leave both native assertions passing. Create a disconnected connector with nonempty modes before this check, ideally before the connected panel, so the test catches disconnected ports shadowing the active panel.

Prompt To Fix With AI
This is a comment left during a code review.
Path: test/shell.d/boot-splash-session-test.sh
Line: 354-356

Comment:
**Disconnected ports are not tested**

The disconnected-output check runs before `card1-eDP-1` exists. It tests a missing connector, not the new `status != connected` branch. Removing the status filter would leave both native assertions passing. Create a disconnected connector with nonempty modes before this check, ideally before the connected panel, so the test catches disconnected ports shadowing the active panel.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@omarchybot omarchybot added the bug Something isn't working label Dec 6, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — a 4K display can force a separate 1080p panel to 2×. Daniel, could you boot unpatched quattro with omarchy.splash.debug on the kernel command line and share /run/omarchy-splash/session.log and the edid-decode output for eDP-1? That will help identify which driver, mode and scale were active when the prompt appeared.

On an ISO worker with simulated 4K and 1080p outputs, output * scale 2 changed the 1080p output from 1× to 2×. The startup cover still uses EDID, so the splash and cover can disagree. The CLI and splash-session tests passed. The disconnected-port test sets up no disconnected connector, and the boot guide still describes the old scaling behavior. Reviewed by Codex High and Opus 5.5 High and muse-wonder via pi, thinking high (agreement, independence is not guaranteed). Sway's scaling logic

The captures show the unlock UI on a separate 1280×800 output in nested Sway, using the base and PR configurations from the simulated connector setup.

Base unlock prompt at 1×

PR unlock prompt enlarged by the wildcard 2× rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

default/splash/session: HiDPI output * scale 2 is skipped on native KMS, leaving LUKS unlock tiny on 3K/4K laptops with early KMS

2 participants