Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wl-copy hangs indefinitely when ran from .desktop file #168

Open
Silejonu opened this issue Apr 6, 2023 · 19 comments
Open

wl-copy hangs indefinitely when ran from .desktop file #168

Silejonu opened this issue Apr 6, 2023 · 19 comments
Labels
cant-grab-focus Compositor disallows stealing focus but does not support wlr-data-control

Comments

@Silejonu
Copy link

Silejonu commented Apr 6, 2023

wl-clipboard version: 2.1.0
OS: Arch Linux & Fedora 37
DE: GNOME 43

Running wl-copy from the command-line or through a script works flawlessly. Running wl-copy from a .desktop file hangs indefinitely.
This bug started happening a few days ago. I think I had a Mutter update recently, so this may be related. I am certain it was working previously on the same systems since I use wl-copy inside a homemade script I run regularly.

Steps to reproduce:

  1. Create the file /usr/share/applications/wl-copy_debug.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=wl-copy_debug
Comment=wl-copy debug .desktop file
Exec=/usr/local/bin/wl-copy_debug.sh
Terminal=true
  1. Create the file /usr/local/bin/wl-copy_debug.sh
#!/usr/bin/bash

echo 'Text from wl-copy_debug.sh' | wl-copy
  1. Run the program "wl-copy_debug".
  2. A terminal opens, but nothing happens. Nothing related to wl-clipboard shows up in journalctl either.
  3. Run /usr/local/bin/wl-copy_debug.sh from the terminal. The text is copied as expected.
  4. Run echo 'Text from the CLI' | wl-copy from the terminal. The text is copied as expected.

The bug is not reproducible in Debian 11 with GNOME 3.38.5 nor Arch Linux with KDE Plasma. This makes me suspect the issue is tied to a Mutter update.
Could this be a change in API? Or a bug in Mutter? In any case, I have no programming skills, and I am incapable of understanding the root cause. Please let me know if I can help in troubleshooting in any way.

@bugaevc
Copy link
Owner

bugaevc commented Apr 6, 2023

Hi! I can not reproduce this, it works as expected here: "Text from wl-copy_debug.sh" appears in the clipboard.

You could try to make your script more verbose. For instance, add some logging before and after invoking wl-copy, maybe like this:

(echo Running wl-copy as PID $BASHPID && WAYLAND_DEBUG=1 exec wl-copy Text from wl-copy_debug.sh) |& logger
logger wl-copy has returned $?

Then see if anything appears in the journal. If nothing at all does, it likely doesn't even get run. If only the PID does, that likely means wl-copy is hanging, and you should be able to attach to it with GDB and see what it hangs on (in case you're not familiar with using GDB: run it like gdb -p $PID_OF_WL_COPY, then type bt for backtrace, then post the output of that here so I can analyze it). Or maybe it will output lots of Wayland communication logs, you could send me that too.

@Silejonu
Copy link
Author

Silejonu commented Apr 7, 2023

Running from the .desktop file, I get no output. Two processes are launched:

$ ps -ef | grep wl-copy
silejonu      15097   14922  0 09:18 pts/1    00:00:00 /usr/bin/bash /usr/local/bin/wl-copy_debug.sh
silejonu      15098   15097  0 09:18 pts/1    00:00:00 wl-copy Text from wl-copy_debug.sh

gdb -p 15097 gives this:

(gdb) bt
#0  0x00007f8867e10537 in __GI___wait4 (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffe3a550650, options=options@entry=0, usage=usage@entry=0x0)
    at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007f8867e104fb in __GI___waitpid (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffe3a550650, options=options@entry=0) at waitpid.c:38
#2  0x000055f00fb48aa1 in waitchld.constprop.0 (block=block@entry=1, wpid=<optimized out>) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:3800
#3  0x000055f00faa80b2 in wait_for (pid=15099, flags=0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:2980
#4  0x000055f00fa8c722 in execute_command_internal (command=command@entry=0x55f011374750, asynchronous=asynchronous@entry=0, 
    pipe_in=pipe_in@entry=3, pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x55f011374860)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:923
#5  0x000055f00fa890b0 in execute_pipeline (command=command@entry=0x55f011374830, asynchronous=asynchronous@entry=0, pipe_in=<optimized out>, 
    pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x55f011374860) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:2648
#6  0x000055f00fa89c95 in execute_connection (fds_to_close=0x55f011374860, pipe_out=-1, pipe_in=<optimized out>, asynchronous=0, 
    command=0x55f011374830) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:2787
#7  execute_command_internal (command=command@entry=0x55f011374830, asynchronous=asynchronous@entry=0, pipe_in=pipe_in@entry=-1, 
    pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x55f011374860) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:1052
#8  0x000055f00fa8ca02 in execute_command (command=0x55f011374830) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:417
#9  0x000055f00fa7c8ea in reader_loop () at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/eval.c:172
#10 0x000055f00fa73c9e in main (argc=2, argv=0x7ffe3a550fc8, env=0x7ffe3a550fe0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/shell.c:843

gdb -p 15098 gives this:

(gdb) bt
#0  0x00007f96c05da1e4 in __GI___poll (fds=fds@entry=0x7fffcb5f3960, nfds=nfds@entry=1, timeout=timeout@entry=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f96c06c21d4 in poll (__timeout=-1, __nfds=1, __fds=0x7fffcb5f3960) at /usr/include/bits/poll2.h:39
#2  wl_display_poll (display=0x55c20b67f2a0, events=1) at ../src/wayland-client.c:1878
#3  wl_display_dispatch_queue (queue=<optimized out>, display=<optimized out>) at ../src/wayland-client.c:1951
#4  wl_display_dispatch_queue (display=display@entry=0x55c20b67f2a0, queue=queue@entry=0x55c20b67f370) at ../src/wayland-client.c:1924
#5  0x00007f96c06c2220 in wl_display_dispatch (display=display@entry=0x55c20b67f2a0) at ../src/wayland-client.c:2026
#6  0x000055c209e62b4a in main (argc=<optimized out>, argv=<optimized out>) at ../src/wl-copy.c:275

Running from the terminal, I get no output. The command hangs indefinitely, but the text is copied immediately in the clipboard. One process is launched:

ps -ef | grep wl-copy
silejonu      16664    1844  0 09:27 pts/0    00:00:00 wl-copy Text from wl-copy_debug.sh

gdb -p 16664 gives this:

(gdb) bt
#0  0x00007f55148cb1e4 in __GI___poll (fds=fds@entry=0x7ffd26398120, nfds=nfds@entry=1, timeout=timeout@entry=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f55149b31d4 in poll (__timeout=-1, __nfds=1, __fds=0x7ffd26398120) at /usr/include/bits/poll2.h:39
#2  wl_display_poll (display=0x55e415e152a0, events=1) at ../src/wayland-client.c:1878
#3  wl_display_dispatch_queue (queue=<optimized out>, display=<optimized out>) at ../src/wayland-client.c:1951
#4  wl_display_dispatch_queue (display=display@entry=0x55e415e152a0, queue=queue@entry=0x55e415e15370) at ../src/wayland-client.c:1924
#5  0x00007f55149b3220 in wl_display_dispatch (display=display@entry=0x55e415e152a0) at ../src/wayland-client.c:2026
#6  0x000055e414f4db4a in main (argc=<optimized out>, argv=<optimized out>) at ../src/wl-copy.c:275

@bugaevc
Copy link
Owner

bugaevc commented Apr 7, 2023

One of your messages seems to have disappeared, but here's the interesting bit:

[3111157.837]  -> [email protected]_pool(new id wl_shm_pool@15, fd 5, 4)
[3111157.840]  -> [email protected]_buffer(new id wl_buffer@16, 0, 1, 1, 4, 0)
[3111157.844]  -> [email protected](wl_buffer@16, 0, 0)
[3111157.846]  -> [email protected](0, 0, 1, 1)
[3111157.847]  -> [email protected]()

This means it's a case of cant-grab-focus Compositor disallows stealing focus but does not support wlr-data-control ! It seems plausible that Mutter's focus-stealing prevention kicks in in case wl-clipboard is run from a .desktop file and not "directly". On the other hand, it seems unlikely that Mutter is able to cross-reference wl-clipboard's Wayland connection to the .desktop file it has previously launched, since it's not sandboxed in any way, and in this case is done from a different process.

If that's the case, there should be a proper startup token in the env that Mutter wants us to use to get focus. I went ahead and filed #169 to implement support for that.

@Silejonu
Copy link
Author

Silejonu commented Apr 7, 2023

I have deleted my previous message because I had not correctly copied the command you asked me to try. I had done this instead:

$(echo Running wl-copy as PID $BASHPID && WAYLAND_DEBUG=1 exec wl-copy Text from wl-copy_debug.sh) |& logger
logger wl-copy has returned $?

bugaevc added a commit that referenced this issue Apr 9, 2023
If someone happens to leave an activation token for wl-clipboard, it
will now use it to request its window to be activated.

Resolves #169

This should hopefully help with
#168
@bugaevc
Copy link
Owner

bugaevc commented Apr 9, 2023

I have pushed a couple of commits that should hopefully help with this. Could you please build the latest wl-clipboard from source (with all the optional dependencies present, otherwise it won't have any effect!) and try this again?

@Silejonu
Copy link
Author

Sadly this didn't help.
I installed wayland-devel and wayland-protocols-devel, which were not previously installed, before building wl-clipboard.

Result of gdb for /usr/bin/bash /usr/local/bin/wl-copy_debug.sh:

(gdb) bt
#0  0x00007f4e2e300537 in __GI___wait4 (pid=pid@entry=-1, 
    stat_loc=stat_loc@entry=0x7ffc05a9b110, 
    options=options@entry=0, usage=usage@entry=0x0)
    at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007f4e2e3004fb in __GI___waitpid (pid=pid@entry=-1, 
    stat_loc=stat_loc@entry=0x7ffc05a9b110, 
    options=options@entry=0) at waitpid.c:38
#2  0x000055f196763aa1 in waitchld.constprop.0 (
    block=block@entry=1, wpid=<optimized out>)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:3800
#3  0x000055f1966c30b2 in wait_for (pid=15848, flags=0)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:2980
#4  0x000055f1966a7722 in execute_command_internal (
    command=command@entry=0x55f1968d8750, 
    asynchronous=asynchronous@entry=0, 
    pipe_in=pipe_in@entry=3, pipe_out=pipe_out@entry=-1, 
    fds_to_close=fds_to_close@entry=0x55f1968d8860)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:923
#5  0x000055f1966a40b0 in execute_pipeline (
    command=command@entry=0x55f1968d8830, 
    asynchronous=asynchronous@entry=0, 
    pipe_in=<optimized out>, pipe_out=pipe_out@entry=-1, 
    fds_to_close=fds_to_close@entry=0x55f1968d8860)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:2648
#6  0x000055f1966a4c95 in execute_connection (
    fds_to_close=0x55f1968d8860, pipe_out=-1, 
    pipe_in=<optimized out>, asynchronous=0, 
    command=0x55f1968d8830)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:2787
#7  execute_command_internal (

Result of gdb for wl-copy Text from wl-copy_debug.sh:

(gdb) bt
#0  0x00007f8ea083e1e4 in __GI___poll (fds=fds@entry=0x7ffec0cb9910, nfds=nfds@entry=1, timeout=timeout@entry=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8ea09261d4 in poll (__timeout=-1, __nfds=1, __fds=0x7ffec0cb9910) at /usr/include/bits/poll2.h:39
#2  wl_display_poll (display=0x21372a0, events=1) at ../src/wayland-client.c:1878
#3  wl_display_dispatch_queue (queue=<optimized out>, display=<optimized out>) at ../src/wayland-client.c:1951
#4  wl_display_dispatch_queue (display=0x21372a0, queue=0x2137370) at ../src/wayland-client.c:1924
#5  0x0000000000402b48 in main (argc=4, argv=0x7ffec0cb9ab8) at ../src/wl-copy.c:311

The weird thing is that I initially thought it helped, as I tested it in a VM first. But my issue was not reproducible there. The bug is present of two different machines, one on Fedora 37, the other on Arch Linux with GNOME. I could not reproduce the bug in a VM in Fedora nor Arch. I tried to reproduce it on some spare bare metal machines (one on Arch with KDE Plasma, the other on Fedora 37), thinking it could have something to do with my VMs, but I could not reproduce the bug either.
If it was only one machine that had an issue, I would have thought my installation was problematic, but this happens on two different machines with two different systems.

@Silejonu
Copy link
Author

As an aside, I just tried downgrading Mutter to version 43.3 on Arch Linux (it was previously on version 43.4), and it did fix the issue (with wl-clipboard installed through the Arch repos).

@bugaevc
Copy link
Owner

bugaevc commented Apr 10, 2023

Result of gdb for /usr/bin/bash /usr/local/bin/wl-copy_debug.sh

This is just a backtrace of bash waiting for wl-copy to exit, that's not very useful...

Could you please get me WAYLAND_DEBUG=1 logs of the hanging wl-copy session? I'm interested to see if it does end up using gtk-shell. You could use WAYLAND_DEBUG=1 wl-copy some text |& logger or even WAYLAND_DEBUG=1 systemd-cat wl-copy some text, and then look for it in the journal.

As an aside, I just tried downgrading Mutter to version 43.3 on Arch Linux (it was previously on version 43.4), and it did fix the issue

This is very interesting! So it might be this Mutter commit: https://gitlab.gnome.org/GNOME/mutter/-/commit/dac79fdceddb56293be39c087c68a36cf8cd6f37

@bugaevc
Copy link
Owner

bugaevc commented Apr 10, 2023

Looks like this is indeed a regression introduced by that Mutter commit, and https://gitlab.gnome.org/GNOME/mutter/-/issues/2690 and https://gitlab.gnome.org/GNOME/mutter/-/issues/2739 are the relevant Mutter issues to follow.

@bugaevc bugaevc added the cant-grab-focus Compositor disallows stealing focus but does not support wlr-data-control label Apr 10, 2023
@Silejonu
Copy link
Author

Result of WAYLAND_DEBUG=1 wl-copy some text |& logger ran from a .desktop file on the problematic Fedora 37 install, with wl-clipboard built from GitHub:

  • gdb:
(gdb) bt
#0  0x00007f26731e7537 in __GI___wait4 (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffdd7ee6ae0, options=options@entry=0, 
    usage=usage@entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007f26731e74fb in __GI___waitpid (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffdd7ee6ae0, options=options@entry=0)
    at waitpid.c:38
#2  0x0000560a66866aa1 in waitchld.constprop.0 (block=block@entry=1, wpid=<optimized out>)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:3800
#3  0x0000560a667c60b2 in wait_for (pid=4617, flags=0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:2980
#4  0x0000560a667aa722 in execute_command_internal (command=command@entry=0x560a683c8380, asynchronous=asynchronous@entry=0, 
    pipe_in=pipe_in@entry=3, pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x560a683c8490)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:923
#5  0x0000560a667a70b0 in execute_pipeline (command=command@entry=0x560a683c8460, asynchronous=asynchronous@entry=0, 
    pipe_in=<optimized out>, pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x560a683c8490)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:2648
#6  0x0000560a667a7c95 in execute_connection (fds_to_close=0x560a683c8490, pipe_out=-1, pipe_in=<optimized out>, 
    asynchronous=0, command=0x560a683c8460) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:2787
#7  execute_command_internal (command=command@entry=0x560a683c8460, asynchronous=asynchronous@entry=0, 
    pipe_in=pipe_in@entry=-1, pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x560a683c8490)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:1052
#8  0x0000560a667aaa02 in execute_command (command=0x560a683c8460)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:417
#9  0x0000560a6679a8ea in reader_loop () at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/eval.c:172
#10 0x0000560a66791c9e in main (argc=2, argv=0x7ffdd7ee7458, env=0x7ffdd7ee7470)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/shell.c:843
  • journalctl:
avril 10 15:26:30 framework systemd[1721]: gnome-terminal-server.service: Unit process 4737 (wl-copy) remains running after unit stopped.
avril 10 15:26:33 framework sudo[4840]: pam_unix(sudo:session): session closed for user root
avril 10 15:26:33 framework audit[4840]: USER_END pid=4840 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:26:33 framework audit[4840]: CRED_DISP pid=4840 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:26:40 framework systemd[1721]: Started vte-spawn-0098b213-d06c-4807-b381-b931fe0fe4f7.scope - VTE child process 5365 launched by kgx process 3883.
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Starting gnome-terminal-server.service - GNOME Terminal Server...
avril 10 15:26:57 framework nautilus[5553]: Connecting to org.freedesktop.Tracker3.Miner.Files
avril 10 15:26:57 framework systemd[1721]: Started gnome-terminal-server.service - GNOME Terminal Server.
avril 10 15:26:57 framework gnome-character[5549]: JS LOG: Characters Application started
avril 10 15:26:57 framework nautilus[5553]: g_hash_table_foreach: assertion 'hash_table != NULL' failed
avril 10 15:26:57 framework gnome-shell[1840]: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:1.2-com.intel.dleyna\[email protected].
avril 10 15:26:57 framework dleyna-renderer-service[5694]: dLeyna core version 0.6.0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: dleyna-renderer-service version 0.6.0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Type[0] Level[0x13] Mask[0x4C] Flags[0x4F]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Load file [/home/silejonu/.config/dleyna-renderer-service.conf]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: [General settings]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Never Quit: F
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Connector Name: dbus
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Port: 0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Push host port: 0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: [Logging settings]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Log Type : 0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Log Level: 0x13
avril 10 15:26:57 framework dleyna-renderer-service[5694]: [Network filtering settings]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Enabled : F
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Entries: (null)
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Calling GetRenderers method
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Client :1.138 lost
avril 10 15:26:58 framework systemd[1721]: Started app-gnome-wl\x2dcopy_debug-5703.scope - Application launched by gnome-shell.
avril 10 15:26:58 framework silejonu[5723]: [1414184.474]  -> [email protected]_registry(new id wl_registry@2)
avril 10 15:26:58 framework silejonu[5723]: [1414184.501]  -> [email protected](new id wl_callback@3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.934] [email protected]_id(3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.944] [email protected](1, "wl_compositor", 5)
avril 10 15:26:58 framework silejonu[5723]: [1414184.949]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
avril 10 15:26:58 framework silejonu[5723]: [1414184.952] [email protected](2, "wl_drm", 2)
avril 10 15:26:58 framework silejonu[5723]: [1414184.954] [email protected](3, "wl_shm", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.955]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
avril 10 15:26:58 framework silejonu[5723]: [1414184.957] [email protected](4, "wl_output", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.959] [email protected](5, "zxdg_output_manager_v1", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.961] [email protected](6, "wl_data_device_manager", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.963]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
avril 10 15:26:58 framework silejonu[5723]: [1414184.965] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.966]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
avril 10 15:26:58 framework silejonu[5723]: [1414184.968] [email protected](8, "wl_subcompositor", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.969] [email protected](9, "xdg_wm_base", 4)
avril 10 15:26:58 framework silejonu[5723]: [1414184.973]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
avril 10 15:26:58 framework silejonu[5723]: [1414184.975] [email protected](10, "gtk_shell1", 5)
avril 10 15:26:58 framework silejonu[5723]: [1414184.977]  -> [email protected](10, "gtk_shell1", 4, new id [unknown]@9)
avril 10 15:26:58 framework silejonu[5723]: [1414184.979] [email protected](11, "wp_viewporter", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.981] [email protected](12, "zwp_pointer_gestures_v1", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.984] [email protected](13, "zwp_tablet_manager_v2", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.985] [email protected](14, "wl_seat", 8)
avril 10 15:26:58 framework silejonu[5723]: [1414184.987]  -> [email protected](14, "wl_seat", 2, new id [unknown]@10)
avril 10 15:26:58 framework silejonu[5723]: [1414184.990] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.992] [email protected](16, "zwp_pointer_constraints_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.993] [email protected](17, "zxdg_exporter_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.995] [email protected](18, "zxdg_importer_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.996] [email protected](19, "zwp_linux_dmabuf_v1", 4)
avril 10 15:26:58 framework silejonu[5723]: [1414184.998] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.002] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.004] [email protected](22, "zwp_text_input_manager_v3", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.005] [email protected](23, "wp_presentation", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.007] [email protected](24, "xdg_activation_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.008]  -> [email protected](24, "xdg_activation_v1", 1, new id [unknown]@11)
avril 10 15:26:58 framework silejonu[5723]: [1414185.011] [email protected](1598)
avril 10 15:26:58 framework silejonu[5723]: [1414185.014]  -> [email protected](new id wl_callback@3)
avril 10 15:26:58 framework silejonu[5723]: [1414185.087] [email protected]_id(3)
avril 10 15:26:58 framework silejonu[5723]: [1414185.090] [email protected](3)
avril 10 15:26:58 framework silejonu[5723]: [1414185.091] [email protected]("seat0")
avril 10 15:26:58 framework silejonu[5723]: [1414185.094] [email protected](1598)
avril 10 15:26:58 framework silejonu[5723]: [1414185.097]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@10)
avril 10 15:26:58 framework silejonu[5723]: [1414185.101]  -> [email protected]_data_source(new id wl_data_source@12)
avril 10 15:26:58 framework silejonu[5723]: [1414185.103]  -> [email protected]("text/plain")
avril 10 15:26:58 framework silejonu[5723]: [1414185.106]  -> [email protected]("text/plain;charset=utf-8")
avril 10 15:26:58 framework silejonu[5723]: [1414185.108]  -> [email protected]("TEXT")
avril 10 15:26:58 framework silejonu[5723]: [1414185.109]  -> [email protected]("STRING")
avril 10 15:26:58 framework silejonu[5723]: [1414185.111]  -> [email protected]("UTF8_STRING")
avril 10 15:26:58 framework silejonu[5723]: [1414185.113]  -> [email protected]_keyboard(new id wl_keyboard@13)
avril 10 15:26:58 framework silejonu[5723]: [1414185.295] [email protected](1, fd 4, 79023)
avril 10 15:26:58 framework silejonu[5723]: [1414185.319]  -> [email protected]_surface(new id wl_surface@14)
avril 10 15:26:58 framework silejonu[5723]: [1414185.322]  -> [email protected]_xdg_surface(new id xdg_surface@15, wl_surface@14)
avril 10 15:26:58 framework silejonu[5723]: [1414185.324]  -> [email protected]_toplevel(new id xdg_toplevel@16)
avril 10 15:26:58 framework silejonu[5723]: [1414185.326]  -> [email protected]_title("wl-clipboard")
avril 10 15:26:58 framework silejonu[5723]: [1414185.329]  -> [email protected]_gtk_surface(new id gtk_surface1@17, wl_surface@14)
avril 10 15:26:58 framework silejonu[5723]: [1414185.331]  -> [email protected]()
avril 10 15:26:58 framework silejonu[5723]: [1414185.333]  -> [email protected](new id wl_callback@18)
avril 10 15:26:58 framework silejonu[5723]: [1414187.668] [email protected]_id(18)
avril 10 15:26:58 framework silejonu[5723]: [1414187.679] [email protected](0, 0, array[0])
avril 10 15:26:58 framework silejonu[5723]: [1414187.683] [email protected](60)
avril 10 15:26:58 framework silejonu[5723]: [1414187.692]  -> [email protected]_configure(60)
avril 10 15:26:58 framework silejonu[5723]: [1414187.694] [email protected](1598)
avril 10 15:26:58 framework silejonu[5723]: [1414187.720]  -> [email protected]_pool(new id wl_shm_pool@18, fd 5, 4)
avril 10 15:26:58 framework silejonu[5723]: [1414187.728]  -> [email protected]_buffer(new id wl_buffer@19, 0, 1, 1, 4, 0)
avril 10 15:26:58 framework silejonu[5723]: [1414187.731]  -> [email protected](wl_buffer@19, 0, 0)
avril 10 15:26:58 framework silejonu[5723]: [1414187.734]  -> [email protected](0, 0, 1, 1)
avril 10 15:26:58 framework silejonu[5723]: [1414187.736]  -> [email protected](0)
avril 10 15:26:58 framework silejonu[5723]: [1414187.747]  -> [email protected]()
avril 10 15:26:58 framework gnome-shell[1840]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
avril 10 15:26:58 framework silejonu[5723]: [1414188.471] [email protected](509449)
avril 10 15:26:58 framework silejonu[5723]: [1414188.482]  -> [email protected](509449)
avril 10 15:26:58 framework systemd[1721]: Started vte-spawn-c4f87607-d7b9-45ca-9cf2-6bcbc34adc38.scope - VTE child process 5721 launched by gnome-terminal-server process 5562.
avril 10 15:26:58 framework dleyna-renderer-service[5694]: dLeyna: Exit
avril 10 15:27:07 framework gnome-character[5549]: JS LOG: Characters Application exiting

Same, but with WAYLAND_DEBUG=1 systemd-cat wl-copy some text:

  • gdb:
(gdb) bt
#0  0x00007ff2e5c4a537 in __GI___wait4 (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffd48bec500, options=options@entry=0, 
    usage=usage@entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007ff2e5c4a4fb in __GI___waitpid (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffd48bec500, options=options@entry=0)
    at waitpid.c:38
#2  0x00005643b60ffaa1 in waitchld.constprop.0 (block=block@entry=1, wpid=<optimized out>)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:3800
#3  0x00005643b605f0b2 in wait_for (pid=6444, flags=0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:2980
#4  0x00005643b6043722 in execute_command_internal (command=command@entry=0x5643b7bd61e0, asynchronous=asynchronous@entry=0, 
    pipe_in=pipe_in@entry=-1, pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x5643b7bd63d0)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:923
#5  0x00005643b6043a02 in execute_command (command=0x5643b7bd61e0)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:417
#6  0x00005643b60338ea in reader_loop () at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/eval.c:172
#7  0x00005643b602ac9e in main (argc=2, argv=0x7ffd48becbe8, env=0x7ffd48becc00)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/shell.c:843
  • journalctl:
avril 10 15:30:47 framework kernel: usb usb2-port2: unable to enumerate USB device
avril 10 15:31:03 framework kernel: usb usb2-port2: attempt power cycle
avril 10 15:31:11 framework kernel: usb usb2-port2: unable to enumerate USB device
avril 10 15:31:11 framework audit: BPF prog-id=85 op=LOAD
avril 10 15:31:11 framework systemd[1]: Starting fprintd.service - Fingerprint Authentication Daemon...
avril 10 15:31:12 framework kernel: usb 3-9: reset full-speed USB device number 2 using xhci_hcd
avril 10 15:31:12 framework fprintd[6196]: libusb: error [udev_hotplug_event] ignoring udev action change
avril 10 15:31:12 framework systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
avril 10 15:31:12 framework audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
avril 10 15:31:12 framework fprintd[6196]: libusb: error [udev_hotplug_event] ignoring udev action change
avril 10 15:31:12 framework kernel: usb 3-9: reset full-speed USB device number 2 using xhci_hcd
avril 10 15:31:12 framework fprintd[6196]: libusb: error [udev_hotplug_event] ignoring udev action change
avril 10 15:31:12 framework fprintd[6196]: libusb: error [udev_hotplug_event] ignoring udev action change
avril 10 15:31:13 framework audit[6195]: USER_AUTH pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=pam_fprintd acct="silejonu" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:31:13 framework audit[6195]: USER_ACCT pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="silejonu" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:31:13 framework audit[6195]: USER_CMD pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/silejonu" cmd=76696D202F7573722F6C6F63616C2F62696E2F776C2D636F70795F64656275672E7368 exe="/usr/bin/sudo" terminal=pts/0 res=success'
avril 10 15:31:13 framework sudo[6195]:    silejonu : TTY=pts/0 ; PWD=/home/silejonu ; USER=root ; COMMAND=/usr/bin/vim /usr/local/bin/wl-copy_debug.sh
avril 10 15:31:13 framework audit[6195]: CRED_REFR pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:31:13 framework sudo[6195]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
avril 10 15:31:13 framework audit[6195]: USER_START pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:31:24 framework sudo[6195]: pam_unix(sudo:session): session closed for user root
avril 10 15:31:24 framework audit[6195]: USER_END pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:31:24 framework audit[6195]: CRED_DISP pid=6195 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:25 framework systemd[1721]: Starting gnome-terminal-server.service - GNOME Terminal Server...
avril 10 15:31:25 framework nautilus[6254]: Connecting to org.freedesktop.Tracker3.Miner.Files
avril 10 15:31:25 framework systemd[1721]: Started gnome-terminal-server.service - GNOME Terminal Server.
avril 10 15:31:25 framework nautilus[6254]: g_hash_table_foreach: assertion 'hash_table != NULL' failed
avril 10 15:31:25 framework gnome-character[6251]: JS LOG: Characters Application started
avril 10 15:31:25 framework gnome-shell[1840]: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
avril 10 15:31:25 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:26 framework systemd[1721]: Started dbus-:1.2-com.intel.dleyna\[email protected].
avril 10 15:31:26 framework dleyna-renderer-service[6393]: dLeyna core version 0.6.0
avril 10 15:31:26 framework dleyna-renderer-service[6393]: dleyna-renderer-service version 0.6.0
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Type[0] Level[0x13] Mask[0x4C] Flags[0x4F]
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Load file [/home/silejonu/.config/dleyna-renderer-service.conf]
avril 10 15:31:26 framework dleyna-renderer-service[6393]: [General settings]
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Never Quit: F
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Connector Name: dbus
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Port: 0
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Push host port: 0
avril 10 15:31:26 framework dleyna-renderer-service[6393]: [Logging settings]
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Log Type : 0
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Log Level: 0x13
avril 10 15:31:26 framework dleyna-renderer-service[6393]: [Network filtering settings]
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Enabled : F
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Entries: (null)
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Calling GetRenderers method
avril 10 15:31:26 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:31:26 framework dleyna-renderer-service[6393]: Client :1.162 lost
avril 10 15:31:26 framework systemd[1721]: Started dbus-:1.2-com.intel.dleyna\[email protected].
avril 10 15:31:26 framework dleyna-renderer-service[6418]: dLeyna core version 0.6.0
avril 10 15:31:26 framework dleyna-renderer-service[6418]: dleyna-renderer-service version 0.6.0
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Type[0] Level[0x13] Mask[0x4C] Flags[0x4F]
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Load file [/home/silejonu/.config/dleyna-renderer-service.conf]
avril 10 15:31:26 framework dleyna-renderer-service[6418]: [General settings]
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Never Quit: F
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Connector Name: dbus
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Port: 0
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Push host port: 0
avril 10 15:31:26 framework dleyna-renderer-service[6418]: [Logging settings]
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Log Type : 0
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Log Level: 0x13
avril 10 15:31:26 framework dleyna-renderer-service[6418]: [Network filtering settings]
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Enabled : F
avril 10 15:31:26 framework dleyna-renderer-service[6418]: Entries: (null)
avril 10 15:31:26 framework systemd[1721]: Started app-gnome-wl\x2dcopy_debug-6424.scope - Application launched by gnome-shell.
avril 10 15:31:26 framework wl-copy[6444]: [1682943.304]  -> [email protected]_registry(new id wl_registry@2)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.315]  -> [email protected](new id wl_callback@3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.385] [email protected]_id(3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.390] [email protected](1, "wl_compositor", 5)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.393]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.397] [email protected](2, "wl_drm", 2)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.399] [email protected](3, "wl_shm", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.401]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.403] [email protected](4, "wl_output", 3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.405] [email protected](5, "zxdg_output_manager_v1", 3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.407] [email protected](6, "wl_data_device_manager", 3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.409]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.411] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.413]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.415] [email protected](8, "wl_subcompositor", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.417] [email protected](9, "xdg_wm_base", 4)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.420]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.422] [email protected](10, "gtk_shell1", 5)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.424]  -> [email protected](10, "gtk_shell1", 4, new id [unknown]@9)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.427] [email protected](11, "wp_viewporter", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.429] [email protected](12, "zwp_pointer_gestures_v1", 3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.431] [email protected](13, "zwp_tablet_manager_v2", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.432] [email protected](14, "wl_seat", 8)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.435]  -> [email protected](14, "wl_seat", 2, new id [unknown]@10)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.438] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.442] [email protected](16, "zwp_pointer_constraints_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.443] [email protected](17, "zxdg_exporter_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.446] [email protected](18, "zxdg_importer_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.448] [email protected](19, "zwp_linux_dmabuf_v1", 4)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.449] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.451] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.453] [email protected](22, "zwp_text_input_manager_v3", 1)
avril 10 15:31:26 framework gnome-shell[1840]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
avril 10 15:31:26 framework wl-copy[6444]: [1682943.454] [email protected](23, "wp_presentation", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.456] [email protected](24, "xdg_activation_v1", 1)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.458]  -> [email protected](24, "xdg_activation_v1", 1, new id [unknown]@11)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.462] [email protected](2700)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.465]  -> [email protected](new id wl_callback@3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.504] [email protected]_id(3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.507] [email protected](3)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.509] [email protected]("seat0")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.511] [email protected](2700)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.514]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@10)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.517]  -> [email protected]_data_source(new id wl_data_source@12)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.519]  -> [email protected]("text/plain")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.521]  -> [email protected]("text/plain;charset=utf-8")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.523]  -> [email protected]("TEXT")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.525]  -> [email protected]("STRING")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.526]  -> [email protected]("UTF8_STRING")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.539]  -> [email protected]_keyboard(new id wl_keyboard@13)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.886] [email protected](1, fd 4, 79023)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.916]  -> [email protected]_surface(new id wl_surface@14)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.920]  -> [email protected]_xdg_surface(new id xdg_surface@15, wl_surface@14)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.923]  -> [email protected]_toplevel(new id xdg_toplevel@16)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.924]  -> [email protected]_title("wl-clipboard")
avril 10 15:31:26 framework wl-copy[6444]: [1682943.927]  -> [email protected]_gtk_surface(new id gtk_surface1@17, wl_surface@14)
avril 10 15:31:26 framework wl-copy[6444]: [1682943.929]  -> [email protected]()
avril 10 15:31:26 framework wl-copy[6444]: [1682943.931]  -> [email protected](new id wl_callback@18)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.223] [email protected]_id(18)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.233] [email protected](0, 0, array[0])
avril 10 15:31:26 framework wl-copy[6444]: [1682945.236] [email protected](90)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.239]  -> [email protected]_configure(90)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.241] [email protected](2700)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.258]  -> [email protected]_pool(new id wl_shm_pool@18, fd 5, 4)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.262]  -> [email protected]_buffer(new id wl_buffer@19, 0, 1, 1, 4, 0)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.265]  -> [email protected](wl_buffer@19, 0, 0)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.268]  -> [email protected](0, 0, 1, 1)
avril 10 15:31:26 framework systemd[1721]: Started vte-spawn-eda9ac96-cb86-4bc7-a966-c10132d3c50a.scope - VTE child process 6443 launched by gnome-terminal-server process 6272.
avril 10 15:31:26 framework wl-copy[6444]: [1682945.271]  -> [email protected](0)
avril 10 15:31:26 framework wl-copy[6444]: [1682945.280]  -> [email protected]()
avril 10 15:31:26 framework wl-copy[6444]: [1682950.658] [email protected](778211)
avril 10 15:31:26 framework wl-copy[6444]: [1682950.671]  -> [email protected](778211)
avril 10 15:31:27 framework dleyna-renderer-service[6393]: dLeyna: Exit
avril 10 15:31:35 framework gnome-character[6251]: JS LOG: Characters Application exiting

@bugaevc
Copy link
Owner

bugaevc commented Apr 10, 2023

Interesting — so gtk_surface1.present(0) is still not enough to get raised with that commit. Could you please try to specify StartupNotify=true in the .desktop file and see if that helps?

As a side note, posting backlinks to here on Mutter's issue tracker is unlikely to help, since Mutter developers (rightfully) aren't interested in keeping the popup surface hack working. In a way, we're living on borrowed time with this already: some time (maybe in a couple of years, maybe sooner), Mutter developers will flip the switch and stop giving new windows focus ever (unless proper activation tokens are used), so wl-clipboard will stop working on Mutter entirely.

A proper way out of this situation would be for Mutter to accept that yes, people will always want to access their clipboard from command line (and that it is not the same as external clipboard managers), to implement a better clipboard protocol that does not require the stealing focus hack while ensuring that this protocol is only exposed to unsandboxed clients (so security & privacy are maintained). But Mutter developers have made it clear that they're not interested in doing that either.

@Silejonu
Copy link
Author

Here is the output of journalctl after adding the line StartupNotify=true:

avril 10 15:26:30 framework systemd[1721]: gnome-terminal-server.service: Unit process 4737 (wl-copy) remains running after unit stopped.
avril 10 15:26:33 framework sudo[4840]: pam_unix(sudo:session): session closed for user root
avril 10 15:26:33 framework audit[4840]: USER_END pid=4840 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:26:33 framework audit[4840]: CRED_DISP pid=4840 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
avril 10 15:26:40 framework systemd[1721]: Started vte-spawn-0098b213-d06c-4807-b381-b931fe0fe4f7.scope - VTE child process 5365 launched by kgx process 3883.
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Starting gnome-terminal-server.service - GNOME Terminal Server...
avril 10 15:26:57 framework nautilus[5553]: Connecting to org.freedesktop.Tracker3.Miner.Files
avril 10 15:26:57 framework systemd[1721]: Started gnome-terminal-server.service - GNOME Terminal Server.
avril 10 15:26:57 framework gnome-character[5549]: JS LOG: Characters Application started
avril 10 15:26:57 framework nautilus[5553]: g_hash_table_foreach: assertion 'hash_table != NULL' failed
avril 10 15:26:57 framework gnome-shell[1840]: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
avril 10 15:26:57 framework systemd[1721]: Started dbus-:[email protected].
avril 10 15:26:57 framework systemd[1721]: Started dbus-:1.2-com.intel.dleyna\[email protected].
avril 10 15:26:57 framework dleyna-renderer-service[5694]: dLeyna core version 0.6.0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: dleyna-renderer-service version 0.6.0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Type[0] Level[0x13] Mask[0x4C] Flags[0x4F]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Load file [/home/silejonu/.config/dleyna-renderer-service.conf]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: [General settings]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Never Quit: F
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Connector Name: dbus
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Port: 0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Push host port: 0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: [Logging settings]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Log Type : 0
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Log Level: 0x13
avril 10 15:26:57 framework dleyna-renderer-service[5694]: [Network filtering settings]
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Enabled : F
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Entries: (null)
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Calling GetRenderers method
avril 10 15:26:57 framework dleyna-renderer-service[5694]: Client :1.138 lost
avril 10 15:26:58 framework systemd[1721]: Started app-gnome-wl\x2dcopy_debug-5703.scope - Application launched by gnome-shell.
avril 10 15:26:58 framework silejonu[5723]: [1414184.474]  -> [email protected]_registry(new id wl_registry@2)
avril 10 15:26:58 framework silejonu[5723]: [1414184.501]  -> [email protected](new id wl_callback@3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.934] [email protected]_id(3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.944] [email protected](1, "wl_compositor", 5)
avril 10 15:26:58 framework silejonu[5723]: [1414184.949]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
avril 10 15:26:58 framework silejonu[5723]: [1414184.952] [email protected](2, "wl_drm", 2)
avril 10 15:26:58 framework silejonu[5723]: [1414184.954] [email protected](3, "wl_shm", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.955]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
avril 10 15:26:58 framework silejonu[5723]: [1414184.957] [email protected](4, "wl_output", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.959] [email protected](5, "zxdg_output_manager_v1", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.961] [email protected](6, "wl_data_device_manager", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.963]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
avril 10 15:26:58 framework silejonu[5723]: [1414184.965] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.966]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
avril 10 15:26:58 framework silejonu[5723]: [1414184.968] [email protected](8, "wl_subcompositor", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.969] [email protected](9, "xdg_wm_base", 4)
avril 10 15:26:58 framework silejonu[5723]: [1414184.973]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
avril 10 15:26:58 framework silejonu[5723]: [1414184.975] [email protected](10, "gtk_shell1", 5)
avril 10 15:26:58 framework silejonu[5723]: [1414184.977]  -> [email protected](10, "gtk_shell1", 4, new id [unknown]@9)
avril 10 15:26:58 framework silejonu[5723]: [1414184.979] [email protected](11, "wp_viewporter", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.981] [email protected](12, "zwp_pointer_gestures_v1", 3)
avril 10 15:26:58 framework silejonu[5723]: [1414184.984] [email protected](13, "zwp_tablet_manager_v2", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.985] [email protected](14, "wl_seat", 8)
avril 10 15:26:58 framework silejonu[5723]: [1414184.987]  -> [email protected](14, "wl_seat", 2, new id [unknown]@10)
avril 10 15:26:58 framework silejonu[5723]: [1414184.990] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.992] [email protected](16, "zwp_pointer_constraints_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.993] [email protected](17, "zxdg_exporter_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.995] [email protected](18, "zxdg_importer_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414184.996] [email protected](19, "zwp_linux_dmabuf_v1", 4)
avril 10 15:26:58 framework silejonu[5723]: [1414184.998] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.002] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.004] [email protected](22, "zwp_text_input_manager_v3", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.005] [email protected](23, "wp_presentation", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.007] [email protected](24, "xdg_activation_v1", 1)
avril 10 15:26:58 framework silejonu[5723]: [1414185.008]  -> [email protected](24, "xdg_activation_v1", 1, new id [unknown]@11)
avril 10 15:26:58 framework silejonu[5723]: [1414185.011] [email protected](1598)
avril 10 15:26:58 framework silejonu[5723]: [1414185.014]  -> [email protected](new id wl_callback@3)
avril 10 15:26:58 framework silejonu[5723]: [1414185.087] [email protected]_id(3)
avril 10 15:26:58 framework silejonu[5723]: [1414185.090] [email protected](3)
avril 10 15:26:58 framework silejonu[5723]: [1414185.091] [email protected]("seat0")
avril 10 15:26:58 framework silejonu[5723]: [1414185.094] [email protected](1598)
avril 10 15:26:58 framework silejonu[5723]: [1414185.097]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@10)
avril 10 15:26:58 framework silejonu[5723]: [1414185.101]  -> [email protected]_data_source(new id wl_data_source@12)
avril 10 15:26:58 framework silejonu[5723]: [1414185.103]  -> [email protected]("text/plain")
avril 10 15:26:58 framework silejonu[5723]: [1414185.106]  -> [email protected]("text/plain;charset=utf-8")
avril 10 15:26:58 framework silejonu[5723]: [1414185.108]  -> [email protected]("TEXT")
avril 10 15:26:58 framework silejonu[5723]: [1414185.109]  -> [email protected]("STRING")
avril 10 15:26:58 framework silejonu[5723]: [1414185.111]  -> [email protected]("UTF8_STRING")
avril 10 15:26:58 framework silejonu[5723]: [1414185.113]  -> [email protected]_keyboard(new id wl_keyboard@13)
avril 10 15:26:58 framework silejonu[5723]: [1414185.295] [email protected](1, fd 4, 79023)
avril 10 15:26:58 framework silejonu[5723]: [1414185.319]  -> [email protected]_surface(new id wl_surface@14)
avril 10 15:26:58 framework silejonu[5723]: [1414185.322]  -> [email protected]_xdg_surface(new id xdg_surface@15, wl_surface@14)
avril 10 15:26:58 framework silejonu[5723]: [1414185.324]  -> [email protected]_toplevel(new id xdg_toplevel@16)
avril 10 15:26:58 framework silejonu[5723]: [1414185.326]  -> [email protected]_title("wl-clipboard")
avril 10 15:26:58 framework silejonu[5723]: [1414185.329]  -> [email protected]_gtk_surface(new id gtk_surface1@17, wl_surface@14)
avril 10 15:26:58 framework silejonu[5723]: [1414185.331]  -> [email protected]()
avril 10 15:26:58 framework silejonu[5723]: [1414185.333]  -> [email protected](new id wl_callback@18)
avril 10 15:26:58 framework silejonu[5723]: [1414187.668] [email protected]_id(18)
avril 10 15:26:58 framework silejonu[5723]: [1414187.679] [email protected](0, 0, array[0])
avril 10 15:26:58 framework silejonu[5723]: [1414187.683] [email protected](60)
avril 10 15:26:58 framework silejonu[5723]: [1414187.692]  -> [email protected]_configure(60)
avril 10 15:26:58 framework silejonu[5723]: [1414187.694] [email protected](1598)
avril 10 15:26:58 framework silejonu[5723]: [1414187.720]  -> [email protected]_pool(new id wl_shm_pool@18, fd 5, 4)
avril 10 15:26:58 framework silejonu[5723]: [1414187.728]  -> [email protected]_buffer(new id wl_buffer@19, 0, 1, 1, 4, 0)
avril 10 15:26:58 framework silejonu[5723]: [1414187.731]  -> [email protected](wl_buffer@19, 0, 0)
avril 10 15:26:58 framework silejonu[5723]: [1414187.734]  -> [email protected](0, 0, 1, 1)
avril 10 15:26:58 framework silejonu[5723]: [1414187.736]  -> [email protected](0)
avril 10 15:26:58 framework silejonu[5723]: [1414187.747]  -> [email protected]()
avril 10 15:26:58 framework gnome-shell[1840]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
avril 10 15:26:58 framework silejonu[5723]: [1414188.471] [email protected](509449)
avril 10 15:26:58 framework silejonu[5723]: [1414188.482]  -> [email protected](509449)
avril 10 15:26:58 framework systemd[1721]: Started vte-spawn-c4f87607-d7b9-45ca-9cf2-6bcbc34adc38.scope - VTE child process 5721 launched by gnome-terminal-server process 5562.
avril 10 15:26:58 framework dleyna-renderer-service[5694]: dLeyna: Exit
avril 10 15:27:07 framework gnome-character[5549]: JS LOG: Characters Application exiting

Two processes are started:

silejonu      14731   14565  0 10:57 pts/1    00:00:00 /usr/bin/bash /usr/local/bin/wl-copy_debug.sh
silejonu      14732   14731  0 10:57 pts/1    00:00:00 wl-copy some text

First one gives this in gdb:

(gdb) bt
#0  0x00007fbeb3503537 in __GI___wait4 (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffdb5806ca0, options=options@entry=0, usage=usage@entry=0x0)
    at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007fbeb35034fb in __GI___waitpid (pid=pid@entry=-1, stat_loc=stat_loc@entry=0x7ffdb5806ca0, options=options@entry=0) at waitpid.c:38
#2  0x0000557b59c05aa1 in waitchld.constprop.0 (block=block@entry=1, wpid=<optimized out>) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:3800
#3  0x0000557b59b650b2 in wait_for (pid=14732, flags=0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/jobs.c:2980
#4  0x0000557b59b49722 in execute_command_internal (command=command@entry=0x557b5a8551e0, asynchronous=asynchronous@entry=0, 
    pipe_in=pipe_in@entry=-1, pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x557b5a8553d0)
    at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:923
#5  0x0000557b59b49a02 in execute_command (command=0x557b5a8551e0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/execute_cmd.c:417
#6  0x0000557b59b398ea in reader_loop () at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/eval.c:172
#7  0x0000557b59b30c9e in main (argc=2, argv=0x7ffdb5807388, env=0x7ffdb58073a0) at /usr/src/debug/bash-5.2.15-1.fc37.x86_64/shell.c:843

Second one gives this:

(gdb) bt
#0  0x00007f2ae7a911e4 in __GI___poll (fds=fds@entry=0x7ffc945a4d70, nfds=nfds@entry=1, timeout=timeout@entry=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f2ae7b791d4 in poll (__timeout=-1, __nfds=1, __fds=0x7ffc945a4d70) at /usr/include/bits/poll2.h:39
#2  wl_display_poll (display=0x150a2a0, events=1) at ../src/wayland-client.c:1878
#3  wl_display_dispatch_queue (queue=<optimized out>, display=<optimized out>) at ../src/wayland-client.c:1951
#4  wl_display_dispatch_queue (display=0x150a2a0, queue=0x150a370) at ../src/wayland-client.c:1924
#5  0x0000000000402b48 in main (argc=3, argv=0x7ffc945a4f18) at ../src/wl-copy.c:311

@Araly
Copy link

Araly commented May 27, 2023

hey, I have an issue where wl-copy hangs indefinitely anytime I run it, but not just from a .desktop file.

for example when ran in a terminal, you can see I start wl-copy and let it hang for 4 seconds before I CTRL+C:

╭─araly@computer /home/araly  ‹system› 
╰─$ time wl-copy aoeu                                                                                                                                                                                                                                                                                                                                                                                                                 ↵ 130
^C
________________________________________________________
Executed in    4.12 secs      fish           external
   usr time    1.14 millis  346.00 micros  791.00 micros
   sys time    0.01 millis   13.00 micros    0.00 micros

╭─araly@computer /home/araly  ‹system› 
╰─$

found the issue while using gopass, if I try to copy a password to the clipboard using gopass -c <secret-name> it just hangs until I kill it, and then says it couldn't copy to clipboard:

╭─araly@computer /home/araly  ‹system› 
╰─$ gopass -c <secret-name>                                                                                                                                                                                                                                                                                                                                                                                                               ↵ 11
^C
Error: failed to write to clipboard: failed to write to clipboard: signal: interrupt
╭─araly@computer /home/araly  ‹system› 
╰─$ 

I use mutter version 44.1 if relevant.

Is this the same issue ? or should I create a new issue instead ?

@bugaevc
Copy link
Owner

bugaevc commented May 27, 2023

Please create a new issue, and make sure to specify more details about your system & attach WAYLAND_DEBUG=1 logs.

@Araly
Copy link

Araly commented Jun 15, 2023

Please create a new issue, and make sure to specify more details about your system & attach WAYLAND_DEBUG=1 logs.

it looks like I can recreate my issue in a specific terminal (guake) but not in another one (kitty) so I have to assume there's something going on with X and wayland.

so just discard my comments

@xundeenergie
Copy link

xundeenergie commented Jul 1, 2023

I just faced the same problem, i think.

I stumbled upon pass is not working correctly.
When i run pass from a gnome-terminal it works.
But when i run it from ddterm it hangs and in dash is a new symbol "Unknown" and when i click on Details, i see wl-clipboard.
Klicking on this "unknown application" Icon or changing with alt+tab to this app, the stuff gets copied.

ddterm is a dropdown-shell extension for gnome.

The same, when i run from ddterm WAYLAND_DEBUG=1 wl-copy blabla -o -f i get this in terminal

[1841974.301]  -> [email protected]_registry(new id wl_registry@2)
[1841974.353]  -> [email protected](new id wl_callback@3)
[1841974.625] [email protected]_id(3)
[1841974.654] [email protected](1, "wl_compositor", 5)
[1841974.662]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
[1841974.669] [email protected](2, "wl_drm", 2)
[1841974.673] [email protected](3, "wl_shm", 1)
[1841974.677]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
[1841974.681] [email protected](4, "wl_output", 3)
[1841974.685] [email protected](5, "zxdg_output_manager_v1", 3)
[1841974.689] [email protected](6, "wl_data_device_manager", 3)
[1841974.693]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
[1841974.697] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
[1841974.701]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
[1841974.706] [email protected](8, "wl_subcompositor", 1)
[1841974.709] [email protected](9, "xdg_wm_base", 4)
[1841974.717]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
[1841974.722] [email protected](10, "gtk_shell1", 5)
[1841974.728] [email protected](11, "wp_viewporter", 1)
[1841974.733] [email protected](12, "zwp_pointer_gestures_v1", 3)
[1841974.739] [email protected](13, "zwp_tablet_manager_v2", 1)
[1841974.743] [email protected](14, "wl_seat", 8)
[1841974.749]  -> [email protected](14, "wl_seat", 2, new id [unknown]@9)
[1841974.756] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
[1841974.761] [email protected](16, "zwp_pointer_constraints_v1", 1)
[1841974.766] [email protected](17, "zxdg_exporter_v1", 1)
[1841974.770] [email protected](18, "zxdg_importer_v1", 1)
[1841974.780] [email protected](19, "zwp_linux_dmabuf_v1", 4)
[1841974.785] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
[1841974.790] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1841974.794] [email protected](22, "zwp_text_input_manager_v3", 1)
[1841974.800] [email protected](23, "wp_presentation", 1)
[1841974.805] [email protected](24, "xdg_activation_v1", 1)
[1841974.811] [email protected](16178)
[1841974.817]  -> [email protected](new id wl_callback@3)
[1841975.126] [email protected]_id(3)
[1841975.148] [email protected](3)
[1841975.153] [email protected]("seat0")
[1841975.157] [email protected](16178)
[1841975.164]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@9)
[1841975.172]  -> [email protected]_data_source(new id wl_data_source@10)
[1841975.177]  -> [email protected]("text/plain")
[1841975.182]  -> [email protected]("text/plain;charset=utf-8")
[1841975.185]  -> [email protected]("TEXT")
[1841975.189]  -> [email protected]("STRING")
[1841975.192]  -> [email protected]("UTF8_STRING")
[1841975.197]  -> [email protected]_keyboard(new id wl_keyboard@11)
[1841975.706] [email protected](1, fd 4, 69818)
[1841975.764]  -> [email protected]_surface(new id wl_surface@12)
[1841975.772]  -> [email protected]_xdg_surface(new id xdg_surface@13, wl_surface@12)
[1841975.777]  -> [email protected]_toplevel(new id xdg_toplevel@14)
[1841975.781]  -> [email protected]_title("wl-clipboard")
[1841975.787]  -> [email protected]()
[1841975.792]  -> [email protected](new id wl_callback@15)
[1841979.403] [email protected]_id(15)
[1841979.425] [email protected](0, 0, array[0])
[1841979.445] [email protected](1022)
[1841979.452]  -> [email protected]_configure(1022)
[1841979.459] [email protected](16178)
[1841979.495]  -> [email protected]_pool(new id wl_shm_pool@15, fd 5, 4)
[1841979.508]  -> [email protected]_buffer(new id wl_buffer@16, 0, 1, 1, 4, 0)
[1841979.518]  -> [email protected](wl_buffer@16, 0, 0)
[1841979.523]  -> [email protected](0, 0, 1, 1)
[1841979.528]  -> [email protected]()

here it hangs and Gnome Dash shows this
grafik
When i click on it, this follows in ddterm

[2018794.948] [email protected](1, 1, array[4])
[2018794.970] [email protected](1034)
[2018794.976]  -> [email protected]_configure(1034)
[2018794.981] [email protected](101114331)
[2018794.985]  -> [email protected](101114331)
[2018794.989] [email protected](17034, 0, 0, 0, 0)
[2018794.995] [email protected](17034, wl_surface@12, array[0])
[2018795.002]  -> [email protected]_selection(wl_data_source@10, 17034)
[2018795.017]  -> [email protected](new id wl_callback@17)
[2018795.025] [email protected]_offer(new id wl_data_offer@4278190080)
[2018795.032] [email protected]("image/png")
[2018795.036] [email protected](wl_data_offer@4278190080)
[2018798.275] [email protected]_id(17)
[2018798.285] [email protected]_offer(new id wl_data_offer@4278190081)
[2018798.288] [email protected]("UTF8_STRING")
[2018798.291] [email protected]("STRING")
[2018798.294] [email protected]("TEXT")
[2018798.296] [email protected]("text/plain;charset=utf-8")
[2018798.299] [email protected]("text/plain")
[2018798.301] [email protected](wl_data_offer@4278190081)
[2018798.304] [email protected]("text/plain;charset=utf-8", fd 5)

and the command finishes.

Then the same is on wl-paste, but in gnome-terminal

~: $ WAYLAND_DEBUG=1 wl-paste -n
[2213085.583]  -> [email protected]_registry(new id wl_registry@2)
[2213085.609]  -> [email protected](new id wl_callback@3)
[2213085.921] [email protected]_id(3)
[2213085.948] [email protected](1, "wl_compositor", 5)
[2213085.955]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
[2213085.962] [email protected](2, "wl_drm", 2)
[2213085.966] [email protected](3, "wl_shm", 1)
[2213085.969]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
[2213085.973] [email protected](4, "wl_output", 3)
[2213085.977] [email protected](5, "zxdg_output_manager_v1", 3)
[2213085.980] [email protected](6, "wl_data_device_manager", 3)
[2213085.984]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
[2213085.988] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
[2213085.992]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
[2213085.996] [email protected](8, "wl_subcompositor", 1)
[2213085.999] [email protected](9, "xdg_wm_base", 4)
[2213086.006]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
[2213086.012] [email protected](10, "gtk_shell1", 5)
[2213086.017] [email protected](11, "wp_viewporter", 1)
[2213086.025] [email protected](12, "zwp_pointer_gestures_v1", 3)
[2213086.031] [email protected](13, "zwp_tablet_manager_v2", 1)
[2213086.035] [email protected](14, "wl_seat", 8)
[2213086.040]  -> [email protected](14, "wl_seat", 2, new id [unknown]@9)
[2213086.045] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
[2213086.051] [email protected](16, "zwp_pointer_constraints_v1", 1)
[2213086.055] [email protected](17, "zxdg_exporter_v1", 1)
[2213086.059] [email protected](18, "zxdg_importer_v1", 1)
[2213086.062] [email protected](19, "zwp_linux_dmabuf_v1", 4)
[2213086.067] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
[2213086.072] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[2213086.078] [email protected](22, "zwp_text_input_manager_v3", 1)
[2213086.083] [email protected](23, "wp_presentation", 1)
[2213086.090] [email protected](24, "xdg_activation_v1", 1)
[2213086.095] [email protected](17923)
[2213086.101]  -> [email protected](new id wl_callback@3)
[2213086.200] [email protected]_id(3)
[2213086.207] [email protected](3)
[2213086.210] [email protected]("seat0")
[2213086.214] [email protected](17923)
[2213086.219]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@9)
[2213086.226]  -> [email protected]_keyboard(new id wl_keyboard@10)
[2213086.535] [email protected](1, fd 4, 69818)
[2213086.589]  -> [email protected]_surface(new id wl_surface@11)
[2213086.596]  -> [email protected]_xdg_surface(new id xdg_surface@12, wl_surface@11)
[2213086.601]  -> [email protected]_toplevel(new id xdg_toplevel@13)
[2213086.605]  -> [email protected]_title("wl-clipboard")
[2213086.609]  -> [email protected]()
[2213086.614]  -> [email protected](new id wl_callback@14)
[2213089.688] [email protected]_id(14)
[2213089.707] [email protected](0, 0, array[0])
[2213089.713] [email protected](1064)
[2213089.717]  -> [email protected]_configure(1064)
[2213089.721] [email protected](17923)
[2213089.748]  -> [email protected]_pool(new id wl_shm_pool@14, fd 5, 4)
[2213089.755]  -> [email protected]_buffer(new id wl_buffer@15, 0, 1, 1, 4, 0)
[2213089.765]  -> [email protected](wl_buffer@15, 0, 0)
[2213089.771]  -> [email protected](0, 0, 1, 1)
[2213089.775]  -> [email protected]()
[2213107.517] [email protected](1, 1, array[4])
[2213107.528] [email protected](1066)
[2213107.530]  -> [email protected]_configure(1066)
[2213107.532] [email protected](17925, 0, 0, 0, 0)
[2213107.534] [email protected](17925, wl_surface@11, array[4])
[2213107.536] [email protected]_offer(new id wl_data_offer@4278190080)
[2213107.538] [email protected]("text/plain;charset=utf-8")
[2213107.540] [email protected](wl_data_offer@4278190080)
[2213107.551]  -> [email protected]("text/plain;charset=utf-8", fd 7)
[2213107.555]  -> [email protected]()
[2213107.556]  -> [email protected]()
[2213107.557]  -> [email protected]()
[2213107.559]  -> [email protected](new id wl_callback@16)
[2213113.479] [email protected]_id(13)
[2213113.488] [email protected]_id(12)
[2213113.489] [email protected]_id(11)
[2213113.490] [email protected]_id(16)
[2213113.491] [email protected](17926, nil)
[2213113.493] [email protected](17927)
blabla[2213114.228]  -> [email protected]()
( 0 ✓) jakobus.schuerz@tag-618 (03:04)
~: $ WAYLAND_DEBUG=1 wl-paste -n
[2222642.505]  -> [email protected]_registry(new id wl_registry@2)
[2222642.534]  -> [email protected](new id wl_callback@3)
[2222642.785] [email protected]_id(3)
[2222642.813] [email protected](1, "wl_compositor", 5)
[2222642.821]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
[2222642.828] [email protected](2, "wl_drm", 2)
[2222642.832] [email protected](3, "wl_shm", 1)
[2222642.836]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
[2222642.841] [email protected](4, "wl_output", 3)
[2222642.844] [email protected](5, "zxdg_output_manager_v1", 3)
[2222642.848] [email protected](6, "wl_data_device_manager", 3)
[2222642.852]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
[2222642.856] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
[2222642.860]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
[2222642.865] [email protected](8, "wl_subcompositor", 1)
[2222642.869] [email protected](9, "xdg_wm_base", 4)
[2222642.876]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
[2222642.883] [email protected](10, "gtk_shell1", 5)
[2222642.887] [email protected](11, "wp_viewporter", 1)
[2222642.891] [email protected](12, "zwp_pointer_gestures_v1", 3)
[2222642.895] [email protected](13, "zwp_tablet_manager_v2", 1)
[2222642.903] [email protected](14, "wl_seat", 8)
[2222642.909]  -> [email protected](14, "wl_seat", 2, new id [unknown]@9)
[2222642.918] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
[2222642.922] [email protected](16, "zwp_pointer_constraints_v1", 1)
[2222642.927] [email protected](17, "zxdg_exporter_v1", 1)
[2222642.932] [email protected](18, "zxdg_importer_v1", 1)
[2222642.936] [email protected](19, "zwp_linux_dmabuf_v1", 4)
[2222642.942] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
[2222642.951] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[2222642.956] [email protected](22, "zwp_text_input_manager_v3", 1)
[2222642.961] [email protected](23, "wp_presentation", 1)
[2222642.965] [email protected](24, "xdg_activation_v1", 1)
[2222642.970] [email protected](17952)
[2222642.979]  -> [email protected](new id wl_callback@3)
[2222643.290] [email protected]_id(3)
[2222643.312] [email protected](3)
[2222643.317] [email protected]("seat0")
[2222643.321] [email protected](17952)
[2222643.328]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@9)
[2222643.336]  -> [email protected]_keyboard(new id wl_keyboard@10)
[2222643.819] [email protected](1, fd 4, 69818)
[2222643.872]  -> [email protected]_surface(new id wl_surface@11)
[2222643.880]  -> [email protected]_xdg_surface(new id xdg_surface@12, wl_surface@11)
[2222643.885]  -> [email protected]_toplevel(new id xdg_toplevel@13)
[2222643.889]  -> [email protected]_title("wl-clipboard")
[2222643.893]  -> [email protected]()
[2222643.898]  -> [email protected](new id wl_callback@14)
[2222646.284] [email protected]_id(14)
[2222646.306] [email protected](0, 0, array[0])
[2222646.312] [email protected](1077)
[2222646.317]  -> [email protected]_configure(1077)
[2222646.339] [email protected](17952)
[2222646.386]  -> [email protected]_pool(new id wl_shm_pool@14, fd 5, 4)
[2222646.396]  -> [email protected]_buffer(new id wl_buffer@15, 0, 1, 1, 4, 0)
[2222646.402]  -> [email protected](wl_buffer@15, 0, 0)
[2222646.407]  -> [email protected](0, 0, 1, 1)
[2222646.411]  -> [email protected]()



