Skip to content

[Bug] Hovering dock icons causes visual flicker on the same monitor (multi-monitor, Xwayland, AMD/Wayland) #2413

@EliveltonRepolho

Description

@EliveltonRepolho

Summary

On a dual-monitor setup, hovering over any icon in the COSMIC dock causes a brief but noticeable visual flicker on the monitor where the dock is being hovered. The flicker appears as a folder/file thumbnail or desktop element briefly blinking. This happens regardless of whether the dock is shown on one or both monitors.

Steps to Reproduce

  1. Set up a dual-monitor configuration (internal display + external display via HDMI)
  2. Keep the dock visible on at least one monitor
  3. Move the mouse cursor over any icon in the dock
  4. Observe the monitor where the cursor/dock is located

Expected behavior: Dock icon hover animation plays smoothly with no side effects on other elements.

Actual behavior: A desktop element (e.g. a folder thumbnail or file icon) flickers/blinks on the same monitor where the hover occurred.

Environment

Field Value
OS Pop!_OS 24.04 LTS
Kernel 6.18.7-76061807-generic
Session type Wayland
Compositor cosmic-comp 0.1~1779380826~24.04~6ebe2a1
GPU AMD Radeon Graphics (Barcelo / GCN-5, chip ID 1002:15e7)
CPU AMD Ryzen 7 5825U with Radeon Graphics
RAM 30 GiB
Driver amdgpu (kernel)
Mesa 25.2.8-0ubuntu0.24.04.1
libdrm-amdgpu 2.4.125-1ubuntu0.1~24.04.1
Xwayland 24.1.2

Monitor configuration

Output Model Resolution Position Primary
eDP-1 CSO 0x1646 (internal) 1920x1200 +0+0 Yes (Xwayland)
HDMI-A-1 ASUS XG27ACS 2560x1440 +1920+0 No

Combined virtual resolution: 4480x1440

Installed COSMIC packages

cosmic-applets        1.0.12~1779200847~24.04~03c302d
cosmic-app-library    1.0.12~1779208853~24.04~df2b050
cosmic-bg             0.1.0~1777510525~24.04~b1ca4c1
cosmic-comp           0.1~1779380826~24.04~6ebe2a1
cosmic-panel          0.1.0~1779208585~24.04~26fee6c
cosmic-session        1.0.0~1778176227~24.04~495e591
cosmic-settings       1.0.12~1779208567~24.04~f19da76
cosmic-settings-daemon 0.1.0~1778691637~24.04~fa82bdf
cosmic-workspaces     1.0.12~1778599136~24.04~cd729d0

Relevant logs

Running journalctl --user -b 0 reveals two recurring errors from cosmic-comp that correlate with the flicker:

Error 1 — Repeated on every dock hover interaction

cosmic-comp[3028]: Failed to set xwayland primary output: The provided output wasn't known to Xwayland

This error fires in bursts of 3 entries every time the mouse hovers over a dock icon. It appears that cosmic-comp attempts to notify Xwayland of the active output during the hover event, but Xwayland does not have that output registered in its internal map, causing the call to fail.

Error 2 — Recurring throughout the session

cosmic-comp[3028]: Failed to force redraw for corner radius change.

This appears independently of hover but also occurs during the same interactions. It may be a secondary symptom of the Xwayland output sync failure.

Error 3 — On session start (missing config keys)

cosmic-greeter[3139]: errors loading cosmic-comp config: [
  GetKey("workspaces", Os { code: 2, kind: NotFound, message: "No such file or directory" }),
  GetKey("descale_xwayland", Os { code: 2, kind: NotFound, message: "No such file or directory" }),
  GetKey("xwayland_eavesdropping", Os { code: 2, kind: NotFound, message: "No such file or directory" }),
  ...
]

The compositor starts with no saved config file, so all settings (including Xwayland-related ones like descale_xwayland) fall back to defaults. It is unclear whether the missing config contributes to the Xwayland output sync issue.

What was already tried

  • Setting HDMI-A-1 as the Xwayland primary output via xrandr --output HDMI-A-1 --primary — did not resolve the flicker.
  • Restricting the dock to a single monitor — did not resolve the flicker.
  • Running sudo apt upgrade cosmic-comp — already on the latest available version for 24.04.

Hypothesis

When a native Wayland surface (the dock) receives a pointer-enter event, cosmic-comp attempts to call the Xwayland primary output API to sync the active output. Because the Xwayland output map does not contain the compositor's internal output reference at that moment (possibly due to the multi-monitor layout or missing config), the call fails. The failed call causes a partial compositor redraw that manifests as a one-frame flicker of elements on that monitor.

This appears to be related to, but distinct from:

Additional context

  • The flicker only occurs on the monitor where the mouse cursor is actively hovering the dock — not on the other monitor simultaneously.
  • The visual artifact that flickers appears to be a desktop element (folder or file thumbnail), not the dock icon itself.
  • The issue is consistently reproducible every time the mouse enters a dock icon.
  • No GPU crash or session instability occurs — this is purely a visual artifact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions