Copy/paste is broken in wine on Gnome

Asked by Christian Hubmann

I use wine to run a few applications like notepad++.
Copy/cut/paste seems to be broken in wine applications.

1. Run notepad++ in wine.
2. Copy some text.
3. Paste it. It usually works the first time.
4. Copy some more text.
5. Paste again. No text is pasted, but a ping sound is played.

The same problem appears in other wine applications too.
It does not matter if you copy with Ctrl+C or the context menu. However if you hit Ctrl+C mutiple times, it mostly works (but not always).

I have this problem on 2 systems:
1) Ubuntu 20.04 Focal on X11, Ryzen 7 2600X, 32GB, Nvidia RTX2060
2) Ubuntu 20.10 Groovy on Wayland, Core i5-8250U, 8GB, Intel UHD Graphics 620

However, I do not have this problem when running Kubuntu 20.04 which leads me to believe it is a problem with Gnome.

Wine version: wine-5.0 (Ubuntu 5.0-3ubuntu1)

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

Why are you using WINE for Notepad++ when a native version exists?

Revision history for this message
Christian Hubmann (chrishub) said :

This is not a native version, just pre-packaged with wine.
As I said, this problem happens in other applications too.
I was just using notepad++ as an example.

Revision history for this message
Manfred Hampl (m-hampl) said :

Maybe you are affected by the same problem as discussed in Bug #1872527 or Bug #1852183

Revision history for this message
Christian Hubmann (chrishub) said :

I'm not sure. In they describe it as working 90% of the time, which is not the case for me.
In the problem is in LibreOffice, but I don't have this problem in LibreOffice at all.

I did some further expirements. I can reproduce the problem on a 100% fresh install of Ubuntu.
I installed VirtualBox onto a Windows host. Then I did the following:

- Install Ubuntu 20.04. I chose non-free packages, otherwise leave everything on default.
- sudo apt install wine
- Download notepad2 (x86 or x64 doesn't matter).
- wine Notepad2.exe
- Write "Hello"
- Ctrl+A, Ctrl+C, Ctrl+V, pasting works
- Do Ctrl+A, Ctrl+C, Ctrl+V again, pasting is broken!
- Ctrl+A, Ctrl+C, Ctrl+V, now it's working again. Do it again, it's broken again. It seems copy/paste only works every other time. Which is infuriating when doing real work.

Some other observations:
- Using X11 or Wayland makes no difference
- The Windows application used makes no difference, I have the problem with every app I tried
- I upgraded to Ubuntu 20.10 beta. No change.
- I also tried Manjaro Gnome in a VM and it's the same problem there, so it's not just Ubuntu.

I then installed Mate into the same VM. I was not able to reproduce it, it's working 100% of the time in Mate. So this really seems to be a problem with Gnome.

Revision history for this message
actionparsnip (andrew-woodhead666) said :

Update your big with your research

Revision history for this message
Manfred Hampl (m-hampl) said :

There is a known problem that copy/paste does not work in virtualbox with version 6.1.4 of the guest additions -

Revision history for this message
Christian Hubmann (chrishub) said :

Manfred, I have the same problem on two physical installations. I used VirtualBox to rule out issues with my existing installations, und to make it easier to reproduce.
I will create a bug report.

Can you help with this problem?

Provide an answer of your own, or ask Christian Hubmann for more information if necessary.

To post a message you must log in.