here the command hangs, and a icon in gnome-dash appears. The same as with wl-copy

clicking on it, the command finishes with

[2213107.517] [email protected](1, 1, array[4])
[2213107.528] [email protected](1066)
[2213107.530]  -> [email protected]_configure(1066)
[2213107.532] [email protected](17925, 0, 0, 0, 0)
[2213107.534] [email protected](17925, wl_surface@11, array[4])
[2213107.536] [email protected]_offer(new id wl_data_offer@4278190080)
[2213107.538] [email protected]("text/plain;charset=utf-8")
[2213107.540] [email protected](wl_data_offer@4278190080)
[2213107.551]  -> [email protected]("text/plain;charset=utf-8", fd 7)
[2213107.555]  -> [email protected]()
[2213107.556]  -> [email protected]()
[2213107.557]  -> [email protected]()
[2213107.559]  -> [email protected](new id wl_callback@16)
[2213113.479] [email protected]_id(13)
[2213113.488] [email protected]_id(12)
[2213113.489] [email protected]_id(11)
[2213113.490] [email protected]_id(16)
[2213113.491] [email protected](17926, nil)
[2213113.493] [email protected](17927)
blabla[2213114.228]  -> [email protected]()
( 0 ✓) jakobus.schuerz@tag-618 (03:04)
~: $ WAYLAND_DEBUG=1 wl-paste -n
[2222642.505]  -> [email protected]_registry(new id wl_registry@2)
[2222642.534]  -> [email protected](new id wl_callback@3)
[2222642.785] [email protected]_id(3)
[2222642.813] [email protected](1, "wl_compositor", 5)
[2222642.821]  -> [email protected](1, "wl_compositor", 2, new id [unknown]@4)
[2222642.828] [email protected](2, "wl_drm", 2)
[2222642.832] [email protected](3, "wl_shm", 1)
[2222642.836]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
[2222642.841] [email protected](4, "wl_output", 3)
[2222642.844] [email protected](5, "zxdg_output_manager_v1", 3)
[2222642.848] [email protected](6, "wl_data_device_manager", 3)
[2222642.852]  -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@6)
[2222642.856] [email protected](7, "zwp_primary_selection_device_manager_v1", 1)
[2222642.860]  -> [email protected](7, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
[2222642.865] [email protected](8, "wl_subcompositor", 1)
[2222642.869] [email protected](9, "xdg_wm_base", 4)
[2222642.876]  -> [email protected](9, "xdg_wm_base", 1, new id [unknown]@8)
[2222642.883] [email protected](10, "gtk_shell1", 5)
[2222642.887] [email protected](11, "wp_viewporter", 1)
[2222642.891] [email protected](12, "zwp_pointer_gestures_v1", 3)
[2222642.895] [email protected](13, "zwp_tablet_manager_v2", 1)
[2222642.903] [email protected](14, "wl_seat", 8)
[2222642.909]  -> [email protected](14, "wl_seat", 2, new id [unknown]@9)
[2222642.918] [email protected](15, "zwp_relative_pointer_manager_v1", 1)
[2222642.922] [email protected](16, "zwp_pointer_constraints_v1", 1)
[2222642.927] [email protected](17, "zxdg_exporter_v1", 1)
[2222642.932] [email protected](18, "zxdg_importer_v1", 1)
[2222642.936] [email protected](19, "zwp_linux_dmabuf_v1", 4)
[2222642.942] [email protected](20, "wp_single_pixel_buffer_manager_v1", 1)
[2222642.951] [email protected](21, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[2222642.956] [email protected](22, "zwp_text_input_manager_v3", 1)
[2222642.961] [email protected](23, "wp_presentation", 1)
[2222642.965] [email protected](24, "xdg_activation_v1", 1)
[2222642.970] [email protected](17952)
[2222642.979]  -> [email protected](new id wl_callback@3)
[2222643.290] [email protected]_id(3)
[2222643.312] [email protected](3)
[2222643.317] [email protected]("seat0")
[2222643.321] [email protected](17952)
[2222643.328]  -> [email protected]_data_device(new id wl_data_device@3, wl_seat@9)
[2222643.336]  -> [email protected]_keyboard(new id wl_keyboard@10)
[2222643.819] [email protected](1, fd 4, 69818)
[2222643.872]  -> [email protected]_surface(new id wl_surface@11)
[2222643.880]  -> [email protected]_xdg_surface(new id xdg_surface@12, wl_surface@11)
[2222643.885]  -> [email protected]_toplevel(new id xdg_toplevel@13)
[2222643.889]  -> [email protected]_title("wl-clipboard")
[2222643.893]  -> [email protected]()
[2222643.898]  -> [email protected](new id wl_callback@14)
[2222646.284] [email protected]_id(14)
[2222646.306] [email protected](0, 0, array[0])
[2222646.312] [email protected](1077)
[2222646.317]  -> [email protected]_configure(1077)
[2222646.339] [email protected](17952)
[2222646.386]  -> [email protected]_pool(new id wl_shm_pool@14, fd 5, 4)
[2222646.396]  -> [email protected]_buffer(new id wl_buffer@15, 0, 1, 1, 4, 0)
[2222646.402]  -> [email protected](wl_buffer@15, 0, 0)
[2222646.407]  -> [email protected](0, 0, 1, 1)
[2222646.411]  -> [email protected]()
[2260387.275]  -> [email protected]()

And gnome-notifications say "wl-copy is ready"

@dynobo
Copy link

dynobo commented Oct 22, 2023

My experience is exactly the same as described by @xundeenergie: When started from terminal, wl-copy hangs, an "unknown application"-icon appears in the gnome dash, and a notification is shown. wl-copy hangs until I click that icon in the dash, then it resumes and copies text to clipboard correctly. Debug output similar to @xundeenergie 's.

If it helps: I'm using wl-clipboard for a while now, and I think the issue started to occur after Gnome 45 got shipped to Arch via updates.

@roman0x58
Copy link

My experience is exactly the same as described by @xundeenergie: When started from terminal, wl-copy hangs, an "unknown application"-icon appears in the gnome dash, and a notification is shown. wl-copy hangs until I click that icon in the dash, then it resumes and copies text to clipboard correctly. Debug output similar to @xundeenergie 's.

If it helps: I'm using wl-clipboard for a while now, and I think the issue started to occur after Gnome 45 got shipped to Arch via updates.

Yeah, I have the same problem. A GNOME notification appeared when I ran 'wl-copy' from the terminal, and it hung until I clicked on it. I'm also on Arch with Gnome 45.1

@drlkf
Copy link

drlkf commented Jan 8, 2024

i'm encountering a similar issue when calling wl-copy from a Haskell subprocess, one thing that i noticed is that if any other program writes to the clipboard, the process resumes and the clipboard now contains the contents that the Haskell subprocess was trying to write. also, if Haskell invokes wl-copy with -o, it exits immediately and the clipboard is immediately cleared.

here is the WAYLAND_DEBUG log of the subprocess until it hangs:
https://gist.github.com/drlkf/10506ff8a3158eb0b68b5966052a82bb

here is the library i use to spawn the process:
https://hackage.haskell.org/package/process-1.6.18.0/docs/System-Process.html#v:readCreateProcessWithExitCode

hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cant-grab-focus Compositor disallows stealing focus but does not support wlr-data-control
Projects
None yet
Development

No branches or pull requests

7 participants