Skip to content

Clipboard state lost/desynchronized after system suspend (Wayland) #2821

@PouyaPouryaie

Description

@PouyaPouryaie

What Happened?

After the system resumes from a suspend (sleep) cycle, the Wayland clipboard compositor appears to lose the current "selection owner" or focus. Even if data was copied prior to sleep, it cannot be pasted into most applications immediately upon wake. Interestingly, the clipboard content is not entirely purged from memory; attempting a paste (Ctrl+V) in a Code editor to "force" the compositor to re-evaluate the clipboard seat, which restores the clipboard functionality for the rest of the session. This suggests a synchronization issue between the Wayland compositor and the clipboard manager/portal during the transition from S3 sleep state to active.

Steps to Reproduce

Initial State: Ensure you are running a Wayland session.

Action 1: Open any application (e.g., a web browser) and copy a string of text to the clipboard.

Action 2: Verify the copy is successful by pasting it into a notepad or terminal.

Action 3: Put the laptop into Suspend/Sleep mode (via the UI or by closing the lid).

Action 4: Wait a few seconds and wake the laptop. Log back into the session.

Action 5: Attempt to paste the previously copied text into a standard application (e.g., a search bar or text field).

Observation: The paste operation fails (nothing happens, or the "Paste" option is grayed out).

Workaround: Open a Code editor (Application) and press Ctrl+V. The text appears, and subsequent copy-paste operations across the system begin working again.

Expected Behavior

Upon resuming from a suspend/sleep state, the Wayland compositor should maintain the integrity of the clipboard "seat." The text or data copied prior to the suspend cycle should remain immediately available for pasting into any application (native Wayland or XWayland) without requiring a "manual trigger" or a workaround. The transition from sleep to active should be transparent to the clipboard state, ensuring that user productivity is not interrupted by lost focus or desynchronized selection ownership.

OS Version

8.x (Circe)

OS Architecture

amd64 (on most hardwares)

Session Type

Secure Session (Wayland, This is the default)

Software Version

Latest release (I have run all updates)

Log Output

Apr 20 21:33:32 Rayan io.elementary.settings[87715]: Failed to open configuration directory /etc/xdg/xdg-pantheon-wayland/lightdm/lightdm.conf.d: Error opening directory ?/etc/xdg/xdg-pantheon-wayland/lightdm/lightdm.conf.d?: No such file or directory
Apr 20 21:33:32 Rayan io.elementary.settings[87715]: Failed to open configuration directory /usr/share/pantheon-wayland/lightdm/lightdm.conf.d: Error opening directory ?/usr/share/pantheon-wayland/lightdm/lightdm.conf.d?: No such file or directory
Apr 20 21:33:32 Rayan io.elementary.settings[87716]: Failed to open configuration directory /etc/xdg/xdg-pantheon-wayland/lightdm/lightdm.conf.d: Error opening directory ?/etc/xdg/xdg-pantheon-wayland/lightdm/lightdm.conf.d?: No such file or directory
Apr 20 21:33:32 Rayan io.elementary.settings[87716]: Failed to open configuration directory /usr/share/pantheon-wayland/lightdm/lightdm.conf.d: Error opening directory ?/usr/share/pantheon-wayland/lightdm/lightdm.conf.d?: No such file or directory
Apr 20 21:33:32 Rayan io.elementary.settings[87717]: Failed to open configuration directory /etc/xdg/xdg-pantheon-wayland/lightdm/lightdm.conf.d: Error opening directory ?/etc/xdg/xdg-pantheon-wayland/lightdm/lightdm.conf.d?: No such file or directory
Apr 20 21:33:32 Rayan io.elementary.settings[87717]: Failed to open configuration directory /usr/share/pantheon-wayland/lightdm/lightdm.conf.d: Error opening directory ?/usr/share/pantheon-wayland/lightdm/lightdm.conf.d?: No such file or directory

Hardware Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions