omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

[Quattro] Lock wallpaper can show only its fallback color after resume

Open ClGratton opened this issue 3 months ago • 1 comments

System details

  • Omarchy 4.0.1-1 (Quattro)
  • Hyprland 0.56.2-1
  • NVIDIA RTX 3080 Ti
  • Two DisplayPort outputs: 2560x1440 at 180 Hz and 200 Hz
  • Linux 7.1.9

What is wrong?

After suspending while the native session lock is active, the restored lock surface can show only the flat gray/theme fallback color for roughly two seconds. The blurred wallpaper appears only after later input causes another frame. The password UI may already exist during the fallback frame.

This is independent of the DPMS reblank timer in #7399 and the password-focus defect in #9180: after those paths were fixed locally, the fallback frame still reproduced until the wallpaper loading path was changed.

Steps to reproduce

  1. Lock the session and suspend through the normal Omarchy path.
  2. Resume on a system whose outputs are recreated during DisplayPort link training.
  3. Observe the first lock frames before typing.
  4. The lock can display Color.background without the blurred wallpaper; subsequent input makes the wallpaper appear.

Root cause

LockView.qml deliberately loads the wallpaper asynchronously with cache: false. A lock output recreated after resume therefore begins with an empty Image while the containing Rectangle paints Color.background. The same wallpaper was already known while the session was unlocked, but the service did not decode or retain it for the output sizes that the lock surfaces need.

Expected

A recreated lock surface paints the configured wallpaper on its first visible frame, without an intermediate flat-color screen.

Verified fix

A cloned omarchy.lock preloads the cache-busted wallpaper URL for each active output size while unlocked. LockView then uses the same URL and size synchronously from the shared image cache. The gray resume frame stopped reproducing on the affected dual-output setup.

A focused test covers per-output preloading, exact output sizing, matching cache-busted URLs, and synchronous cache reuse. PR follows.

ClGratton avatar Aug 30 '26 14:08 ClGratton

I checked this against quattro at be052339d. Since you filed it, #13431 (387fcf599, merged 2026-09-27) has landed, and it does essentially what your clone does. The lock service now keeps each screen's wallpaper decoded in the image cache, using the same versioned URL, the screen's logical size and PreserveAspectCrop that LockView asks for (shell/plugins/lock/Service.qml:577-595). LockView now opts into the cache and waits for its size before requesting the image (shell/plugins/lock/LockView.qml:103-115). It still loads with asynchronous: true, but that only matters on a cache miss, because Qt hands back a cached image immediately. The fix is not in a release yet: v4.0.4 came out before it.

There is one case it may not cover, and it matches your setup. The preloader follows Quickshell.screens, so when a resume removes every output at once, the preloading images and the lock's images are all destroyed together. Qt only keeps 2 MiB of decoded images that nothing is using, and a 2560×1440 wallpaper takes about 14 MiB, so the cached copy is dropped and the recreated lock surfaces decode it again from scratch. Your clone only preloaded while unlocked. If it fixed the problem on your machine, the cached image must have survived the resume there, which is the thing a test would confirm.

The other half of your report has no explanation in the source yet: the wallpaper only appearing after input, about two seconds later. When an image finishes loading, Qt schedules a repaint by itself, and nothing in the lock code waits for input. A decode should take a fraction of a second, so if the flat colour really stays until you touch a key, something else is happening as well.

I could not reproduce this. It needs real DisplayPort outputs being recreated on resume, which a worker VM cannot produce, and no fix was drafted because the gap above is a mechanism read from source rather than something seen to fail.

Could you test quattro at be052339d88226d6a2e8f9212766230d1220e19f, with your cloned omarchy.lock removed so the stock plugin is the one running?

git clone -b quattro https://github.com/basecamp/omarchy ~/omarchy
git -C ~/omarchy checkout be052339d88226d6a2e8f9212766230d1220e19f
omarchy-channel-set dev        # omarchy-channel-set stable switches back

Then lock, suspend and resume a few times, and tell us whether the flat-colour frame still appears. If it does, please include the output of hyprctl monitors -j | jq '.[] | {id, name}' from before the suspend and after the resume. That shows whether both outputs were recreated, which is the case described above.

Checked by Claude Opus 5.5, with a second opinion from Codex Medium. Codex agreed that #13431 covers the ordinary lock path. It also traced the 2 MiB cache limit and the delegate teardown through the Qt and Quickshell sources, which confirms the gap described above. It found nothing in the lock code that would explain the repaint waiting for input. It read the same code I did, so its agreement is not guaranteed to be independent. This is waiting on your test.

omarchybot avatar Oct 09 '26 09:10 omarchybot