Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; no new blocking issue was established.
|
db161e2 to
8b293b5
Compare
8b293b5 to
9fa9407
Compare
calloop-wayland-source 0.4.1 keeps only I/O errors from the socket read and flush paths and drops protocol errors. After the compositor disconnects the overlay (the wp_viewport "invalid destination size" error in AprilNEA#1989), the dead socket stays readable, every loop iteration fails and logs the same error, and the process never exits: one core pinned and the journal flooded, with no restart by the agent. Smithay fixed this upstream in c52f3fe ("Stop ignoring non-IO errors"), which is not released yet. Patch the crate to that revision so GPUI's event loop sees the error and the overlay exits; the agent then restarts it with its normal backoff. Allow the repository in cargo-deny and pin its Nix output hash. This does not fix the viewport error itself, which is in GPUI.
A verbatim copy of the crates.io release (checksum 7c6ffd2d…), minus the packaging metadata files. Nothing points at it yet; the next commit wires it in through [patch.crates-io] together with the one change it carries, so that change reviews as a small diff against this copy.
… scale A fractional-scale event can reach the overlay's layer surface before the compositor has configured its size. gpui-pre-linux then calls wp_viewport.set_destination(0, 0), a protocol error that ends the whole Wayland connection, so the Actions Ring never opens at any fractional scale, on every output (AprilNEA#1989). Patch gpui-pre-linux through a vendored copy so set_size_and_scale only sets the viewport destination once both dimensions are positive; the configure that assigns the real size calls back in and sets it then. Reporters confirmed this exact guard on KWin, Hyprland and wlroots. The patch is dropped once a gpui-pre release carries zed-industries/zed#61368. Refs AprilNEA#1989
Move the guard in set_size_and_scale into viewport_destination, a pure helper, and test it: a surface with either side still zero gets no destination, and a configured one keeps its logical size. Dropping the size check makes an_unconfigured_surface_gets_no_destination fail. Refs AprilNEA#1989
d5de85e to
45e8bea
Compare
|
Tested the viewport size guard backported to OpenLogi 0.9.0 and confirmed the Actions Ring opens again. My test covered the guard alone. Thanks for the fix! I’d love to see it in the next release. |
|
Now that's a coincidence. I also just tested this PR as a patch to 0.9.0. Plasma 6.8.3, wayland, laptop panel at 125% plus a second monitor at 150%. Before: no ring, openlogi-overlay spamming Protocol error 0 as described above. After: the ring opens on both displays, no log spam. Thank you! |
Summary
Two fixes for the Actions Ring on a fractional-scale Wayland output (#1989):
wp_viewport.set_destination(0, 0), a protocol error that ends the whole Wayland connection, so the ring never opens at a fractional scale, on any output. This PR patches gpui-pre-linux so it sets the viewport destination only once both dimensions are positive; the configure that assigns the real size calls back in and sets it then. This is the samewidth > 0 && height > 0guard that reporters in [Bug]: Linux Wayland (KDE, Hyprland, wlroots): openlogi-overlay gets a fatal wp_viewport error at startup on non-1.0 scales, then busy-loops (Actions Ring never shows, ~100% CPU, journal flood) #1989 built and confirmed on KWin, Hyprland and wlroots (MangoWC).calloop-wayland-source0.4.1 keeps only I/O errors from the socket read and flush paths and dropsWaylandError::Protocol, so after a disconnect the dead socket stays readable and every iteration fails the same way: one report logged about 10 million lines in 11 seconds. Smithay fixed this in c52f3fe, not yet on crates.io. With it, GPUI's event loop returns, the process exits, and the agent's normal backoff takes over.Both are stopgaps until upstream releases: zed-industries/zed#61368 (open since July) for the guard, and a
calloop-wayland-sourcerelease after 0.4.1. Each patch has a comment saying when to drop it.Changes
vendor/gpui-pre-linux: a copy of the crates.io 0.3.10 release, the versiongpui-prepins. The first commit adds it verbatim (minus packaging metadata files), so the second commit shows the one change as a small diff: the guard inset_size_and_scaleinsrc/linux/wayland/window.rs.Cargo.toml:[patch.crates-io]pointsgpui-pre-linuxat the vendored copy, andcalloop-wayland-sourceat Smithay'scab67860(c52f3fe plus the follow-up EINTR handling, still version 0.4.1).[workspace] exclude = ["vendor"], so the vendored crate is a path dependency, not a member, and workspace lints, fmt and clippy do not apply to it.Cargo.lock: only the source lines of those two crates change; no other resolution changes..cargo/deny.toml: allowshttps://github.com/Smithay/calloop-wayland-source..config/typos.toml: excludesvendor/.packaging/linux/package.nix: addsvendorto the source fileset, and theoutputHashesentry for the calloop git dependency. I computed that NAR hash locally without Nix; the same method reproduces the existingappiconhash exactly. Nix CI will confirm it.Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agentast-grep scancargo test -p gpui-pre-linux --lib viewport_destination: the guard's regression tests.vendor/is outside the workspace, so the workspace test run skips them. Counter-proof: with the size check removed,an_unconfigured_surface_gets_no_destinationfails.All green with
RUSTFLAGS="-D warnings"on Linux x86_64, on the tip rebased onto current master. Not run:cargo-deny(not installed here),typos(not installed here) and the Nix build.Not runtime-tested here: I have no fractional-scale Wayland setup. The guard itself is the one reporters in #1989 applied to gpui-pre-linux and ran on KWin, Hyprland and wlroots. To test, run KDE Plasma Wayland at 115% or 125% scale and press the Actions Ring button:
openlogi-overlaynear 100% CPU,Protocol error 0 on object wp_viewport@…logged endlessly.wp_viewporterror.Fixes #1989
Fixes #2526
Fixes #2553
Fixes #2585