Bug 511659

Summary: Primary selection not working
Product: [Plasma] kwin Reporter: igor
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, xaver.hugl
Priority: NOR    
Version First Reported In: 6.5.1   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description igor 2025-11-05 02:31:43 UTC
SUMMARY
Primary clipboard is not working with wl-clipboard or wl-clipboard-rs

STEPS TO REPRODUCE
1. Run `wl-paste -p`

OBSERVED RESULT
Using wl-clipboard stderr says:
The compositor does not seem to support primary selection

On reddit, it was mentioned that using wl-clipboard-rs fixes the issue. It did not in my case. Stderr output:
Error: The clipboard of the requested seat is empty

EXPECTED RESULT
Stdout should be the current selection.

SOFTWARE/OS VERSIONS
Operating System: NixOS 25.11
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 4090

ADDITIONAL INFORMATION
wl-clipboard version: wl-clipboard 2.2.1
wl-clipboard-rs version: wl-paste 0.9.2
Comment 1 David Edmundson 2025-11-05 10:50:54 UTC
Works here.
Please include output of WAYLAND_DEBUG=1 wl-paste -p
Comment 2 igor 2025-11-05 15:46:33 UTC
❯ WAYLAND_DEBUG=1 wl-paste -p
[3417207.940] {Default Queue}  -> wl_display#1.get_registry(new id wl_registry#2)
[3417207.947] {Default Queue}  -> wl_display#1.sync(new id wl_callback#3)
[3417213.205] {Display Queue} wl_display#1.delete_id(3)
[3417213.215] {Default Queue} wl_registry#2.global(1, "wl_compositor", 6)
[3417213.222] {Default Queue}  -> wl_registry#2.bind(1, "wl_compositor", 2, new id [unknown]#4)
[3417213.226] {Default Queue} wl_registry#2.global(3, "zwp_tablet_manager_v2", 2)
[3417213.231] {Default Queue} wl_registry#2.global(4, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[3417213.234] {Default Queue} wl_registry#2.global(5, "zxdg_decoration_manager_v1", 1)
[3417213.236] {Default Queue} wl_registry#2.global(6, "wp_viewporter", 1)
[3417213.240] {Default Queue} wl_registry#2.global(7, "wp_security_context_manager_v1", 1)
[3417213.244] {Default Queue} wl_registry#2.global(8, "wp_fractional_scale_manager_v1", 1)
[3417213.246] {Default Queue} wl_registry#2.global(9, "wl_shm", 2)
[3417213.249] {Default Queue}  -> wl_registry#2.bind(9, "wl_shm", 1, new id [unknown]#5)
[3417213.253] {Default Queue} wl_registry#2.global(10, "wl_seat", 10)
[3417213.256] {Default Queue}  -> wl_registry#2.bind(10, "wl_seat", 2, new id [unknown]#6)
[3417213.259] {Default Queue} wl_registry#2.global(11, "zwp_pointer_gestures_v1", 3)
[3417213.262] {Default Queue} wl_registry#2.global(12, "zwp_pointer_constraints_v1", 1)
[3417213.265] {Default Queue} wl_registry#2.global(13, "zwp_relative_pointer_manager_v1", 1)
[3417213.268] {Default Queue} wl_registry#2.global(14, "wl_data_device_manager", 3)
[3417213.271] {Default Queue}  -> wl_registry#2.bind(14, "wl_data_device_manager", 1, new id [unknown]#7)
[3417213.276] {Default Queue} wl_registry#2.global(15, "ext_data_control_manager_v1", 1)
[3417213.280] {Default Queue} wl_registry#2.global(16, "wp_cursor_shape_manager_v1", 2)
[3417213.283] {Default Queue} wl_registry#2.global(17, "org_kde_kwin_idle", 1)
[3417213.286] {Default Queue} wl_registry#2.global(18, "zwp_idle_inhibit_manager_v1", 1)
[3417213.289] {Default Queue} wl_registry#2.global(19, "ext_idle_notifier_v1", 2)
[3417213.293] {Default Queue} wl_registry#2.global(20, "org_kde_plasma_shell", 8)
[3417213.295] {Default Queue} wl_registry#2.global(21, "org_kde_kwin_appmenu_manager", 2)
[3417213.298] {Default Queue} wl_registry#2.global(22, "org_kde_kwin_server_decoration_palette_manager", 1)
[3417213.302] {Default Queue} wl_registry#2.global(24, "org_kde_plasma_virtual_desktop_management", 3)
[3417213.305] {Default Queue} wl_registry#2.global(26, "org_kde_kwin_shadow_manager", 2)
[3417213.308] {Default Queue} wl_registry#2.global(27, "org_kde_kwin_dpms_manager", 1)
[3417213.312] {Default Queue} wl_registry#2.global(28, "org_kde_kwin_server_decoration_manager", 1)
[3417213.315] {Default Queue} wl_registry#2.global(29, "kde_output_management_v2", 16)
[3417213.318] {Default Queue} wl_registry#2.global(30, "zxdg_output_manager_v1", 3)
[3417213.321] {Default Queue} wl_registry#2.global(31, "wl_subcompositor", 1)
[3417213.325] {Default Queue} wl_registry#2.global(32, "zxdg_exporter_v2", 1)
[3417213.328] {Default Queue} wl_registry#2.global(33, "zxdg_importer_v2", 1)
[3417213.330] {Default Queue} wl_registry#2.global(36, "xdg_activation_v1", 1)
[3417213.333] {Default Queue}  -> wl_registry#2.bind(36, "xdg_activation_v1", 1, new id [unknown]#8)
[3417213.336] {Default Queue} wl_registry#2.global(38, "wp_content_type_manager_v1", 1)
[3417213.340] {Default Queue} wl_registry#2.global(39, "wp_tearing_control_manager_v1", 1)
[3417213.342] {Default Queue} wl_registry#2.global(40, "xdg_toplevel_drag_manager_v1", 1)
[3417213.345] {Default Queue} wl_registry#2.global(41, "xdg_toplevel_icon_manager_v1", 1)
[3417213.348] {Default Queue} wl_registry#2.global(42, "kde_screen_edge_manager_v1", 1)
[3417213.351] {Default Queue} wl_registry#2.global(43, "frog_color_management_factory_v1", 1)
[3417213.354] {Default Queue} wl_registry#2.global(44, "wp_presentation", 2)
[3417213.357] {Default Queue} wl_registry#2.global(45, "wp_color_manager_v1", 1)
[3417213.360] {Default Queue} wl_registry#2.global(46, "xdg_wm_dialog_v1", 1)
[3417213.363] {Default Queue} wl_registry#2.global(47, "kde_external_brightness_v1", 3)
[3417213.366] {Default Queue} wl_registry#2.global(48, "wp_alpha_modifier_v1", 1)
[3417213.370] {Default Queue} wl_registry#2.global(49, "wl_fixes", 1)
[3417213.373] {Default Queue} wl_registry#2.global(50, "wp_fifo_manager_v1", 1)
[3417213.376] {Default Queue} wl_registry#2.global(51, "wp_single_pixel_buffer_manager_v1", 1)
[3417213.380] {Default Queue} wl_registry#2.global(52, "xdg_toplevel_tag_manager_v1", 1)
[3417213.382] {Default Queue} wl_registry#2.global(53, "wp_color_representation_manager_v1", 1)
[3417213.386] {Default Queue} wl_registry#2.global(54, "wp_pointer_warp_v1", 1)
[3417213.390] {Default Queue} wl_registry#2.global(56, "wl_drm", 2)
[3417213.392] {Default Queue} wl_registry#2.global(57, "zwp_linux_dmabuf_v1", 5)
[3417213.395] {Default Queue} wl_registry#2.global(58, "wp_linux_drm_syncobj_manager_v1", 1)
[3417213.398] {Default Queue} wl_registry#2.global(60, "xdg_wm_base", 6)
[3417213.401] {Default Queue}  -> wl_registry#2.bind(60, "xdg_wm_base", 1, new id [unknown]#9)
[3417213.404] {Default Queue} wl_registry#2.global(61, "zwlr_layer_shell_v1", 5)
[3417213.407] {Default Queue} wl_registry#2.global(63, "kde_output_device_v2", 16)
[3417213.410] {Default Queue} wl_registry#2.global(64, "wl_output", 4)
[3417213.413] {Default Queue} wl_registry#2.global(65, "wp_drm_lease_device_v1", 1)
[3417213.415] {Default Queue} wl_registry#2.global(66, "kde_output_order_v1", 1)
[3417213.418] {Default Queue} wl_registry#2.global(67, "zwp_text_input_manager_v1", 1)
[3417213.422] {Default Queue} wl_registry#2.global(68, "zwp_text_input_manager_v2", 1)
[3417213.424] {Default Queue} wl_registry#2.global(69, "zwp_text_input_manager_v3", 1)
[3417213.427] {Default Queue} wl_registry#2.global(71, "org_kde_kwin_slide_manager", 1)
[3417213.430] {Default Queue} wl_registry#2.global(72, "xdg_system_bell_v1", 1)
[3417213.433] {Default Queue} wl_callback#3.done(33240)
[3417213.437] {Default Queue}  -> wl_display#1.sync(new id wl_callback#3)
[3417213.482] {Display Queue} wl_display#1.delete_id(3)
[3417213.486] {Default Queue} discarded wl_shm#5.format(0)
[3417213.488] {Default Queue} discarded wl_shm#5.format(1)
[3417213.491] {Default Queue} discarded wl_shm#5.format(808669761)
[3417213.493] {Default Queue} discarded wl_shm#5.format(808669784)
[3417213.495] {Default Queue} discarded wl_shm#5.format(808665665)
[3417213.498] {Default Queue} discarded wl_shm#5.format(808665688)
[3417213.501] {Default Queue} discarded wl_shm#5.format(942948929)
[3417213.503] {Default Queue} discarded wl_shm#5.format(942948952)
[3417213.506] {Default Queue} discarded wl_shm#5.format(875710274)
[3417213.509] {Default Queue} discarded wl_shm#5.format(875710290)
[3417213.511] {Default Queue} wl_seat#6.name("seat0")
[3417213.514] {Default Queue} wl_seat#6.capabilities(3)
[3417213.517] {Default Queue} wl_callback#3.done(33240)
The compositor does not seem to support primary selection


