omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Plymouth: the `omarchy` theme renders off-centre on HiDPI panels — plymouthd's automatic device scale halves the window size the script sees

Open isaac30503 opened this issue 2 months ago • 3 comments

Environment

  • Omarchy 4.0.2-1 (packages, installed on CachyOS; omarchy-settings 4.0.2-1)
  • Lenovo Legion Go 2 (83N0, Ryzen Z2 Extreme, Radeon 890M), kernel 7.2.2-1-cachyos
  • Plymouth 26.134.222-2.1, theme omarchy, LUKS root (sd-encrypt), Limine
  • Internal panel eDP-1: 1920x1200, 190x120 mm → 257 DPI
  • External DP-1: 1920x1080, 600x330 mm → 81 DPI

What happens

At the LUKS passphrase prompt the whole theme — logo, lock icon, entry box, progress bar — is bunched into the upper-left corner instead of being centred. It is wrong on both outputs at once: the logo is cropped off the left edge of the internal panel, and sits in the top-left quadrant of the external monitor.

Why

plymouthd picks a device scale automatically from the panel's DPI, and that scale is a single daemon-wide value — there is no per-output form. The 257 DPI internal panel puts it at 2, and the external 27" monitor inherits it.

With scale 2 the script module reports 960x600 to the theme instead of 1920x1200, so omarchy.script computes:

logo X = Window.GetWidth()  / 2 - 800 / 2 = 960/2 - 400 =  80   (should be 560)
logo Y = Window.GetHeight() / 2 - 188 / 2 = 600/2 -  94 = 206   (should be 506)

Those are exactly the offsets observed on screen. Every other element derives from the logo position, so the whole layout follows it into the corner.

Steps to reproduce

  1. Install Omarchy on a machine whose internal panel is above ~192 DPI (any 8"-class 1920x1200 handheld; a 13" 4K laptop should do too).
  2. Encrypt the root filesystem so Plymouth shows the passphrase prompt.
  3. Boot.

Workaround (verified)

# /etc/plymouth/plymouthd.conf
[Daemon]
DeviceScale=1
Theme=omarchy

then sudo mkinitcpio -P. The initramfs rebuild is required — the passphrase prompt is drawn by Plymouth from inside the image, so editing the on-disk file alone changes nothing. After that the theme is correctly centred on both outputs.

Suggested fix

Make the theme scale-aware rather than assuming device pixels, or ship DeviceScale=1 with the theme.

Secondary observation

Independently of the above, omarchy.script centres with

logo.sprite.SetX(Window.GetWidth() / 2 - logo.image.GetWidth() / 2);

while Plymouth's own reference theme (/usr/share/plymouth/themes/script/script.script) uses

logo.sprite.SetX(Window.GetX() + Window.GetWidth() / 2 - logo.image.GetWidth() / 2);

The missing Window.GetX() / Window.GetY() makes no difference on a single-head setup, so it was not the cause here — with DeviceScale=1 the layout is correct on both outputs — but it is a real divergence from upstream and may matter on other multi-monitor arrangements. Affected lines: 8, 9, 111, 187, 196.


Investigated and written with Claude Code (Claude Opus 5). Every command output, file excerpt and measurement quoted above was taken from the affected machine.

isaac30503 avatar Sep 03 '26 08:09 isaac30503

Closing as out of scope: Omarchy now supports only installs made from the official Omarchy ISO, and this report comes from Omarchy installed on top of CachyOS. A different base brings its own packages, kernel, boot setup and defaults, so we can't tell what here is Omarchy's to fix, and we aren't taking on fixes for setups the ISO doesn't produce. Thanks for the detailed report. If you can reproduce this on a fresh ISO install, say so here with the details and we'll reopen. (Checked by Claude Opus 5.5; no second review.)

omarchybot avatar Oct 08 '26 17:10 omarchybot

Reopening: this was closed in error. The report came from an install outside the ISO, but the problem is in Omarchy's own code and applies to an ISO install just the same. The omarchy Plymouth theme centres itself using the window size Plymouth reports, which is halved on any panel over ~192 DPI, and an ISO install with LUKS shows exactly that prompt. (Checked by Claude Opus 5.5; no second review.)

omarchybot avatar Oct 08 '26 18:10 omarchybot

Looked at this again against the theme as it stands on quattro (default/plymouth/omarchy.script, which now does its centring in layout()) and against upstream Plymouth's source. Nothing was run: no worker has a HiDPI panel or a LUKS prompt, so this is a reading of the code, not a reproduction.

What the source shows: the first half of the diagnosis holds and the second does not. At device scale 2, Window.GetWidth() does return the logical width, 960 for a 1920x1200 panel (script-lib-sprite.c returns max_width, which comes from the pixel buffer's logical_area). But sprite positions are logical too, and images loaded with Image() are scale-1 buffers that ply_pixel_buffer_fill_with_buffer_at_opacity_with_clip draws onto a scale-2 screen at twice the size (the scaled path in ply-pixel-buffer.c; the direct-copy path is only taken when the two scales match). So the logo at logical x 80 lands at device x 160, 1600 pixels wide, centred on 1920. The same holds with a second output: upstream's DRM renderer picks the scale per output, not once for the whole daemon, and the script module centres each display inside the largest one. On upstream Plymouth, then, scale 2 should give a centred theme drawn at double size, not one in the top-left corner. Whatever put it in the corner on this machine is not the arithmetic in the theme, and I could not find it from here.

That matters for #15239, which pins DeviceScale=1 on the strength of that diagnosis. It does fix the symptom you saw, but per the above it would also draw the prompt at half its current physical size on every HiDPI laptop where it is centred today. The question already put to you on #15239 is the one that settles it: with only the internal panel connected and no DeviceScale set, is the prompt centred or in the corner?

The classification is unsettled, so this issue carries no class label for now. I (Claude Opus 5.5) read it as a hardware-specific bug in Omarchy's own theme, since the theme is the same on an ISO install. Codex Medium, classifying it separately, read it as not actionable: the report comes from Omarchy on CachyOS, and the stated cause does not hold. Codex Medium also reviewed the source reading above. It agreed with the arithmetic but could not open the Plymouth source itself, so the file references were checked by one model only. Waiting on the maintainer to decide the classification and #15239, and on your answer there.

omarchybot avatar Oct 18 '26 01:10 omarchybot