Open Dialgatrainer02 opened 9 months ago
Hi!
i can copy fine
Do you mean that wl-copy some text
works fine for you, and only hangs when you pipe something into it? Does wl-paste
work?
Does the thing you're copying appear in the clipboard despite wl-copy
hanging? What distro, Wayland compositor, and version of wl-clipboard is this on?
what logs can i provide and how do i get them?
The Wayland debug log, which you can get like this:
ls ~/Downloads | WAYLAND_DEBUG=1 wl-copy 2>/tmp/wayland-debug.log
and the strace log:
ls ~/Downloads | strace -f wl-copy 2>/tmp/strace.log
Do you mean that wl-copy some text works fine for you, and only hangs when you pipe something into it? Does wl-paste work?
yes i can copy and i can paste it only hangs when trying to use clipboard history with dmenu
ls ~/Downloads | WAYLAND_DEBUG=1 wl-copy 2>/tmp/wayland-debug.log
i ran this and hyprland crashed
ls ~/Downloads | strace -f wl-copy 2>/tmp/strace.log
when i copy without piping it work and shows in cliphist however piping something in hsngs untill i ctrl c it
i ran this and hyprland crashed
That certainly sounds like an issue with Hyprland, you should report the crash to them.
That looks like wl-copy
is waiting for xdg-mime
, which is waiting for xprop
, which is waiting to connect to X11 (likely Xwayland). Why it needs or uses xprop
on Wayland, I don't know.
Are you able to run xprop
without it hanging? Are you able to run xdg-mime
(e.g. xdg-mime query filetype /etc/os-release
) without it hanging? If no, that's where your issue is. You should be able to work around this by specifying the MIME type explicitly, like so: ls ~/Downloads | wl-copy --type text/plain
xdg mime hangs
with --type it works fine
this is a fresh arch install so im unsure why xdg mime is hanging but thank you for the fix
I'm also having problem here, but I'm not so sure it is xprop's fault. Looking at the code, xdg-mime uses xprop in the detectDE
function to figure out the current running Desktop Environment. It does so using XDG_CURRENT_DESKTOP
first, which is set in my DE (GNOME), so it woldn't need to touch xprop here. Also, xdg-mime runs really fast when used directly:
~> time xdg-mime query filetype ~/.ssh/id_ed25519_sk.pub
application/vnd.ms-publisher
________________________________________________________
Executed in 16.35 millis fish external
usr time 10.49 millis 889.00 micros 9.60 millis
sys time 8.18 millis 453.00 micros 7.72 millis
~> time xdg-mime query filetype (cat ~/.ssh/id_ed25519_sk.pub | psub)
text/plain
________________________________________________________
Executed in 19.43 millis fish external
usr time 16.31 millis 202.00 micros 16.11 millis
sys time 4.13 millis 102.00 micros 4.03 millis
~> time wl-copy < ~/.ssh/id_ed25519_sk.pub
________________________________________________________
Executed in 11.10 secs fish external
usr time 5.30 millis 323.00 micros 4.97 millis
sys time 21.42 millis 158.00 micros 21.26 millis
~> time wl-copy --type text/plain < ~/.ssh/id_ed25519_sk.pub
________________________________________________________
Executed in 28.33 secs fish external
usr time 3.62 millis 873.00 micros 2.75 millis
sys time 3.35 millis 416.00 micros 2.94 millis
Weirdly, it seems like CPU time is really low (less than 50 ms), but somehow the running time varies wildly, from 2 seconds up to 1 minute.
I can't run strace without sudo on my system, so here are the Wayland logs.
WAYLAND_DEBUG=1 wl-copy < ~/.ssh/id_ed25519_sk.pub
In emacs |
runs the command shell-command-on-region. Guaranteed to hang when piping into wl-copy. P.S., https://www.emacswiki.org/emacs/CopyAndPaste#h5o-4 says something about this.
i can copy fine but trying to pipe into wl-copy hangs forever including the example ls ~/Downloads | wl-copy
what logs can i provide and how do i get them?