Skip to content

[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

Open

Description

@NickAkhmetov

Pre-flight checklist

  • I searched existing issues and this is not a duplicate.
  • I am on the latest release (0.8.16).
  • Logi Options+ is not involved (Linux).

Which part of OpenLogi?

Agent (openlogi-overlay, the Actions Ring helper)

OpenLogi version

0.8.16 (AUR package openlogi 0.8.16-2)

Operating system

Linux

OS version & architecture

CachyOS (rolling), x86_64, kernel 7.3.0-2-cachyos, KDE Plasma 6.8.1 / KWin 6.8.1 (Wayland), NVIDIA RTX 3080 (nvidia-open)

Two monitors, both using fractional scaling and HDR:

  • DP-2: 2560x1440 logical geometry at scale 1.5
  • DP-1: portrait, 1253x2227 logical geometry at scale 1.15

Device model

MX Master 4 (046d:b042)

How is the device connected?

Bluetooth (direct, no receiver)

Affected area(s)

  • Other: Actions Ring overlay

What happened?

The Actions Ring never appears. A few seconds after openlogi-overlay starts, KWin sends it a fatal protocol error:

ERROR wayland_backend: wp_viewport#35: error 0: invalid destination size

After that the overlay process does not exit. It busy-loops and logs this line hundreds of thousands of times per second:

ERROR wayland_backend::sys::client_impl: Protocol error 0 on object wp_viewport@35

Effects:

  • openlogi-overlay uses about 95% of a CPU core and systemd-journald about 45%.
  • journald rate-limits it with lines like Suppressed 9003056 messages from user@1000.service every 30 seconds.
  • My journal hit its 1G cap and rotated away all older logs within a few hours.
  • The agent's overlay supervisor never restarts the helper, because the process stays alive.

The failure is consistent. Killing the helper makes the agent spawn a new one, which hits the same error within seconds. It happened after a reboot as well.

invalid destination size is the wp_viewport.set_destination bad_value error, sent when the width or height is zero or negative (other than the -1, -1 unset value). My guess is that the overlay window's size rounds to zero or goes negative with fractional scaling or a portrait monitor.

At login, the first helper instance instead died with Broken pipe and exited with status 0. The agent restarted it, and the second instance hit the viewport error:

INFO openlogi_agent::overlay: helper started, pid 10191
ERROR wayland_backend::sys::client_impl: Io error: Broken pipe (os error 32)
Error trying to flush the wayland display: Broken pipe (os error 32)
INFO openlogi_agent::overlay: helper exited exit status: 0 after 3.4s
INFO openlogi_agent::overlay: waiting 4.0s before the next attempt
INFO openlogi_agent::overlay: helper started, pid 15244
INFO gpui_linux::linux::wayland::window: Server-side decorations requested, but the Wayland server does not support them. Falling back to client-side decorations.
INFO gpui_linux::linux::wayland::window: Server-side decorations requested, but the Wayland server does not support them. Falling back to client-side decorations.
ERROR wayland_backend: wp_viewport#35: error 0: invalid destination size
ERROR wayland_backend::sys::client_impl: Protocol error 0 on object wp_viewport@35
(repeated millions of times)

Expected:

  1. The overlay sets a valid viewport destination, so the Actions Ring works.
  2. If the Wayland connection hits a fatal error, the helper exits, so the supervisor can restart it, and it doesn't log in a hot loop.

Steps to reproduce

  1. KDE Plasma 6.8.1 Wayland, two monitors with fractional scaling (1.5 and 1.15, one in portrait).
  2. Start openlogi-agent with the Actions Ring enabled.
  3. Within a few seconds, openlogi-overlay logs wp_viewport#35: error 0: invalid destination size and starts spinning.
  4. Press the haptic panel bound to ShowActionsRing. Nothing appears.

openlogi list output

(inventory read from the running agent)
Logitech MX Master 4 (—, vid=046d pid=b042)
  └─ slot 255 ● MX Master 4 (mouse, wpid=?, battery=90% full (discharging))
          model_ids=[b042,0000,0000] ext=00 serial=<redacted> unit_id=<redacted> transports=btle

Activity

  1. added
    needs: triage
    platform: linux
    type: bug
    on Oct 22, 2026
  2. zugazagoitia commented on Oct 23, 2026

    @zugazagoitia

    I can reproduce the same issue, following the same steps, basic installation using the script and just opening and plugging in my MX Master 4, using the bolt receiver:

    Image****

    System:
    OS: CachyOS x86_64
    Kernel: Linux 7.2.10-1-cachyos
    Display (SAME019): 5120x1440 @ 1.25x in 49", 60 Hz [External, HDR]
    Desktop Environment: KDE Plasma 6.8.0
    Window Manager: KWin (Wayland)

    Update: Strange enough, after killing the openlogi-overlay process, the ring shows up and disappears

  3. 4ni1ak commented on Oct 23, 2026

    @4ni1ak
    Contributor

    Thanks for the thorough report, your guess about fractional scaling was right. Both halves come from dependencies, not from OpenLogi's own code.

    invalid destination size. Since #1906 the Actions Ring opens one layer-shell surface per output, anchored to all four edges with size 0×0. That's the layer-shell way to say "fill the output", and it's valid. GPUI's Wayland backend (gpui-pre-linux 0.3.4, wayland/window.rs, set_size_and_scale) then gets the compositor's preferred fractional scale (1.5 / 1.15 / 1.25) before the first layer configure. Since the scale differs from its initial 1.0, it calls wp_viewport.set_destination(0, 0) with the still-zero size. That's a bad_value, so KWin kills the connection. At scale 1.0 the function returns early, which is why only fractional setups hit it. The fix is a guard so the destination is only set for a non-zero size. The real one follows a moment later from the configure.

    The busy-loop. GPUI itself exits its event loop on an error. But calloop-wayland-source 0.4.1 only propagates WaylandError::Io and drops WaylandError::Protocol, and wayland-client turns the failed dispatch into Ok(0). So after the fatal error the dead socket stays readable, every iteration fails and logs Protocol error 0 on object wp_viewport@35, and the process never exits. That's also why the supervisor never restarts it. Your first instance's Broken pipe is an I/O error, which does propagate, so that one exited cleanly. Upstream fixed this on 2026-10-18 ("Stop ignoring non-IO errors", Smithay/calloop-wayland-source c52f3fe), but it isn't released yet.

    So the fix belongs in GPUI (the viewport guard) and in a newer calloop-wayland-source (the loop). On the OpenLogi side the options are to pin both to patched revisions, or to fall back to the pre-0.8.15 maximized window on fractional-scale Wayland outputs until they ship. That's a call for @AprilNEA.

    Until then, only a 100% (1.0) scale on every output avoids it. Any other scale, 2.0 included, differs from the initial 1.0 and triggers the same path.

  4. AprilNEA commented on Oct 23, 2026

    @AprilNEA
    Owner

    I checked @4ni1ak's analysis against the dependency sources, and it holds.

    • Viewport error. The overlay opens each ring surface with Bounds::default() (0×0) and all four anchors (layer_shell_ring in placement.rs). In gpui-pre-linux 0.3.4 a window starts at scale 1.0. PreferredScale calls set_size_and_scale while the size is still 0×0, so GPUI sends set_destination(0, 0). Zed's current main has the same unguarded call, so a GPUI version bump alone will not fix it.
    • Busy loop, one detail. calloop-wayland-source 0.4.1 does pass a protocol error through when dispatch returns it. It drops the error on the socket read and on flush, which keep only Io errors. wayland-client 0.31.14 ignores the backend error inside dispatch_pending and returns Ok(0). So the error never reaches GPUI and the loop spins. Upstream commit c52f3fe fixes the read and flush paths. It is not released yet; the latest version on crates.io is 0.4.1.

    OpenLogi cannot avoid the 0×0 size from its own side. GPUI passes the window size straight to the layer surface's set_size, so a non-zero placeholder would stop the surface from filling the output. The maintainer will decide how to carry the fix.

    Until then, the workaround stands: set every output to 100% scale.

  5. added
    status: confirmed
    status: upstream
    needs: decision
    area: gui
    and removed
    needs: triage
    on Oct 23, 2026
  6. AnbuBlackOpsTech commented on Oct 26, 2026

    @AnbuBlackOpsTech

    I'm seeing the same thing on 0.8.18 with an integer scale, so it isn't limited to fractional scaling. I can also confirm that the width > 0 && height > 0 guard you described fixes it.

    Setup: CachyOS, KDE Plasma / KWin 6.8.1 (Wayland), RTX 4090 + Ryzen 7800X3D iGPU, MX Master 4 over Bluetooth LE. Two monitors: DP-2 2560x1440 @ 1.0, HDMI-A-2 1920x1080 @ 2.0.

    Symptom: the Actions Ring took several seconds to appear, or didn't appear at all. Each press killed the overlay (error in client communication from KWin, then Broken pipe), and the agent restarted it with 2s/4s/8s backoff. My helper exited instead of busy-looping, so I hit the I/O-error path rather than the spin.

    WAYLAND_DEBUG=client showed the ring surface on the 2x output getting a viewport destination before its first configure:

    -> zwlr_layer_shell_v1#17.get_layer_surface(new id zwlr_layer_surface_v1#79, wl_surface#75, wl_output#5, 3, "openlogi-action-ring")
    -> zwlr_layer_surface_v1#79.set_size(0, 0)
    -> wp_viewporter#14.get_viewport(new id wp_viewport#72, wl_surface#75)
    -> wp_viewport#72.set_destination(0, 0)
    wl_display#1.error(wp_viewport#72, 0, "invalid destination size")
    

    Rendering on the iGPU (ZED_DEVICE_ID) didn't change anything, so it isn't specific to NVIDIA or explicit sync.

    Fix I tested: I guarded the call in gpui-pre-linux 0.3.4 and applied it with [patch.crates-io] on top of v0.8.18:

    --- a/src/linux/wayland/window.rs
    +++ b/src/linux/wayland/window.rs
    @@ -1475,9 +1475,15 @@
     
             {
                 let state = self.state.borrow();
    -            if let Some(viewport) = &state.viewport {
    -                viewport
    -                    .set_destination(f32::from(size.width) as i32, f32::from(size.height) as i32);
    +            // A 0x0 destination is a wp_viewport bad_value and kills the connection. Layer
    +            // surfaces that fill their output start at 0x0 and only get a real size from the
    +            // first configure, which may arrive after the preferred fractional scale.
    +            let (width, height) = (f32::from(size.width) as i32, f32::from(size.height) as i32);
    +            if let Some(viewport) = &state.viewport
    +                && width > 0
    +                && height > 0
    +            {
    +                viewport.set_destination(width, height);
                 }
             }
         }

    With this in place the ring appears instantly on both monitors. KWin no longer disconnects the overlay and the helper doesn't restart. The correct destination is set a moment later when the first configure arrives, as you expected.

  7. AprilNEA commented on Oct 26, 2026

    @AprilNEA
    Owner

    Thanks for testing the guard on 0.8.18. That confirms the fix.

    • Your 2.0 output fits the analysis above: any preferred scale other than the initial 1.0 takes this path.
    • gpui-pre-linux 0.3.10, released today, still calls set_destination without the guard. A version bump alone does not fix it.

    How OpenLogi carries the patch is still open (needs: decision). Until it ships, 100% scale on every output avoids the error.

  8. groobybugs commented on Oct 26, 2026

    @groobybugs

    I also hit this issue with OpenLogi 0.8.17.

    System

    • Lenovo Legion Pro 7 16IAX10H; Intel Core Ultra 9 275HX; NVIDIA GeForce RTX 5090 Laptop GPU
    • Ubuntu 26.04.1 LTS x86_64; kernel 7.3.0-x64v3-xanmod1
    • KDE Plasma 6.6.6 / KWin (Wayland)
    • Built-in display: 2560x1600 at 240 Hz, 125% scaling; no other display connected
    • Logitech MX Master 4 connected through a Logi Bolt receiver

    Steps to reproduce

    1. Start a KDE Plasma Wayland session with the built-in display at 125% scaling.
    2. Connect the mouse and start the OpenLogi agent and overlay.
    3. Check the overlay, CPU usage and system logs.

    Observed: openlogi-overlay repeatedly logged Protocol error 0 on object wp_viewport@36. The overlay used about 77% CPU, systemd-journald about 100%, and rsyslogd about 168% (100% = one CPU core). The fans stayed active, and syslog grew from roughly 12 GiB to 13.3 GiB during diagnosis. A rotated syslog file was already approximately 711 GiB.

    After setting the display to 100% and restarting the agent and overlay, the viewport errors stopped and CPU usage dropped to almost zero during the 32-second check.

  9. AprilNEA commented on Oct 26, 2026

    @AprilNEA
    Owner

    Thanks, this is the same bug. A 125% scale takes the path described above, and 100% avoids it.

    Once the overlay is quiet, you can delete the rotated syslog file that the flood produced. The fix itself is waiting on how OpenLogi carries the GPUI patch (needs: decision), so keep 100% until a release notes the fix.

  10. 8 remaining items

  11. AprilNEA commented on Nov 6, 2026

    @AprilNEA
    Owner

    Thanks for testing the guard on MangoWC. That makes three compositor families where the same guard fixes it: KWin, Hyprland and wlroots.

    • A press on a 1.0× output fails too. The overlay opens one surface per output, all on one Wayland connection. The error on a 1.333× output's surface ends that connection for every surface. Without the guard, every output has to be at 1.0, then restart the agent.
    • The tiled window on your first press is the fallback the overlay opens when no layer surface opens. On a tiling compositor it fills a tile instead of covering the screen, so it does not replace the layer surface.
    • 0.9.0, current master, and the latest gpui-pre-linux (0.3.11) all still make the unguarded call.

    I've added wlroots to the title.

  12. changed the title [-][Bug]: Linux Wayland (KDE, Hyprland): openlogi-overlay gets wp_viewport "invalid destination size" / "Size was <= 0" at startup, then busy-loops (Actions Ring never shows, ~100% CPU, journal flood)[/-] [+][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)[/+] on Nov 6, 2026
  13. rhuhxx commented on Nov 6, 2026

    @rhuhxx

    Confirming this on KDE Plasma (Wayland) as well, with a clean reproduction and a workaround.

    Environment

    • OS: TUXEDO OS (Debian testing base), KDE Plasma 6, Wayland session, single monitor
    • Display scaling at time of failure: 115%
    • OpenLogi 0.9.0 (fresh install, no prior version, no auto-update involved)
    • MX Master 4 via Logi Bolt receiver (device detected fine: openlogi list shows battery/DPI; default binding "Show Actions Ring" on the Haptic Sense Panel intact)

    Symptoms

    • Pressing the Haptic Sense Panel does nothing: no ring, no error in the GUI.
    • openlogi-overlay spins at ~68% CPU permanently.
    • Agent journal floods with the same line every few milliseconds:
    ERROR wayland_backend::sys::client_impl: Protocol error 0 on object wp_viewport@32
    

    Reproduction

    1. KDE Plasma 6 Wayland session, display scaling set to 115% (any non-1.0 fractional scale).
    2. Fresh OpenLogi 0.9.0 install, agent started via systemd user unit.
    3. Press the Actions Ring trigger (Haptic Sense Panel).
    4. Ring never opens; overlay busy-loops with the wp_viewport protocol error above.

    Workaround confirmed
    Setting display scaling to 100% and restarting the agent (systemctl --user restart openlogi-agent.service) makes the problem disappear completely: the overlay goes idle and the Actions Ring opens on panel press. Reappears when a fractional scale is set again.

    This matches the issue analysis: the overlay computes an invalid wp_viewport size under a non-1.0 scale factor, KWin answers with protocol error 0 (bad_value), and the overlay then loops on the broken surface instead of recovering.

    Happy to test a patch or provide further logs (WAYLAND_DEBUG traces etc.) if useful.

  14. AprilNEA commented on Nov 6, 2026

    @AprilNEA
    Owner

    Thanks, this is the same bug. No further logs are needed: the cause is known, and the same guard fixed it for three reporters on KWin, Hyprland and wlroots. Keep 100% scale until a release notes the fix.

  15. jhonaRiver commented on Nov 20, 2026

    @jhonaRiver

    Same bug on niri 26.04 (Ubuntu 26.04, Intel + RTX 4070 hybrid, eDP-1 at 1.5 + HDMI at 1.0). It's also what I reported in #2585, so that one can be closed as a duplicate.

    I carried the width > 0 && height > 0 guard as a vendored gpui-pre-linux 0.3.4 + [patch.crates-io] on top of v0.9.0, in case it's useful as a stopgap while you decide how to ship it:
    jhonaRiver@c26f7e1e (branch jr/wayland-viewport-guard)

    Tested on niri at 1.5×, both outputs, forcing each GPU: the ring opens on both monitors with 0 protocol errors (unpatched: ~450k/s). It's been running as my agent since then without issues.

  16. Wolfeg commented on Nov 30, 2026

    @Wolfeg

    Hitting the same issue on COSMIC (Wayland) with OpenLogi 0.9.0, except both displays are at 100% scale — so the scale = 1 workaround doesn't apply here.

    Setup:

    • Compositor: COSMIC (XDG_SESSION_TYPE=wayland)
    • Displays: two 2560×1440 monitors, both at Scale: 100% (one normal, one rotate90)

    Once the overlay window opens, the main thread of openlogi-overlay pins a CPU core at ~100% and floods journald continuously with:

    ERROR wayland_backend::sys::client_impl: Protocol error 0 on object wp_viewport@38
    

    Would love to see #2070 (or the upstream GPUI fix) land soon, since there's no scaling workaround on COSMIC.

  17. carpweb commented on Nov 30, 2026

    @carpweb

    Same here. OpenLogi flooding my syslog till drive is at 100%...

    2026-11-30T20:03:35.290016+01:00 XPS openlogi-desktop[15211]: #033[2m2026-11-30T19:03:35.279208Z#033[0m #033[31mERROR#033[0m #033[2mwayland_backend::sys::client_impl#033[0m#033[2m:#033[0m Protocol error 0 on object wp_viewport@36

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: guineeds: decisionplatform: linuxstatus: confirmedstatus: upstreamtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions