[X11] copy/paste (clipboard) is broken in Ubuntu 19.10

Bug #1852183 reported by Adam Dingle on 2019-11-12
This bug affects 46 people
Affects Status Importance Assigned to Milestone
Fix Released
libreoffice (Ubuntu)
Marcus Tomlinson
mutter (Ubuntu)
Marco Trevisan (Treviño)

Bug Description

I'm running LibreOffice on Ubuntu 19.10.

In this environment, copy/cut/paste often fails. Specifically, the paste command sometimes does not paste the text that was cut/copied most recently. Instead, it pastes text that was cut/copied at some prior time.

I use LibreOffice Writer a lot, and I now see this problem very often, i.e. many times every day.

There is some discussion of the problem here:


Several posters there say that they are also using Ubuntu 19.10.

Ubuntu 19.10 includes Mutter 3.34, which has a new clipboard manager:


It seems like that could be related.

Adam Dingle (adam-yorba) wrote :

I now believe this problem is not specific to LibreOffice. I see it there often since I use LibreOffice Writer a lot, but it just happened again when I cut some text in Geany (a text editor) and attempted to paste it into the email program Geary. So I think this is a general clipboard problem in Ubuntu 19.10.

Given that, I will change the bug's title to remove the word "LibreOffice", and remove it from the libreoffice project.

summary: - copy/paste (clipboard) is broken in LibreOffice on Ubuntu 19.10
+ copy/paste (clipboard) is broken in Ubuntu 19.10
no longer affects: libreoffice (Ubuntu)

Agreed, this does seem to be somewhat Ubuntu (and indeed perhaps Mutter) related, and not specific to LibreOffice.

I tried the exact same version of LibreOffice (libreoffice- on Debian Buster and Ubuntu 19.10, and found that while reproducible on Ubuntu, it is not on Debian (see attached screencasts).

Ubuntu Mutter Version: 3.34.1-1ubuntu1
Debian Mutter Version: 3.34.1+git20191107-1

Whoops, I was testing Ubuntu on X11 and Debian on Wayland. I switch to X11 on Debian and this is indeed reproducible there (see attached).

I will report this upstream.

Changed in mutter (Ubuntu):
status: New → Triaged
summary: - copy/paste (clipboard) is broken in Ubuntu 19.10
+ [X11] copy/paste (clipboard) is broken in Ubuntu 19.10
ethanay (ethan-y-us) wrote :

I can only reproduce this bug in LibreOffice Calc (spreadsheet). I cannot reproduce it in Writer or Geary.

But it is a consistent problem for me in Calc.

Here are the symptoms/process:
1. First new copy invariably fails to copy text, instead copies/stores a bitmap image.
2. If I "cut" instead of "copy" then I have to use the "undo" function to restore the text so I can attempt again.
3. Undoing my paste/cut operations consistently causes LibreOffice to crash.
4. Second attempt at cut/copy invariably succeeds.

I will try to grab a crash report as it seems specifically related to this bug.

I noticed this immediately upon upgrading from 19.04 to 19.10, all with latest stock kernel/software/updates. IE, using the standard versions in the repositories.

The behavior from this bug has the potential to cause data loss: When LibreOffice crashes before "undo" can restore the cut text, whatever chunk of data that was intended to be cut gets completely discarded and does not get recovered with the rest of the document, probably because it was stored in a buffer somewhere separate from the actual document data itself.

So all in all this bug converts text into image and then deletes the data altogether.

ethanay (ethan-y-us) wrote :

Attached backtrace of LibreOffice after crash as described in previous message

Changed in mutter:
status: Unknown → New
tags: added: rls-ee-incoming rls-ff-incoming

@adam-yorba, when you said you reproduced this copying from Geany into Geary what did you mean? That an image was pasted instead of text? Or that nothing was pasted?

Adam Dingle (adam-yorba) wrote :

@marcustomlinson, when copying/pasting from Geany into Geary, I didn't get an image. I believe I got the wrong text. But unfortunately I don't remember precisely.

I have seen this bug zillions of times in LibreOffice Writer, typically when copying in one window and pasting in another, and only a few times in other apps.

Thanks for your research determining that this is related to X11. That gives us a possible workaround: log into a Wayland session instead.

Lately on Linux (under an X11 session particularly), it would appear that text copied from a cell in Calc is sometimes stored in the clipboard as a bitmap.

Steps to Reproduce:
1. Open Calc.
2. Type "hello" into a cell.
3. Select the cell.
4. Press Ctrl+C / Ctrl+V over and over.

Actual Results:
Eventually, instead of text, an image containing "hello" will be pasted.

Expected Results:
The text should be copied and pasted as text always.

Reproducible: Always

User Profile Reset: No

Additional Info:

Changed in libreoffice (Ubuntu):
status: New → Triaged

@adam-yorba, thanks Adam, yeah it would seem there may be fault on both ends here (mutter and libreoffice). I'm going to re-add LibreOffice and report this upstream.

It's useful to know that a recent update to mutter is at least partly to blame for this, as I cannot reproduce the issue on versions older than 3.34.

Mutter 3.34 introduced a new clipboard manager: https://www.phoronix.com/scan.php?page=news_item&px=GNOME-3.34-Clipboard-Manager

However, LibreOffice does seem to be doing something strange in its type requests from the clipboard (stand by for a comment from a colleague with more mutter knowledge), so I suspect there may be fault on both ends here.

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → New
Changed in libreoffice (Ubuntu):
importance: Undecided → High
Changed in mutter (Ubuntu):
importance: Undecided → High

Can confirm this suspected 'mutter' bad effect on calc 6.3.3 and mutter 3.34.1:

-happen with a calc spreadsheet when trying to copy/paste a formula cell:
 1) from a column's cell, right click to copy it
 2) select the first same column's cell to paste: get a graphic created (kind of image with 4 cells which are draggable and extendable) instead of the normal pasting result.
 3) deleting that graphic objet, then re-copying the original cell, finally the pasting is done as expected.

This has been seen for each copy/paste since calc 6.3.3 upgrade, not prior.

Also note that now LO is unable to load/open an ods file : after the Nov 11th upgrades; Does not get error from a terminal.
Only get a dialog box telling calc has silently crashed and will then try to recover the ods file: but there is no file listed to recover.
Indeed that ods file load/open as usual with version prior to Focal.

Note that when copy/paste is failing, some more icons are automatically added into the top taskbar, and then are removed when the graphic objet is deleted

d7rk (d7rk) wrote :

This also happens in other office and text applications (geany, under ms office 2010 with wine, etc.) and other systems such as manjaro linux with gnome-shell 1:3.34.1+12+ga43c22e3a-1 and mutter 3.34.1+52+g403d8fcc-1 under Xorg.
Wouldn't it be a mutter bug linked to implementation of the new clipboard?

Changed in df-libreoffice:
status: New → Confirmed
tags: removed: rls-ee-incoming rls-ff-incoming
Changed in libreoffice (Ubuntu Eoan):
importance: Undecided → High
Changed in mutter (Ubuntu Eoan):
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in libreoffice (Ubuntu Eoan):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
Changed in mutter (Ubuntu Eoan):
status: New → Triaged
Changed in libreoffice (Ubuntu Eoan):
status: New → Triaged
Henio Junior (henioajunior) wrote :

I'm running LibreOffice on Ubuntu 19.10 and Fedora 31

In these environments, copy/cut/paste often fails. Specifically, the paste command sometimes does not paste the text that was cut/copied most recently. Instead, it pastes text that was cut/copied at some prior time.

Thomas M Steenholdt (tmus) wrote :

On a fully updated Ubuntu 19.10, I feel most of my problems occur, when copying from a Wayland application, and pasting to an XWindow application. Most of the time, that doesn't work at all.

As an example. Running my Firefox as a native Wayland application, I am experiencing problems copying a URL and pasting it into Chrome.

Tamas Kleiber (kleiber-tamas) wrote :

After upgrading to Ubuntu 19.10 from 19.04 I face similar issues with the clipboard. I experience these issues the most in Notepad-plus-plus which is installed via snap from stable branch. Under both Xorg and Wayland desktop servers the clipboard does not work between Notepad-plus-plus and other text editing applications reliably while switching to Gnome flashback (metacity) does not have these issues.
 In my case not only clipboard issues are present, but the favorites side bar and related windows also show graphical glitches on mouse hover over.

mutter (wayland?) version is 3.34.1
Xorg version is 7.7 if i am not mistaken
gnome-flashback/panel are 3.34.0
metacity is 3.34.1

I experience this on Ubuntu 19.10 using Wayland. To me it seems that the copy operation fails, because I use the Gnome extension Clipboard Indicator, and often the copied text is not present.

Copy and pasting screen shot does not work any more.

I started experiencing this approximately 2 weeks ago. Before that, I have have successfully run Ubuntu 19.10 without copy-paste issues.

Jeppe Bundsgaard (jeppe) wrote :

I experience this problem in all kinds of editors (LibreOffice, RStudio, Evolution, Kate), and also sometimes when creating screen dumps to the clipboard (ctrl+shift+print screen). I also thought it was connected to Clipboard Indicator, but it didn't help de-activating it.

But, hopefully good news ahead: The bug should be fixed in gtk3 3.24.13 and mutter 3.34.2 according https://gitlab.gnome.org/GNOME/mutter/issues/878#note_642048.

So now we just have to wait for Ubuntu to get to these versions. Anyway we could get this first in line of updates? - it is extremely annoying.

I experience this problem only with WPS office under Ubuntu 19.10. I usually need to copy text twice in order to send it to clipboard. Because copy option is actually broken, it happens that the previous text is pasted (not the one I copied). However, other programs work just fine most of the time.

Owen Williams (ywwg) wrote :

I have very inconsistent copy/paste under Wayland. Usually switching windows and trying again fixes it, but I'd give the success rate of a copy command working at 75%.

Owen Williams (ywwg) wrote :

This upstream bug looks like the same issue: https://gitlab.gnome.org/GNOME/mutter/issues/878

Adam Dingle (adam-yorba) wrote :

I think that the upstream bug


may not be the same issue.

This bug has "X11" in the title, and so it really refers to behavior under X11. On Ubuntu 19.10, if I run an X11 session then copying/pasting fails very often, especially in LibreOffice. For this reason I switched to Wayland several weeks ago. Under Wayland, copying/pasting still fails occasionally, but far less often. I saw copy/paste failures dozens of times per day under X11, and now they happen maybe once or twice per day in Wayland (with intensive use of LibreOffice in both cases).

In a comment in the mutter bug linked above, Carlos Garnacho wrote

    This is wayland specific.

So it is unclear to me that the patches linked there (which are to both GTK and mutter) will fix the problem in X11. Has anyone tried to reproduce this copy/paste problem after applying these patches under X11?

Daniel van Vugt (vanvugt) wrote :

The upstream bug for X11 here is https://gitlab.gnome.org/GNOME/mutter/issues/919

*** Bug 129319 has been marked as a duplicate of this bug. ***

I have the same problem with Wine applications. Ubuntu 19.10, both X11 and Wayland sessions. Copy/paste works very inconsistent.

Don Pierson (pchome) wrote :

Often cannot copy and paste between Notepad++ and Firefox or even Terminal. If I open GEdit, I can paste there, then copy again which seems to be a workaround though not a very good one.

Don Pierson (pchome) wrote :

To add to my earlier comment, it also happens when copying between Ubuntu applications. In this case, a rather poor workaround is to copy twice or even three times which usually will eventually grab the text being copied.

*** Bug 129626 has been marked as a duplicate of this bug. ***

I can't do screen capture - sometimes when i roll over a field in Chrome its like there is a list there of clipboard items. I have to copy 2 times to get text but other types of clipboard like captured images aren't working.
I'd fix this if I was up to speed with developing on this platform because it's driving me nuts.

Note that a selection's content is not stored in the clipboard (unless LibreOffice is exited) but upon pasting the target asks for the available formats and picks the best offered, that in this case should be the internal Calc format, which then would be transferred from source to target, but somehow here instead it gets a bitmap/image from the clipboard "manager" (apparently).

(In reply to Marcus Tomlinson from comment #1)
> However, LibreOffice does seem to be doing something strange in its type
> requests from the clipboard (stand by for a comment from a colleague with
> more mutter knowledge), so I suspect there may be fault on both ends here.
So what would that "doing something strange" be?

Reportedly, if the Clipboard Indicator GNOME Shell Extension was installed, removing that cured the symptom.

Willem Pieterson (wpieterson) wrote :

Can also confirm being affected by this bug. Strangely it randomly happens in LibreOffice for me, but constantly in WPS Office. When I copy something it either pasts nothing (suggesting nothing was copied) or pasts as a bitmap. Sometimes this bitmap shows all content that was copied, sometimes a random bit. When it pasts a bitmap, re-copying everything and then pasting does always work.

Tom Peelen (tom-peelen) wrote :

I'm experiencing the same bug since 2 weeks. Using Ubuntu 19.10, Libreoffice Calc Build ID: 1:6.3.4-0ubuntu0.19.10.1.

Please help!

tags: added: eoan

I do not have any GNOME shell extension, and extensions are disable in "Tweaks", but problem with copy paste/paste exits.

I can also confirm that double-copy works in some cases.

Taha Soomro (suryaya) wrote :

This happens to me in not just libreoffice but also other applications like firefox as well.

This bug is marked All and reproduced also on Windows.

Please note, I filed this but with a complaint about my system shutting down, and also not auto-saving.

As noted in that discussion, yesterday when I got the .bmp, LibreOffice shut down quickly thereafter. It may be that the bug causing the .bmp is also crashing the system.

Don't know where/if the auto-save fits in.

Now that this bug is confirmed what next? Its is really annoying and making me consider other desktop environments other than GNOME.

The bug seems fixed, at least in Libreoffice.

The bug is not fixed, even in Libreoffice, but it occurs much less frequently (maybe 1 time out of 10 or 20).

Adam Dingle (adam-yorba) wrote :

Benoit: What version of Ubuntu and LibreOffice are you running? Are you in an X11 or a Wayland session?

joshua pritikin (jpritikin73) wrote :

I'm running Eoan. After studying the comments here, I installed libgtk-3-0 from focal (https://packages.ubuntu.com/focal/libgtk-3-0). This forced me to upgrade CUPS. I'm not sure if printing still works, but the cut/copy/paste issue appears to be resolved.

Changed in mutter:
status: New → Fix Released
AJenbo (ajenbo) wrote :

This issue is present in 20.04. I'm mainly seeing it in CodeLite (probably because that is where I spend all my time), but one interesting thing is that it also affects VMs (Ubuntu 18.04) running in Boxes with shared copy paste.

tags: added: focal
tags: added: fixed-in-3.35.90 fixed-upstream

Adam: I am using Ubuntu 19.10, LibreOffice, and a default session (X11).
Actually, copy/paste worked really better on the 1st of February and during the days after. I thought it was fixed! Today, the issue is exactly the same as before.

Daniel van Vugt (vanvugt) wrote :

If the issue is https://gitlab.gnome.org/GNOME/mutter/issues/919 then it is fixed in mutter 3.35.90, which will come in Ubuntu 20.04.

Workaround: login to a Wayland session instead of X11 (or maybe X-Wayland?) session.

*** Bug 130816 has been marked as a duplicate of this bug. ***

I've found:
1. The initial CTRL-C works fine.
2. Subsequent attempts are OK if one presses CTRL-C twice on the source cell which seems to function as a workaround.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.