I don't see anything that might be causing this in that output, but I also don't know exactly what to look for.
Comment 3 Bug Janitor Service 2025-11-20 03:47:09 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Zamundaaa 2025-11-27 20:44:28 UTC
That looks like you maybe simply disabled primary selection in the "general behavior" settings?
Comment 5 igor 2025-12-01 01:34:10 UTC
That fixed it.
I would still consider this a bug, personally.

Middle-click to paste is not something I ever use and I had no idea that had anything to do with primary selection. 

I would suggest one of two things:
1. Add some text to the system settings option that says something like "Truning this off will disable primary selection". Also, add primary selection to the searchable terms for that field, so that searching for primary selection in system settings brings up that spot.
2. Break out primary selection into its own setting, possibly next to this one or not accessible in system settings.
Comment 6 Vlad Zahorodnii 2025-12-02 08:10:34 UTC
> Middle-click to paste is not something I ever use and I had no idea that had anything to do with primary selection. 

Well, it's always been like this.

> Break out primary selection into its own setting, possibly next to this one or not accessible in system settings

They are the same thing. Regarding the wording, I think it's fine. Primary selection is a technical name, while middle click is a more user friendly name.
Comment 7 Vlad Zahorodnii 2025-12-02 08:11:00 UTC
a more user friendly wording.*
Comment 8 igor 2025-12-03 19:39:51 UTC
"Middle click to paste" means it has something to do with the action of pasting, i.e., moving from the primary clipboard buffer to somewhere.
To me, disabling pasting from that buffer does not imply disabling the buffer all together.

I understand this is a minor issue, and I just had it somehow disabled after an update.
However, is it possible to add "primary selection" to the keywords, that if searched for, would bring you to that setting?
Comment 9 Bug Janitor Service 2025-12-05 16:32:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3368
Comment 10 Zamundaaa 2025-12-05 20:19:56 UTC
Git commit c81bdc3b544513a655d9ca2676d3a5d5710b06c0 by Xaver Hugl.
Committed on 05/12/2025 at 20:19.
Pushed by zamundaaa into branch 'master'.

kcms/workspaceoptions: add "primary selection" to keywords

While "primary" and "selection" are in there already, seaching for "primary selection"
doesn't find the kcm in system settings.

M  +1    -1    kcms/workspaceoptions/kcm_workspace.json

https://invent.kde.org/plasma/plasma-desktop/-/commit/c81bdc3b544513a655d9ca2676d3a5d5710b06c0