wl-clipboard icon indicating copy to clipboard operation
wl-clipboard copied to clipboard

Can't paste on xwayland applications anymore

Open AdrienLemaire opened this issue 4 years ago • 23 comments

I've been using wl-clipboard for a couple months without issues, but it stopped working yesterday.

local/wl-clipboard 1:2.0.0-1
local/sway 1:1.4-7
local/xorg-server-xwayland 1.20.7-1 (xorg)

wl-paste and wl-copy work fine with wayland windows and clipman. But whenever I get on an x11 window (Anki, Firefox, or env WINIT_UNIX_BACKEND=x11 alacritty), I can't paste what's in the clipboard anymore. Note that I can copy stuff from x11 windows and paste it into wayland windows.

AdrienLemaire avatar Mar 10 '20 07:03 AdrienLemaire

local/wl-clipboard 1:2.0.0-1

I'm guessing that notation means you're using wl-clipboard 2.0, is that right?

By pasting "on" Xwayland applications, do you mean pasting something you've copied using wl-copy into Xwayland applications?

Can you reproduce this without clipman running? Can you reproduce this on a different compositor (I would suggest Weston)?

Please collect debug logs of wl-copy when you're trying to do this, like this: WAYLAND_DEBUG=1 wl-copy whatever-you-were-doing. Take note of which parts of the log correspond to the initial copy, and which parts correspond to you trying to paste into an Xwayland window.

bugaevc avatar Mar 10 '20 08:03 bugaevc

I'm guessing that notation means you're using wl-clipboard 2.0, is that right?

Correct

By pasting "on" Xwayland applications, do you mean pasting something you've copied using wl-copy into Xwayland applications?

Indeed

I pkilled clipman, but still seeing the issue When checking installed packages sorted by upgrade date, I'm not seeing any relevant package updated recently, and the oldest is clipman updated on 2020-02-29. I'm pretty sure my clipboard had no problems until 2 days ago. Or could it be linux?

[2020-03-08T12:28:05+0900] [ALPM] upgraded linux (5.5.7.arch1-1 -> 5.5.8.arch1-1)

What I'm observing is the "Ctrl-v" or "Ctrl-Shift-v" mapping from x11 apps that hangs and never output anything, when the same mappings from wayland apps output results from wl-paste. Manually executing 'wl-paste' on a xwayland alacritty shell prints the clipboard content fine, but Ctrl-Shift-v doesn't.

I suppose I need to report the bug elsewhere, but I don't know where. I'd have assume sway, but my last update was a month ago

[2020-02-07T08:04:21+0900] [ALPM] upgraded sway (1:1.4-6 -> 1:1.4-7)

AdrienLemaire avatar Mar 10 '20 08:03 AdrienLemaire

I suppose I need to report the bug elsewhere, but I don't know where. I'd have assume sway

This is why I've asked you to try with a different compositor :slightly_smiling_face: and to get a WAYLAND_DEBUG log.

bugaevc avatar Mar 10 '20 08:03 bugaevc

Sorry, never used compton and a bit in a rush atm. Also I had no idea how to set-up WAYLAND_DEBUG on application bindings, and executing wl-paste as-is from an x11 terminal caused no issue.

$ sudo pacman -U /var/cache/pacman/pkg/linux-5.5.7.arch1-1-x86_64.pkg.tar.zst
$ reboot

Looks like copy-pasting works fine now. The issue occurs when upgrading linux from 5.5.7 to 5.5.8. I guess I'll stick to it until next release.

Would love to understand what's happening though. @bugaevc do you not have any issue with wl-clipboard on linux 5.5.8?

AdrienLemaire avatar Mar 10 '20 08:03 AdrienLemaire

I get it that you're using Arch btw, you can stop showing me your pacman invocations :smile:

Sorry, never used compton and a bit in a rush atm.

Sure, feel free to try it later. And I suggested Weston (the Wayland compositor), not Compton (the X11 window manager).

The issue occurs when upgrading linux from 5.5.7 to 5.5.8. I guess I'll stick to it until next release.

It's not possible for a minor stable kernel release to introduce a bug in something as fundamental as pipes and sockets. But it could be that there was a kernel change that exhibits a bug in something else.

Also I had no idea how to set-up WAYLAND_DEBUG on application bindings

I have no idea what application binding you're talking about; here's what you need to do. In your shell, type:

$ WAYLAND_DEBUG=1 wl-copy something
(take note of the lines it outputs)

then try reproducing the issue (copying into an Xwayland window), and see what new lines appear in the log, if any.

Here's what it outputs for me, just to show you an example.

Click me

The initial part:

$ WAYLAND_DEBUG=1 wl-copy something
[2033523.926]  -> [email protected]_registry(new id wl_registry@2)
[2033524.014]  -> [email protected](new id wl_callback@3)
[2033524.396] [email protected]_id(3)
[2033524.454] [email protected](1, "wl_shm", 1)
[2033524.498]  -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[2033524.571] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[2033524.619] [email protected](3, "wl_drm", 2)
[2033524.685] [email protected](4, "wl_compositor", 4)
[2033524.737]  -> [email protected](4, "wl_compositor", 2, new id [unknown]@5)
[2033524.832] [email protected](5, "wl_subcompositor", 1)
[2033524.878] [email protected](6, "wl_data_device_manager", 3)
[2033524.935]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
[2033525.017] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[2033525.094] [email protected](8, "gtk_primary_selection_device_manager", 1)
[2033525.149]  -> [email protected](8, "gtk_primary_selection_device_manager", 1, new id [unknown]@7)
[2033525.214] [email protected](9, "zxdg_output_manager_v1", 3)
[2033525.270] [email protected](10, "org_kde_kwin_idle", 1)
[2033525.324] [email protected](11, "zwp_idle_inhibit_manager_v1", 1)
[2033525.370] [email protected](12, "zwlr_layer_shell_v1", 2)
[2033525.416] [email protected](13, "xdg_wm_base", 2)
[2033525.462]  -> [email protected](13, "xdg_wm_base", 1, new id [unknown]@8)
[2033525.537] [email protected](14, "zwp_tablet_manager_v2", 1)
[2033525.596] [email protected](15, "org_kde_kwin_server_decoration_manager", 1)
[2033525.656] [email protected](16, "zxdg_decoration_manager_v1", 1)
[2033525.715] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[2033525.773] [email protected](18, "zwp_pointer_constraints_v1", 1)
[2033525.834] [email protected](19, "wp_presentation", 1)
[2033525.892] [email protected](20, "zwlr_output_manager_v1", 1)
[2033525.950] [email protected](21, "zwlr_export_dmabuf_manager_v1", 1)
[2033526.011] [email protected](22, "zwlr_screencopy_manager_v1", 2)
[2033526.081] [email protected](23, "zwlr_data_control_manager_v1", 2)
[2033526.143]  -> [email protected](23, "zwlr_data_control_manager_v1", 2, new id [unknown]@9)
[2033526.226] [email protected](24, "zwp_primary_selection_device_manager_v1", 1)
[2033526.287]  -> [email protected](24, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@10)
[2033526.368] [email protected](25, "zwp_virtual_keyboard_manager_v1", 1)
[2033526.428] [email protected](26, "zwlr_virtual_pointer_manager_v1", 1)
[2033526.486] [email protected](27, "zwlr_input_inhibit_manager_v1", 1)
[2033526.546] [email protected](28, "wl_seat", 7)
[2033526.606]  -> [email protected](28, "wl_seat", 2, new id [unknown]@11)
[2033526.688] [email protected](29, "zwp_pointer_gestures_v1", 1)
[2033526.747] [email protected](30, "wl_output", 3)
[2033526.806] [email protected](1)
[2033526.837]  -> [email protected](new id wl_callback@3)
[2033527.063] [email protected]_id(3)
[2033527.094] [email protected]("seat0")
[2033527.123] [email protected](3)
[2033527.148] [email protected](1)
[2033527.171]  -> [email protected]_data_device(new id zwlr_data_control_device_v1@3, wl_seat@11)
[2033527.223]  -> [email protected]_data_source(new id zwlr_data_control_source_v1@12)
[2033527.255]  -> [email protected]("text/plain")
[2033527.279]  -> [email protected]("text/plain;charset=utf-8")
[2033527.309]  -> [email protected]("TEXT")
[2033527.333]  -> [email protected]("STRING")
[2033527.356]  -> [email protected]("UTF8_STRING")
[2033527.381]  -> [email protected]_selection(zwlr_data_control_source_v1@12)
[2033527.410]  -> [email protected](new id wl_callback@13)
[2033527.679] [email protected]_id(13)
[2033527.733] [email protected](nil)
[2033527.759] [email protected]_selection(nil)
[2033527.784] [email protected]_offer(new id zwlr_data_control_offer_v1@804449456)
[2033527.825] [email protected]("text/plain")
[2033527.850] [email protected]("text/plain;charset=utf-8")
[2033527.879] [email protected]("TEXT")
[2033527.903] [email protected]("STRING")
[2033527.927] [email protected]("UTF8_STRING")
[2033527.952] [email protected](zwlr_data_control_offer_v1@4278190080)
[2033527.982] [email protected](2)

Then when pasting pasting into an Xwayland client:

[2186319.269] [email protected]("text/plain;charset=utf-8", fd 4)

bugaevc avatar Mar 10 '20 09:03 bugaevc

After some time, the issue re-appeared

$ WAYLAND_DEBUG=1 wl-copy something
[629595.593]  -> [email protected]_registry(new id wl_registry@2)
[629595.615]  -> [email protected](new id wl_callback@3)
[629595.667] [email protected]_id(3)
[629595.674] [email protected](1, "wl_shm", 1)
[629595.681]  -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[629595.694] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[629595.701] [email protected](3, "wl_drm", 2)
[629595.709] [email protected](4, "wl_compositor", 4)
[629595.718]  -> [email protected](4, "wl_compositor", 2, new id [unknown]@5)
[629595.730] [email protected](5, "wl_subcompositor", 1)
[629595.736] [email protected](6, "wl_data_device_manager", 3)
[629595.745]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
[629595.758] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[629595.768] [email protected](8, "gtk_primary_selection_device_manager", 1)
[629595.775]  -> [email protected](8, "gtk_primary_selection_device_manager", 1, new id [unknown]@7)
[629595.789] [email protected](9, "zxdg_output_manager_v1", 3)
[629595.798] [email protected](10, "org_kde_kwin_idle", 1)
[629595.806] [email protected](11, "zwp_idle_inhibit_manager_v1", 1)
[629595.816] [email protected](12, "zwlr_layer_shell_v1", 2)
[629595.824] [email protected](13, "xdg_wm_base", 2)
[629595.833]  -> [email protected](13, "xdg_wm_base", 1, new id [unknown]@8)
[629595.843] [email protected](14, "zwp_tablet_manager_v2", 1)
[629595.850] [email protected](15, "org_kde_kwin_server_decoration_manager", 1)
[629595.860] [email protected](16, "zxdg_decoration_manager_v1", 1)
[629595.869] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[629595.878] [email protected](18, "zwp_pointer_constraints_v1", 1)
[629595.887] [email protected](19, "wp_presentation", 1)
[629595.894] [email protected](20, "zwlr_output_manager_v1", 1)
[629595.902] [email protected](21, "zwlr_export_dmabuf_manager_v1", 1)
[629595.911] [email protected](22, "zwlr_screencopy_manager_v1", 2)
[629595.919] [email protected](23, "zwlr_data_control_manager_v1", 2)
[629595.930]  -> [email protected](23, "zwlr_data_control_manager_v1", 2, new id [unknown]@9)
[629595.945] [email protected](24, "zwp_primary_selection_device_manager_v1", 1)
[629595.955]  -> [email protected](24, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@10)
[629595.967] [email protected](25, "zwp_virtual_keyboard_manager_v1", 1)
[629595.977] [email protected](26, "zwlr_virtual_pointer_manager_v1", 1)
[629595.987] [email protected](27, "zwlr_input_inhibit_manager_v1", 1)
[629595.997] [email protected](28, "wl_seat", 7)
[629596.005]  -> [email protected](28, "wl_seat", 2, new id [unknown]@11)
[629596.017] [email protected](29, "zwp_pointer_gestures_v1", 1)
[629596.025] [email protected](30, "wl_output", 3)
[629596.033] [email protected](9749)
[629596.037]  -> [email protected](new id wl_callback@3)
[629596.068] [email protected]_id(3)
[629596.072] [email protected]("seat0")
[629596.076] [email protected](7)
[629596.082] [email protected](9749)
[629596.085]  -> [email protected]_data_device(new id zwlr_data_control_device_v1@3, wl_seat@11)
[629596.095]  -> [email protected]_data_source(new id zwlr_data_control_source_v1@12)
[629596.100]  -> [email protected]("text/plain")
[629596.104]  -> [email protected]("text/plain;charset=utf-8")
[629596.108]  -> [email protected]("TEXT")
[629596.112]  -> [email protected]("STRING")
[629596.115]  -> [email protected]("UTF8_STRING")
[629596.120]  -> [email protected]_selection(zwlr_data_control_source_v1@12)
[629596.125]  -> [email protected](new id wl_callback@13)
[629596.189] [email protected]_id(13)
[629596.201] [email protected]_offer(new id zwlr_data_control_offer_v1@1871600816)
[629596.210] [email protected]("TEXT")
[629596.215] [email protected]("text/plain")
[629596.223] [email protected]("text/plain;charset=utf-8")
[629596.227] [email protected]("STRING")
[629596.232] [email protected]("UTF8_STRING")
[629596.237] [email protected](zwlr_data_control_offer_v1@4278190080)
[629596.245] [email protected]_offer(new id zwlr_data_control_offer_v1@1871600912)
[629596.253] [email protected]("text/plain;charset=utf-8")
[629596.259] [email protected]_selection(zwlr_data_control_offer_v1@4278190081)
[629596.265] [email protected]_offer(new id zwlr_data_control_offer_v1@1871601296)
[629596.273] [email protected]("text/plain")
[629596.280] [email protected]("text/plain;charset=utf-8")
[629596.286] [email protected]("TEXT")
[629596.293] [email protected]("STRING")
[629596.299] [email protected]("UTF8_STRING")
[629596.305] [email protected](zwlr_data_control_offer_v1@4278190082)
[629596.310] [email protected](9750)
[629596.413] [email protected]("text/plain;charset=utf-8", fd 4)

Output when pasting on an xwayland window

[755919.310] [email protected]("text/plain;charset=utf-8", fd 4)

And nothing got printed in the xwayland window's input field.

Note that it took me a while figuring out how to get that output. WAYLAND_DEBUG=1 wl-copy something will not always continue printing debug logs to stdout. It looks like I need to run wl-copy twice in a row in order for future logs to be printed to stdout.

AdrienLemaire avatar Mar 10 '20 11:03 AdrienLemaire

It looks like I need to run wl-copy twice in a row in order for future logs to be printed to stdout.

No, this should absolutely not happen, are you sure?

Output when pasting on an xwayland window

This looks like wl-copy is doing everything right. Does this line appear each time you try to paste, or only once?

Can you also please run wl-copy under strace, like this:

$ strace -f wl-copy

And get me the new lines that appear when pasting?

bugaevc avatar Mar 10 '20 11:03 bugaevc

I have a similar issue, and I think it might be related.

It was also working fine before and started causing issue after archlinux upgrade.

But I notice a bit different behaviour. If I copy from firefox in wayland mode, I cannot paste as wl-paste hangs.

I did an strace. (I did an Ctrl-C to kill it at the end, but it was hanging indefinitely).

If I quit firefox and start it again, it rework, until it doesn't. I wasn't able to determine an action or a time until it doesn't work anymore.

Strace logs

