Skip to content

Clipboard monitoring fails when main window closed and QT_QPA_PLATFORM=xcb on Wayland (“Qt: Session management error: Could not open network socket”) #3587

Description

@robertstrom

Describe the bug
When I copy something and then copy a second something and then open CopyQ, only the second something that I copied is there saved in CopyQ. I thought that I had found the solution when I found a discussion that seemed to be talking about the same issue. That discussion said to install the Reset Empty Clipboard command. I have installed that command and exited CopyQ and restarted CopyQ and the behavior is still the same.

To Reproduce
Already explained above - CopyQ item 1 to the clipboard. Do not open CopyQ. Copy item 2 to clipboard, then open CopyQ. Only item 2 will be stored. Item #1 is not to be found.

Expected behavior
When I copy multiple things in a row all of the things that I have copied are stored in CopyQ without me having to open the CopyQ program after copying each item.

How can I get CopyQ to work like it always has on an X11 DE where I can copy 10 (or however many) items in a row and they will all be stored in CopyQ?

Screenshots

Version, OS and Environment

CopyQ 15.0.0
Arch: x86_64-little_endian-lp64
Audio: miniaudio 0.11.25
Compiler: GCC
DISPLAY: :1
KGuiAddons: 6.25.0
KNotifications: 6.25.0
KStatusNotifierItem: 6.25.0
OS: CachyOS
QCA: 2.3.10
Qt: 6.11.0
QtKeychain: 0.15.0
WAYLAND_DISPLAY: wayland-1
XDG_CURRENT_DESKTOP: COSMIC
XDG_SESSION_DESKTOP: COSMIC
XDG_SESSION_TYPE: wayland
has-audio: 1
has-encryption: 1
has-global-shortcuts: 1
has-keychain: 1
has-mouse-selection: 1

Additional context

I am starting CopyQ using the recommended method for a Wayland DE. The auto start is set in the Cosmic DE, not by checking the AutoStart box in CopyQ itself. The /usr/share/applications/com.github.hluk.copyq.desktop launcher uses the command shown below.

Exec=env QT_QPA_PLATFORM=xcb copyq

If I start CopyQ manually from the command line I run

env QT_QPA_PLATFORM=xcb copyq &

logs

[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:16:59.096] Note <Server-15955>: Exporting settings
[2026-05-01 08:16:59.098] Note <Server-15955>: Exporting commands
[2026-05-01 08:16:59.158] Note <cmd/onExit-74483>: Terminating application on signal 15
[2026-05-01 08:17:00.767] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:17:00.778] Note <Server-15955>: Terminating application on signal 15
[2026-05-01 08:17:00.779] Warning <Server-15955>: Command “copyq onExit”: Exit code: 143 | 1. copyq onExit
[2026-05-01 08:17:00.779] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:17:00.949] Warning <Server-15955>: [default] The X11 connection broke (error 1). Did the X11 server die?
[2026-05-01 08:36:29.488] Note <Server-5917>: Starting server: CopyQ 15.0.0
[2026-05-01 09:19:50.617] Warning <cmd/monitorClipboard-5927>: Aborting clipboard cloning: Clipboard changed again
[2026-05-01 09:25:39.739] Warning <cmd/monitorClipboard-5927>: Aborting clipboard cloning: Clipboard changed again
[2026-05-01 12:56:29.428] Warning <cmd/monitorClipboard-5927>: Aborting clipboard cloning: Clipboard changed again
[2026-05-03 12:55:49.420] Note <Server-5917>: Exporting settings
[2026-05-03 12:55:49.423] Note <Server-5917>: Exporting commands
[2026-05-03 12:55:56.288] Note <Server-63522>: Starting server: CopyQ 15.0.0
[2026-05-03 19:15:44.444] Note <Server-63522>: Exporting settings
[2026-05-03 19:15:44.445] Note <Server-63522>: Exporting commands
[2026-05-03 19:15:44.952] ERROR <cmd/onClipboardChanged-88279>: Cannot connect to server! Start CopyQ server first.
[2026-05-03 19:16:17.003] Note <Server-88334>: Starting server: CopyQ 15.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions