You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lock screen squeezed after locking in landscape: the lock surfaces are made before autorotate turns to portrait #522
When the phone is locked while it is in landscape (Power key or the idle lock), the lock screen stays squeezed until the next unlock: the clock, the date, "Swipe up to unlock" and the battery glyph are drawn far too narrow and too tall, and the background has vertical streaks. It looks like a landscape lock surface stretched onto the portrait screen.
Why (from the journal)
omamobile-autorotate turns a locked phone to portrait, but only on its next one-second poll (_poll_lock / _lock_tick, shell_locked() through omarchy-shell lock isLocked). By then the session-lock surfaces have been made for landscape, and they are not configured again after the transform change:
13:47:31 omamobile-autorotate: DSI-1: transform 3 <- phone on its side
13:51:33 omarchy lock ... lock-requested
13:51:34 omamobile-autorotate: portrait while locked
13:51:34 omamobile-autorotate: DSI-1: transform 0
13:51:34 omarchy lock ... session-locked=true <- surfaces from the landscape size
14:23:56 omarchy lock ... unlocked <- squeezed the whole time
Every lock taken in portrait looks right; every one taken on the side that I checked looks squeezed.
Workaround I'm running
Turn to portrait before locking: before omarchy-system-lock, if the monitor's transform isn't 0, the same hyprctl eval that autorotate.py's apply() sends (hl.monitor({... transform = 0 }) plus the touch transform), then 0.5 s, then the lock. With that the lock screen is right after a landscape lock.
Where a fix could go
I haven't picked one, since both paths that lock would need it:
a "portrait before lock" step in the lock path itself (omamobile-keys for Power, and the idle lock), or
the lock surfaces following a transform change while locked (Quickshell's WlSessionLock surfaces should get a new configure from Hyprland after the monitor change; it looks like they don't, or the shell ignores it). That would be the cleaner fix, and would also cover a rotation while locked.
Found the cause, and it is one layer down from what I wrote above: Hyprland never tells the lock surface about the turn.
Hyprland 0.57 applies a monitor rule that differs from the active one only in the transform through CMonitor::applyMonitorRuleSoft(). The monitor gets its turned size, but modeChanged is not emitted.
CSessionLockSurface sends ext_session_lock_surface_v1.configure only on modeChanged. With WAYLAND_DEBUG=1 on a lock client: one configure(405, 909) at the lock, then none for four quarter turns, while zxdg_output_v1.logical_size went to 909x405 and back each time.
So the lock client keeps drawing at the old size and the renderer stretches that buffer over the turned output. That is the squeezed picture, and why touch misses the PIN pad.
It also happens without locking in landscape. On 2026-11-13 it hit me twice with the phone upright: it tipped to landscape in the same tenth of a second as the Power press, the lock surfaces were made for landscape, and autorotate's "portrait while locked" came a second later.
So the "portrait before lock" workaround from this issue is not enough: it looks once, before the turn lands.
Two things that confused my experiments, in case someone repeats them: a rule whose scale is written differently from the active one (2.6666667 against 2.66667) takes Hyprland's full path and does send a configure; and while the display is off Hyprland applies no rule change until the next wake.
Activity
den-kloot commentedon Nov 14, 2026
Found the cause, and it is one layer down from what I wrote above: Hyprland never tells the lock surface about the turn.
CMonitor::applyMonitorRuleSoft(). The monitor gets its turned size, butmodeChangedis not emitted.CSessionLockSurfacesendsext_session_lock_surface_v1.configureonly onmodeChanged. WithWAYLAND_DEBUG=1on a lock client: oneconfigure(405, 909)at the lock, then none for four quarter turns, whilezxdg_output_v1.logical_sizewent to 909x405 and back each time.It also happens without locking in landscape. On 2026-11-13 it hit me twice with the phone upright: it tipped to landscape in the same tenth of a second as the Power press, the lock surfaces were made for landscape, and autorotate's "portrait while locked" came a second later.
So the "portrait before lock" workaround from this issue is not enough: it looks once, before the turn lands.
Two things that confused my experiments, in case someone repeats them: a rule whose scale is written differently from the active one (
2.6666667against2.66667) takes Hyprland's full path and does send a configure; and while the display is off Hyprland applies no rule change until the next wake.The fix and an on-phone test are in #753.