$ env WAYLAND_DEBUG=1 strace -f wl-paste |wgetpaste -s gists                                                                                                                                                                                                                           
execve("/usr/bin/wl-paste", ["wl-paste"], 0x7fff20c66fe8 /* 55 vars */) = 0
brk(NULL)                               = 0x55f43a6a0000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fff6f39a320) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=484680, ...}) = 0
mmap(NULL, 484680, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3838800000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`q\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\22\344\22\321\223\216\303\377yu\37\16\205\363\33\305"..., 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=2145592, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f38387fe000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\22\344\22\321\223\216\303\377yu\37\16\205\363\33\305"..., 68, 880) = 68
mmap(NULL, 1856312, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3838638000
mmap(0x7f383865d000, 1359872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f383865d000
mmap(0x7f38387a9000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000) = 0x7f38387a9000
mmap(0x7f38387f4000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bb000) = 0x7f38387f4000
mmap(0x7f38387fa000, 13112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f38387fa000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libwayland-client.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 P\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=59888, ...}) = 0
mmap(NULL, 62248, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3838628000
mmap(0x7f383862d000, 20480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f383862d000
mmap(0x7f3838632000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f3838632000
mmap(0x7f3838635000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7f3838635000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libffi.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@ \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=38784, ...}) = 0
mmap(NULL, 42248, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f383861d000
mprotect(0x7f383861f000, 28672, PROT_NONE) = 0
mmap(0x7f383861f000, 20480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f383861f000
mmap(0x7f3838624000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f3838624000
mmap(0x7f3838626000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f3838626000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\201\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\246\3\345\314l\313m\35\34T,H\225\r>\277"..., 68, 824) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=158240, ...}) = 0
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\246\3\345\314l\313m\35\34T,H\225\r>\277"..., 68, 824) = 68
mmap(NULL, 135584, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f38385fb000
mmap(0x7f3838602000, 65536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f3838602000
mmap(0x7f3838612000, 20480, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f3838612000
mmap(0x7f3838617000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7f3838617000
mmap(0x7f3838619000, 12704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3838619000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f38385f9000
arch_prctl(ARCH_SET_FS, 0x7f38385f9b80) = 0
mprotect(0x7f38387f4000, 12288, PROT_READ) = 0
mprotect(0x7f3838617000, 4096, PROT_READ) = 0
mprotect(0x7f3838626000, 4096, PROT_READ) = 0
mprotect(0x7f3838635000, 8192, PROT_READ) = 0
mprotect(0x55f4394ee000, 8192, PROT_READ) = 0
mprotect(0x7f38388a2000, 4096, PROT_READ) = 0
munmap(0x7f3838800000, 484680)          = 0
set_tid_address(0x7f38385f9e50)         = 3716271
set_robust_list(0x7f38385f9e60, 24)     = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7f3838602be0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f383860f800}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f3838602c80, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f383860f800}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL)                               = 0x55f43a6a0000
brk(0x55f43a6c1000)                     = 0x55f43a6c1000
lstat("/dev", {st_mode=S_IFDIR|0755, st_size=3940, ...}) = 0
lstat("/dev/fd", {st_mode=S_IFLNK|0777, st_size=13, ...}) = 0
readlink("/dev/fd", "/proc/self/fd", 4095) = 13
lstat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
readlink("/proc/self", "3716271", 4095) = 7
lstat("/proc/3716271", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat("/proc/3716271/fd", {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0
lstat("/proc/3716271/fd/1", {st_mode=S_IFLNK|0300, st_size=64, ...}) = 0
readlink("/proc/3716271/fd/1", "pipe:[7640746]", 4095) = 14
lstat("/proc/3716271/fd/pipe:[7640746]", 0x7fff6f39a190) = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/run/user/1000/wayland-0"}, 27) = 0
write(2, "[2581972.233]  -> [email protected]"..., 44[2581972.233]  -> [email protected]_registry() = 44
write(2, "new id wl_registry@", 19new id wl_registry@)     = 19
write(2, "2", 12)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581972.310]  -> [email protected]"..., 36[2581972.310]  -> [email protected]() = 36
write(2, "new id wl_callback@", 19new id wl_callback@)     = 19
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\0\0\1\0\f\0\2\0\0\0\1\0\0\0\0\0\f\0\3\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 24
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0\0\0\0\0\34\0\1\0\0\0\7\0\0\0wl_shm\0\0\1\0\0\0\2\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 1424
write(2, "[2581972.475] [email protected]"..., 37[2581972.475] [email protected]_id() = 37
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581972.538] [email protected]"..., 35[2581972.538] [email protected]() = 35
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_shm\"", 8"wl_shm")               = 8
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581972.677]  -> wl_registry@2."..., 37[2581972.677]  -> [email protected]() = 37
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_shm\"", 8"wl_shm")               = 8
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "4", 14)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581972.886] [email protected]"..., 35[2581972.886] [email protected]() = 35
write(2, "2", 12)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_linux_dmabuf_v1\"", 21"zwp_linux_dmabuf_v1") = 21
write(2, ", ", 2, )                       = 2
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581973.056] [email protected]"..., 35[2581973.056] [email protected]() = 35
write(2, "3", 13)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_drm\"", 8"wl_drm")               = 8
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581973.171] [email protected]"..., 35[2581973.171] [email protected]() = 35
write(2, "4", 14)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_compositor\"", 15"wl_compositor")       = 15
write(2, ", ", 2, )                       = 2
write(2, "4", 14)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581973.352]  -> wl_registry@2."..., 37[2581973.352]  -> [email protected]() = 37
write(2, "4", 14)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_compositor\"", 15"wl_compositor")       = 15
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "5", 15)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581973.597] [email protected]"..., 35[2581973.597] [email protected]() = 35
write(2, "5", 15)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_subcompositor\"", 18"wl_subcompositor")    = 18
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581973.720] [email protected]"..., 35[2581973.720] [email protected]() = 35
write(2, "6", 16)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_data_device_manager\"", 24"wl_data_device_manager") = 24
write(2, ", ", 2, )                       = 2
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581973.885]  -> wl_registry@2."..., 37[2581973.885]  -> [email protected]() = 37
write(2, "6", 16)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"wl_data_device_manager\"", 24"wl_data_device_manager") = 24
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "6", 16)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581974.131] [email protected]"..., 35[2581974.131] [email protected]() = 35
write(2, "7", 17)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_gamma_control_manager_v1\"", 31"zwlr_gamma_control_manager_v1") = 31
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581974.297] [email protected]"..., 35[2581974.297] [email protected]() = 35
write(2, "8", 18)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"gtk_primary_selection_device_ma"..., 38"gtk_primary_selection_device_manager") = 38
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581974.455]  -> wl_registry@2."..., 37[2581974.455]  -> [email protected]() = 37
write(2, "8", 18)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"gtk_primary_selection_device_ma"..., 38"gtk_primary_selection_device_manager") = 38
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "7", 17)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581974.674] [email protected]"..., 35[2581974.674] [email protected]() = 35
write(2, "9", 19)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "\"zxdg_output_manager_v1\"", 24"zxdg_output_manager_v1") = 24
write(2, ", ", 2, )                       = 2
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581974.810] [email protected]"..., 35[2581974.810] [email protected]() = 35
write(2, "10", 210)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"org_kde_kwin_idle\"", 19"org_kde_kwin_idle")   = 19
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581974.971] [email protected]"..., 35[2581974.971] [email protected]() = 35
write(2, "11", 211)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_idle_inhibit_manager_v1\"", 29"zwp_idle_inhibit_manager_v1") = 29
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581975.134] [email protected]"..., 35[2581975.134] [email protected]() = 35
write(2, "12", 212)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_layer_shell_v1\"", 21"zwlr_layer_shell_v1") = 21
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581975.301] [email protected]"..., 35[2581975.301] [email protected]() = 35
write(2, "13", 213)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"xdg_wm_base\"", 13"xdg_wm_base")         = 13
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581975.453]  -> wl_registry@2."..., 37[2581975.453]  -> [email protected]() = 37
write(2, "13", 213)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"xdg_wm_base\"", 13"xdg_wm_base")         = 13
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "8", 18)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581975.668] [email protected]"..., 35[2581975.668] [email protected]() = 35
write(2, "14", 214)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_tablet_manager_v2\"", 23"zwp_tablet_manager_v2") = 23
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581975.820] [email protected]"..., 35[2581975.820] [email protected]() = 35
write(2, "15", 215)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"org_kde_kwin_server_decoration_"..., 40"org_kde_kwin_server_decoration_manager") = 40
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581975.964] [email protected]"..., 35[2581975.964] [email protected]() = 35
write(2, "16", 216)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zxdg_decoration_manager_v1\"", 28"zxdg_decoration_manager_v1") = 28
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581976.261] [email protected]"..., 35[2581976.261] [email protected]() = 35
write(2, "17", 217)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_relative_pointer_manager_v1"..., 33"zwp_relative_pointer_manager_v1") = 33
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581976.407] [email protected]"..., 35[2581976.407] [email protected]() = 35
write(2, "18", 218)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_pointer_constraints_v1\"", 28"zwp_pointer_constraints_v1") = 28
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581976.540] [email protected]"..., 35[2581976.540] [email protected]() = 35
write(2, "19", 219)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"wp_presentation\"", 17"wp_presentation")     = 17
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581976.667] [email protected]"..., 35[2581976.667] [email protected]() = 35
write(2, "20", 220)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_output_manager_v1\"", 24"zwlr_output_manager_v1") = 24
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581976.792] [email protected]"..., 35[2581976.792] [email protected]() = 35
write(2, "21", 221)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_export_dmabuf_manager_v1\"", 31"zwlr_export_dmabuf_manager_v1") = 31
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581976.918] [email protected]"..., 35[2581976.918] [email protected]() = 35
write(2, "22", 222)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_screencopy_manager_v1\"", 28"zwlr_screencopy_manager_v1") = 28
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581977.050] [email protected]"..., 35[2581977.050] [email protected]() = 35
write(2, "23", 223)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_data_control_manager_v1\"", 30"zwlr_data_control_manager_v1") = 30
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581977.194]  -> wl_registry@2."..., 37[2581977.194]  -> [email protected]() = 37
write(2, "23", 223)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_data_control_manager_v1\"", 30"zwlr_data_control_manager_v1") = 30
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "9", 19)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581977.400] [email protected]"..., 35[2581977.400] [email protected]() = 35
write(2, "24", 224)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_primary_selection_device_ma"..., 41"zwp_primary_selection_device_manager_v1") = 41
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581977.517]  -> wl_registry@2."..., 37[2581977.517]  -> [email protected]() = 37
write(2, "24", 224)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_primary_selection_device_ma"..., 41"zwp_primary_selection_device_manager_v1") = 41
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "10", 210)                       = 2
write(2, ")\n", 2)
)                      = 2
write(2, "[2581977.714] [email protected]"..., 35[2581977.714] [email protected]() = 35
write(2, "25", 225)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_virtual_keyboard_manager_v1"..., 33"zwp_virtual_keyboard_manager_v1") = 33
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581977.856] [email protected]"..., 35[2581977.856] [email protected]() = 35
write(2, "26", 226)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_virtual_pointer_manager_v1"..., 33"zwlr_virtual_pointer_manager_v1") = 33
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581978.011] [email protected]"..., 35[2581978.011] [email protected]() = 35
write(2, "27", 227)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwlr_input_inhibit_manager_v1\"", 31"zwlr_input_inhibit_manager_v1") = 31
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581978.131] [email protected]"..., 35[2581978.131] [email protected]() = 35
write(2, "28", 228)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"wl_seat\"", 9"wl_seat")              = 9
write(2, ", ", 2, )                       = 2
write(2, "7", 17)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581978.265]  -> wl_registry@2."..., 37[2581978.265]  -> [email protected]() = 37
write(2, "28", 228)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"wl_seat\"", 9"wl_seat")              = 9
write(2, ", ", 2, )                       = 2
write(2, "2", 12)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "new id [unknown]@", 17new id [unknown]@)       = 17
write(2, "11", 211)                       = 2
write(2, ")\n", 2)
)                      = 2
write(2, "[2581978.505] [email protected]"..., 35[2581978.505] [email protected]() = 35
write(2, "29", 229)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"zwp_pointer_gestures_v1\"", 25"zwp_pointer_gestures_v1") = 25
write(2, ", ", 2, )                       = 2
write(2, "1", 11)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581978.671] [email protected]"..., 35[2581978.671] [email protected]() = 35
write(2, "30", 230)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"wl_output\"", 11"wl_output")           = 11
write(2, ", ", 2, )                       = 2
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581978.815] [email protected]"..., 35[2581978.815] [email protected]() = 35
write(2, "31", 231)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"wl_output\"", 11"wl_output")           = 11
write(2, ", ", 2, )                       = 2
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.295] [email protected]"..., 35[2581979.295] [email protected]() = 35
write(2, "36", 236)                       = 2
write(2, ", ", 2, )                       = 2
write(2, "\"wl_output\"", 11"wl_output")           = 11
write(2, ", ", 2, )                       = 2
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.448] [email protected]"..., 33[2581979.448] [email protected]() = 33
write(2, "203306", 6203306)                   = 6
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.517]  -> [email protected]"..., 36[2581979.517]  -> [email protected]() = 36
write(2, "new id wl_callback@", 19new id wl_callback@)     = 19
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0\0\0\0\0 \0\1\0\0\0\7\0\0\0wl_shm\0\0\1\0\0\0\4\0\0\0"..., iov_len=384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 384
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\4\0\0\0\0\0\f\0\0\0\0\0\4\0\0\0\0\0\f\0\1\0\0\0\4\0\0\0\0\0\f\0"..., iov_len=2672}, {iov_base="", iov_len=1424}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 104
write(2, "[2581979.709] [email protected]"..., 37[2581979.709] [email protected]_id() = 37
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.762] [email protected](", 30[2581979.762] [email protected]() = 30
write(2, "\"seat0\"", 7"seat0")                = 7
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.821] [email protected]"..., 38[2581979.821] [email protected]() = 38
write(2, "3", 13)                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.884] [email protected]"..., 33[2581979.884] [email protected]() = 33
write(2, "203306", 6203306)                   = 6
write(2, ")\n", 2)
)                      = 2
write(2, "[2581979.954]  -> zwlr_data_cont"..., 65[2581979.954]  -> [email protected]_data_device() = 65
write(2, "new id zwlr_data_control_device_"..., 35new id zwlr_data_control_device_v1@) = 35
write(2, "3", 13)                        = 1
write(2, ", ", 2, )                       = 2
write(2, "wl_seat@11", 10wl_seat@11)              = 10
write(2, ")\n", 2)
)                      = 2
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\t\0\0\0\1\0\20\0\3\0\0\0\v\0\0\0", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 16
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\3\0\0\0\0\0\f\0\0\0\0\377\0\0\0\377\0\0\30\0\f\0\0\0UTF8_STR"..., iov_len=2568}, {iov_base="", iov_len=1528}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 388
write(2, "[2581980.134] zwlr_data_control_"..., 55[2581980.134] [email protected]_offer() = 55
write(2, "new id zwlr_data_control_offer_v"..., 34new id zwlr_data_control_offer_v1@) = 34
write(2, "980051856", 9980051856)                = 9
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.227] zwlr_data_control_"..., 58[2581980.227] [email protected]() = 58
write(2, "\"UTF8_STRING\"", 13"UTF8_STRING")         = 13
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.293] zwlr_data_control_"..., 58[2581980.293] [email protected]() = 58
write(2, "\"COMPOUND_TEXT\"", 15"COMPOUND_TEXT")       = 15
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.357] zwlr_data_control_"..., 58[2581980.357] [email protected]() = 58
write(2, "\"TEXT\"", 6"TEXT")                 = 6
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.422] zwlr_data_control_"..., 58[2581980.422] [email protected]() = 58
write(2, "\"STRING\"", 8"STRING")               = 8
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.497] zwlr_data_control_"..., 58[2581980.497] [email protected]() = 58
write(2, "\"text/plain;charset=utf-8\"", 26"text/plain;charset=utf-8") = 26
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.560] zwlr_data_control_"..., 58[2581980.560] [email protected]() = 58
write(2, "\"text/plain\"", 12"text/plain")          = 12
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.629] zwlr_data_control_"..., 58[2581980.629] [email protected]() = 58
write(2, "\"SAVE_TARGETS\"", 14"SAVE_TARGETS")        = 14
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.690] zwlr_data_control_"..., 54[2581980.690] [email protected]() = 54
write(2, "zwlr_data_control_offer_v1@42781"..., 37zwlr_data_control_offer_v1@4278190080) = 37
write(2, ")\n", 2)
)                      = 2
pipe([4, 5])                            = 0
fcntl(5, F_DUPFD_CLOEXEC, 0)            = 6
write(2, "[2581980.792]  -> zwlr_data_cont"..., 64[2581980.792]  -> [email protected]() = 64
write(2, "\"text/plain;charset=utf-8\"", 26"text/plain;charset=utf-8") = 26
write(2, ", ", 2, )                       = 2
write(2, "fd 6", 4fd 6)                     = 4
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.888]  -> [email protected]"..., 36[2581980.888]  -> [email protected]() = 36
write(2, "new id wl_callback@", 19new id wl_callback@)     = 19
write(2, "12", 212)                       = 2
write(2, ")\n", 2)
)                      = 2
write(2, "[2581980.962] zwlr_data_control_"..., 55[2581980.962] [email protected]_offer() = 55
write(2, "new id zwlr_data_control_offer_v"..., 34new id zwlr_data_control_offer_v1@) = 34
write(2, "980051952", 9980051952)                = 9
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.070] zwlr_data_control_"..., 58[2581981.070] [email protected]() = 58
write(2, "\"UTF8_STRING\"", 13"UTF8_STRING")         = 13
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.133] zwlr_data_control_"..., 58[2581981.133] [email protected]() = 58
write(2, "\"COMPOUND_TEXT\"", 15"COMPOUND_TEXT")       = 15
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.202] zwlr_data_control_"..., 58[2581981.202] [email protected]() = 58
write(2, "\"TEXT\"", 6"TEXT")                 = 6
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.276] zwlr_data_control_"..., 58[2581981.276] [email protected]() = 58
write(2, "\"STRING\"", 8"STRING")               = 8
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.361] zwlr_data_control_"..., 58[2581981.361] [email protected]() = 58
write(2, "\"text/plain;charset=utf-8\"", 26"text/plain;charset=utf-8") = 26
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.416] zwlr_data_control_"..., 58[2581981.416] [email protected]() = 58
write(2, "\"text/plain\"", 12"text/plain")          = 12
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.499] zwlr_data_control_"..., 62[2581981.499] [email protected]_selection() = 62
write(2, "zwlr_data_control_offer_v1@42781"..., 37zwlr_data_control_offer_v1@4278190081) = 37
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.578]  -> zwlr_data_cont"..., 64[2581981.578]  -> [email protected]() = 64
write(2, ")\n", 2)
)                      = 2
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\377\0\0(\0\31\0\0\0text/plain;charset=u"..., iov_len=60}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[6]}], msg_controllen=20, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 60
close(6)                                = 0
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\f\0\0\0\0\0\f\0*\32\3\0\1\0\0\0\1\0\f\0\f\0\0\0", iov_len=2180}, {iov_base="", iov_len=1916}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 24
write(2, "[2581981.745] [email protected]"..., 37[2581981.745] [email protected]_id() = 37
write(2, "12", 212)                       = 2
write(2, ")\n", 2)
)                      = 2
write(2, "[2581981.823] [email protected]"..., 34[2581981.823] [email protected]() = 34
write(2, "203306", 6203306)                   = 6
write(2, ")\n", 2)
)                      = 2
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 3716292 attached
, child_tidptr=0x7f38385f9e50) = 3716292
[pid 3716271] close(4 <unfinished ...>
[pid 3716292] set_robust_list(0x7f38385f9e60, 24 <unfinished ...>
[pid 3716271] <... close resumed>)      = 0
[pid 3716292] <... set_robust_list resumed>) = 0
[pid 3716271] close(5)                  = 0
[pid 3716271] wait4(-1,  <unfinished ...>
[pid 3716292] dup2(4, 0)                = 0
[pid 3716292] close(4)                  = 0
[pid 3716292] close(5)                  = 0
[pid 3716292] execve("/home/kuon/.asdf/shims/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.asdf/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/opt/android-sdk/platform-tools//cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/opt/android-sdk/tools/bin//cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/opt/android-sdk/emulator//cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.local/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.cargo/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/go/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.node/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/opt/android-sdk/platform-tools//cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/opt/android-sdk/tools/bin//cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/opt/android-sdk/emulator//cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.local/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.cargo/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/go/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/home/kuon/.node/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/usr/local/sbin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/usr/local/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = -1 ENOENT (No such file or directory)
[pid 3716292] execve("/usr/bin/cat", ["cat"], 0x7fff6f39a408 /* 55 vars */) = 0
[pid 3716292] brk(NULL)                 = 0x5650cba82000
[pid 3716292] arch_prctl(0x3001 /* ARCH_??? */, 0x7fff4f00eb00) = -1 EINVAL (Invalid argument)
[pid 3716292] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 3716292] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 3716292] fstat(3, {st_mode=S_IFREG|0644, st_size=484680, ...}) = 0
[pid 3716292] mmap(NULL, 484680, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fba85f5e000
[pid 3716292] close(3)                  = 0
[pid 3716292] openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 3716292] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`q\2\0\0\0\0\0"..., 832) = 832
[pid 3716292] pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
[pid 3716292] pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
[pid 3716292] pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\22\344\22\321\223\216\303\377yu\37\16\205\363\33\305"..., 68, 880) = 68
[pid 3716292] fstat(3, {st_mode=S_IFREG|0755, st_size=2145592, ...}) = 0
[pid 3716292] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fba85f5c000
[pid 3716292] pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
[pid 3716292] pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
[pid 3716292] pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\22\344\22\321\223\216\303\377yu\37\16\205\363\33\305"..., 68, 880) = 68
[pid 3716292] mmap(NULL, 1856312, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fba85d96000
[pid 3716292] mmap(0x7fba85dbb000, 1359872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fba85dbb000
[pid 3716292] mmap(0x7fba85f07000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000) = 0x7fba85f07000
[pid 3716292] mmap(0x7fba85f52000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bb000) = 0x7fba85f52000
[pid 3716292] mmap(0x7fba85f58000, 13112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fba85f58000
[pid 3716292] close(3)                  = 0
[pid 3716292] arch_prctl(ARCH_SET_FS, 0x7fba85f5d580) = 0
[pid 3716292] mprotect(0x7fba85f52000, 12288, PROT_READ) = 0
[pid 3716292] mprotect(0x5650cb005000, 4096, PROT_READ) = 0
[pid 3716292] mprotect(0x7fba86000000, 4096, PROT_READ) = 0
[pid 3716292] munmap(0x7fba85f5e000, 484680) = 0
[pid 3716292] brk(NULL)                 = 0x5650cba82000
[pid 3716292] brk(0x5650cbaa3000)       = 0x5650cbaa3000
[pid 3716292] openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 3716292] fstat(3, {st_mode=S_IFREG|0644, st_size=3040304, ...}) = 0
[pid 3716292] mmap(NULL, 3040304, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fba85aaf000
[pid 3716292] close(3)                  = 0
[pid 3716292] fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid 3716292] fstat(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid 3716292] fadvise64(0, 0, 0, POSIX_FADV_SEQUENTIAL) = -1 ESPIPE (Illegal seek)
[pid 3716292] mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fba85fb3000
[pid 3716292] read(0, ^C <unfinished ...>
[pid 3716271] <... wait4 resumed>NULL, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
strace: Process 3716271 detached
strace: Process 3716292 detached

kuon avatar Mar 14 '20 23:03 kuon

@kuon thanks, but that almost certainly looks like a Firefox hang, wl-paste is just waiting for it to respond. Are you able to reproduce this with any other applications? Because if I'm right, you shouldn't be.

bugaevc avatar Mar 15 '20 06:03 bugaevc

I didn't realize wl-paste would have to ask Firefox anything, I thought the clipboard buffer lived inside the the WM. This explains a very annoying issue I had with clipboard data disappearing when I close apps.

And yes, I only got this issue with Firefox.

-- Nicolas Goy

kuon avatar Mar 15 '20 07:03 kuon

For reference, I reported an issue to Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1623235

As this issue seems unrelated to the present one, I will open a new issue if needed.

kuon avatar Mar 18 '20 06:03 kuon

I thought the clipboard buffer lived inside the the WM. This explains a very annoying issue I had with clipboard data disappearing when I close apps.

Not all WMs implement that functionality; Sway (which it appears you're using) does not — but you can use an external clipboard manager with it. Here are a few that are based on wl-clipboard:

  • https://github.com/yory8/clipman
  • https://github.com/janza/wl-clipboard-history (note: not affiliated with me, despite the name)
  • https://github.com/sentriz/cliphist

bugaevc avatar Mar 18 '20 06:03 bugaevc

wl-clipboard worked fine for a couple weeks, and I started again having issues with xwayland windows since yesterday.

Here's what I observe: The first screenshot that I take (bindsym --release Print exec grim -g \"$(slurp)" - | wl-copy) can be printed in Anki (xwayland), but subsequent screenshots won't (when pasting on anki, I keep seeing the initial screenshot). When using wl-paste to save the screenshot in a file, the latest one is saved.

Can't copy the strace code to firefox, joining a file containing it instead: strace.txt

Could this have something to do with the /etc/ld.so.preload: No such file or directory ?

AdrienLemaire avatar Mar 31 '20 00:03 AdrienLemaire

Found out from https://github.com/swaywm/sway/issues/4007 that this is probably a duplicated of #72. Sorry for not finding it 3 weeks ago.

Edit: tried reinstalling wl-clipboard from sources, pkilled Xwayland and restarted without clipman, and I can reproduce the issue consistently: wl-clipboard works fine until I try pasting an image into an xwayland window.

AdrienLemaire avatar Mar 31 '20 01:03 AdrienLemaire

Can't copy the strace code to firefox, joining a file containing it instead: strace.txt

That is a trace of wl-paste, not wl-copy 🙂

Could this have something to do with the /etc/ld.so.preload: No such file or directory ?

No

Found out from swaywm/sway#4007 that this is probably a duplicated of #72. Sorry for not finding it 3 weeks ago.

No worries — I know about that Sway issue, and I've been trying to understand whether your issue is the same.

I can reproduce the issue consistently: wl-clipboard works fine until I try pasting an image into an xwayland window.

What if you copy an image from something else than wl-copy (another native Wayland client) — can you still reproduce the problem without wl-clipboard at all?

bugaevc avatar Mar 31 '20 05:03 bugaevc

Got lot of work to catch up, will try another time. Assuming I need to remove wl-copy from my alacritty config and try copy-pasting to anki

Now that I understood the issue only occurs when pasting images, I'm using the following binding to convert to a text url (since Anki auto-downloads it for me, the result is the same)

bindsym --release Print exec grim -g \"$(slurp)" - | imgur.sh | tee | head -n2 | tail -n1 | wl-copy

The pain point of this issue is now much lower :)

AdrienLemaire avatar Mar 31 '20 05:03 AdrienLemaire

I have geany running (not even sure if its xwayland, no window decorations) and the GDK_BACKEND and session stuff is set to wayland.

And suddenly seemingly at random I cannot copy from it or paste to it anything that wasn't copied from inside it. When copying something from outside the thing that was copied inside is wiped out (nothing is being pasted anymore) alacritty terminals and firefox-wayland and even xwayland chromium can still copy and paste between themselves fine.

How is wl-clipboard involved in this?

wl-copy is used occasionally but seems to be left running without cause

You mean the background process of wl-copy that serves paste requests? If you prefer it to run in the foreground, use --foreground. If that's not what you mean, please open a separate issue about it.

bugaevc avatar Apr 11 '20 06:04 bugaevc

the issue with geany goes away when i stop using wl-copy and wl-paste

Alright, then what are the exact steps to reproduce this? Which compositor are you running? (and is this reproducible with other compositors?) Do you use wl-copy to copy, and them cannot paste into Geany, or do you copy from Geany, and then cannot paste it into wl-paste (but still can paste it into other apps)?

could you point me to a tool that doesn't need to be running or serving anything but just copying stuff into the wayland clipboard when executed and then immediately close?

That's not how the clipboard works, under either Wayland or X11. Someone has to store and serve the copied data. Of course, as a user, you would like to "copy and forget", which is why wl-copy serves requests in the background by default.

bugaevc avatar Apr 11 '20 06:04 bugaevc

I got this in my Sway config at the moment:

bindsym --release $mod+s exec --no-startup-id grim -g "$(slurp)" - | wl-copy

Copying and pasting screenshot using this method into Nautilus works just fine but trying to paste to Chrome or Telegram (XWayland) doesn't and the X apps crash. What would be the best way to debug this more in-depth? I think this could be related

A side issue, "+y from Neovim after the above is done also doesn't paste the content and crashes the apps. Terminal is Kitty

fourstepper avatar Apr 19 '20 21:04 fourstepper

What would be the best way to debug this more in-depth?

The first step is always to try to isolate the bug. Can you also reproduce this if you run wl-copy < some-image.png manually? (If so, grim and keybindings are unrelated.) Then, can you reproduce this on a different compositor? (If so, Sway is unrelated.) Then, can you reproduce it by copying an image from another native Wayland client? (If so, wl-clipboard is unrelated.)

Then, you could look at how those X11 apps crash. Maybe they output something to the log; maybe you can inspect core dumps or run them under a debugger and see what happens.

bugaevc avatar Apr 20 '20 06:04 bugaevc

Hm, I think I might have a pointer. It's difficult to track down as it is not completely deterministic (or so it seems) but by comparing two really similar setups of mine, I found the following difference:

The working one had xdg-desktop-portal-gtk running, the other one xdg-desktop-portal-wlr. To confirm use an AUR wrapper for the wlr-portal:

For a non-working (ie. pasting from Wayland to Xwayland doesn't work) configuration:

$ pkiill Xwayland
$ yay -S xdg-desktop-portal-wlr-git
$ yay -Rc xdg-desktop-portal-gtk
$ systemctl --user daemon-reload
$ systemctl --user stop xdg-desktop-portal-gtk 
$ systemctl --user restart xdg-desktop-portal-wlr

For a working configuration:

$ pkill Xwayland
$ yay -Rc xdg-desktop-portal-wlr-git
$ yay -S xdg-desktop-portal-gtk
$ systemctl --user daemon-reload
$ systemctl --user stop xdg-desktop-portal-wlr
$ systemctl --user restart xdg-desktop-portal-gtk

I hope this helps reproducing and working around the problem...

ljrk0 avatar Apr 23 '20 11:04 ljrk0

Can you also reproduce this if you run wl-copy < some-image.png manually? (If so, grim and keybindings are unrelated.) Then, can you reproduce this on a different compositor? (If so, Sway is unrelated.)

wl-copy < some-image.png reproduces this issue, however a different compositor (GNOME Wayland) does not reproduce this issue. I do not have other compositors available to test.

LilRooks avatar Jul 01 '20 23:07 LilRooks

Hello; is this still relevant?

https://github.com/swaywm/sway/issues/4007 has been fixed, for what it's worth.

bugaevc avatar Aug 06 '21 09:08 bugaevc

Assuming that this has been fixed (in https://github.com/swaywm/sway/issues/4007), please reopen if not.

bugaevc avatar Mar 24 '23 08:03 bugaevc