GNOME Bugzilla – Bug 782694
Copy and paste when on wayland not working well
Last modified: 2018-05-02 18:30:03 UTC
Copy and paste when on wayland and Gnome stops working some of the time. I have noticed this when copying text out of gedit and into other apps. It works then it stops, i.e. you copy a block of text and try a paste it into a different app and the buffer is empty, nothing copies. Save, exit gedit reopen and it works again for a while. I have noticed it doing this with gedit to firefox and gedit to LibreOffice Writer. When this happens and I tey and paste into LibreOffice Writer, writer just get a busy spinner but not text is copied. Maybe issue with wayland native app to X11 app? As when this happens I can still copy and paste in gedit itself and another gedit window. When this happens and I try and paste into LibreOffice Writer, writer just get a busy spinner but not text is copied. This is in the logs when it happens. gedit[2089]: Error writing selection data: Error writing to file descriptor: Broken pipe I raised this bug with the Fedora. https://bugzilla.redhat.com/show_bug.cgi?id=1413858
I can confirm this issue on wayland, I can copy text from gnome terminal and I'm not able to paste it in to gedit sometimes. However I use CopyQ clipboard manager, and the text can appear there, but cannot be pasted out. I am sometimes able to overcome this issue by changing the item that CopyQ will paste out then switch back to the old thing (i.e. switch to item 2 in the clipboard list, then back to #1) and the old thing will be pasted out as expected. This issue can be massively transient, as I haven't noticed it for weeks, then yesterday it got me twice...
I have the same situation on GNOME 3.24, libwayland 1.13.0.
I've this issue too. I reported on the downstream bug (Fedora). Happens with Gedit, LibreOffice (GTK3), Geary, and other bunch of software. I use GPaste (I disabled it for sometime, but the problem still persisted). I had to do the same as Comment 1 to activate the item that I need to paste.
I'm hitting the same issue. Directly copying between gnome-terminal and lets say Firefox does not work. Copying first to gedit and from there to firefox does work...
Guess the problem is only with between apps running in X <-> Wayland. Gpaste can't solve this issue.
Looks like a regression, it stopped working for me after an update on F25
I don't see anything in gtk/gdk that landed recently, could be related to bug 782472 in mutter though.
Yeap, I reckon it's a mutter bug, dupe of bug 782472 - I just tried with mutter from current gnome-3-22 and copy/paste works fine there whereas I can reproduce at will without that fix. Any chance you can try with an up-to-date mutter build (wither from gnome-3-22 or gnome-3-24 branch in git) and confirm it works in your case as well? Otherwise, I'll close this bug as a dupe of bug 782472 as I am pretty sure it's the same...
https://koji.fedoraproject.org/koji/buildinfo?buildID=894640 * Thu May 18 2017 Florian Müllner <fmuellner@redhat.com> - 3.25.1-2 - Fix copy+paste of UTF8 strings between X11 and wayland Test build, not yet available in repos.
Tried to install the build in Koji as per Comment 9 and I found that: $ sudo dnf upgrade --enablerepo=updates-testing mutter* Error: package gnome-shell-3.22.3-1.fc25.x86_64 requires libmutter-clutter-1.0.so()(64bit), but none of the providers can be installed
# dnf upgrade https://kojipkgs.fedoraproject.org//packages/mutter/3.22.4/3.fc25/x86_64/mutter-3.22.4-3.fc25.x86_64.rpm All packages you can find here: https://koji.fedoraproject.org/koji/packageinfo?packageID=8870
The new version of Mutter has fix the issue for me.
Created attachment 352151 [details] Copied unicode characters are decoded I've tried the last update, still gets the error: Broken pipe, but also the copied text which is UTF-8 Arabic text is decoded as you can see in the attached image.
I only tried it with plan text.
So after a few more days using it not totally fixed. It is better, it not broken all the time. But its still does not work all the time.
Sometimes I must use the copy twice in Firefox. That's all about it.
ay 29 20:17:03 vulcan.fathom13.com gnome-terminal-[1959]: gdkselection-wayland.c:266: error reading selection buffer: Operation was cancelled May 29 20:17:06 vulcan.fathom13.com gedit[6510]: Error writing selection data: Error writing to file descriptor: Broken pipe May 29 20:17:13 vulcan.fathom13.com gnome-shell[1524]: Failed to open pipe: Too many open files <Lots More of the Failed to open pipe> May 29 20:17:17 vulcan.fathom13.com gnome-shell[1524]: Failed to open pipe: Too many open files May 29 20:17:17 vulcan.fathom13.com gnome-shell[1524]: Failed to open pipe: Too many open files May 29 20:17:17 vulcan.fathom13.com gnome-shell[1524]: Failed to open pipe: Too many open files May 29 20:17:23 vulcan.fathom13.com gnome-terminal-[1959]: gdkselection-wayland.c:266: error reading selection buffer: Operation was cancelled
I encountered this bug as well. I am not able to paste into gnome-terminal from any other application using Ctrl + Alt + V. Interestingly, the paste -sometimes- work with a huge delay (~2 minutes or so). If I copy from the terminal and paste into the terminal (whether same tab or different tab or different terminal window), it works fine (with no delay). Copy/paste between other applications works as well. Copying from terminal and pasting to other applications works fine also. Only case not working is copying from other apps to gnome-terminal. On journal, I can find errors like this: gnome-terminal-[3839]: gdkselection-wayland.c:266: error reading selection buffer: Operation was cancelled
Very similar behaviour here, coping from Gnome Terminal and trying to paste in a form in Chromium leads to Chromium tab freeze. Going via gedit usually helps. journalctl repeats the message below every 2-10s (increasing delay). After about 60 minute (~7 messages) the issue hang disappears but the text does not end up in the Chromium form... gnome-terminal-[3659]: Error writing selection data: Error writing to file descriptor: Broken pipe Arch Linux, Gnome Shell 3.24.3-1.
So on Fedora 26 running on Wayland is just about completely broken. Fails to copy and paste: Sep 09 19:45:02 vulcan.fathom13.com gedit[10256]: Error writing selection data: Error writing to file descriptor: Broken pipe Sep 09 19:45:02 vulcan.fathom13.com gedit[10256]: Error writing selection data: Error writing to file descriptor: Broken pipe Sep 09 19:45:02 vulcan.fathom13.com gedit[10256]: Error writing selection data: Error writing to file descriptor: Broken pipe Sep 09 19:45:02 vulcan.fathom13.com gedit[10256]: Error writing selection data: Error writing to file descriptor: Broken pipe Sep 09 19:45:02 vulcan.fathom13.com gedit[10256]: Error writing selection data: Error writing to file descriptor: Broken pipe I quite like gedit but it now unusable on Wayland. Seems to get it self in a twist doing a bit of pasting and cutting.
I don't know which dark magic use the SUSE team, but after my migration from Fedora 26 I never meet this issue again. SUSE Tumbleweed, libwayland 1.13.0, Gedit 3.22.1, GNOME 3.24.
I am on Fedora 27 but have had this issue for over a year now. This bug is immensely frustrating. I am often unable to copy or cut anything out of GEdit into *any* other application. Whether that be Firefox, Epiphany, LibreOffice, Gnote, or anything else, they all just lag for a while and nothing gets pasted. Having gpaste enabled or disabled doesn't help.
I am also still seeing this bug and it make gedit not usable really on wayland. Feb 03 11:10:27 vulcan.fathom13.com gedit[7043]: Error writing selection data: Error writing to file descriptor: Broken pipe Feb 03 11:10:33 vulcan.fathom13.com gedit[7043]: Error writing selection data: Error writing to file descriptor: Broken pipe Feb 03 11:10:34 vulcan.fathom13.com gnome-terminal-[2427]: gdkselection-wayland.c:267: error reading selection buffer: Operation was cancelled Feb 03 11:10:35 vulcan.fathom13.com gedit[7043]: Error writing selection data: Error writing to file descriptor: Broken pipe Its a basic function and its broken.
When this happens in gedit, if you right click, do you have the “Paste” entry greyed out or available in the context menu? And when ctrl-c/ctrl-v fails, does primary selection works though (middle click button)? I'm trying to copy/paste various UTF8 text (from http://kermitproject.org/utf8.html) from Firefox (using Wayland native version), from chrome (X11/Xwayland) and from gnome-terminal (Wayland native gtk3) to gedit and it works fine, so there must be something else coming into play there...
This is a sporadic issue but happens quite often. In my case the issue is about copying from GEdit to other applications. In this case "Paste" is not grayed out from context menu (after mouse right click or Shift-F10) but nothing happens nor after Ctrl-V neither after click on "Paste" in context menu of destination window. Insertion keeps working well within GEdit windows and GEdit tabs all the time. Every time in case of issue an error message logged: gedit[9433]: Error writing selection data: Error writing to file descriptor: Broken pipe I tested primary selection, e.g.: 1. Selected a part of a text in GEdit; 2. Middle click in a destination window; 3. Nothing inserted; 4. Select another part of text in GEdit; 5. The newly selected text appears in the destination window (without new click); The described scenario may occur from time to time, may nothing insert at all or work as expected. I cannot find an event triggering issue.
So my use case is I use Fedora as my main development machine, the other day I was writing a bash script in gedit and when I tried to cut and paste into a gnome shell, it just was not working at all and spewing the broken pipe errors in the logs. Even restarting gedit and the terminal didn't help. You are right something must trigger the behaviour, as I just opened gedit up and have just cut and paste quite a bit just now and it all working as expected. Using both ctrl-c/ctrl-v and primary selection. So when it happens Ill report back as to if the primary selection still works of not for sure, but from memory it all stops working. I use primary selection quite a bit.
Copy/paste has been issue #1 (literally!) after gitlab migration: mutter: https://gitlab.gnome.org/GNOME/mutter/issues/1 gtk+: https://gitlab.gnome.org/GNOME/gtk/issues/1 And Carlos has posted fixes there. Could you try with those patches applied?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/820.