Copyq: Slow on Ubuntu 20.04 LTS

Created on 12 May 2020  ·  18Comments  ·  Source: hluk/CopyQ

Describe the bug
After upgrade to Ubuntu 20.04 LTS, CopyQ is very slow and chopy. Copying and pasting takes several seconds and when opening CopyQ, its main screen its very laggy.

To Reproduce
Use CopyQ on Ubuntu 20.04 LTS.

Version, OS and Environment
CopyQ Clipboard Manager v3.10.0
Qt: 5.12.5
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Ubuntu 20.04 LTS

bug

Most helpful comment

This was fixed in recent versions -- there is no tray icon animation. You can install the latest version from PPA (see the documentation for details).

All 18 comments

I can confirm this. It's laggy and barely usable.

ii copyq 3.10.0-1 amd64 Advanced clipboard manager with editing and scripting features

Can you upgrade to the latest version (v3.11.1 at this time)?

I upgraded to latest version using PPA. Unfortunately the issue persists. Please let me know if there are any logs I can provide.

ii copyq 3.11.1~focal amd64 Advanced clipboard manager with editing and scripting features

Wait, is new Ubuntu using Wayland now? In that case, I think CopyQ is stuck accessing clipboard. You can try starting the app with:

env QT_QPA_PLATFORM=xcb copyq

See details in this comment.

Ubuntu doesn't run Wayland by default yet. I don't run wayland. I tried QT_QPA_PLATFORM anyways and it didn't helpt.

The issue seems to be related to UI itself. When I browse the clipboard history, the cursor barely moves, surprisingly gnome-shell process hits 100% CPU and CPU fans are instantly on.

Can you check logs? Ideally, launch the app with env COPYQ_LOG_LEVEL=DEBUG copyq and check logs from main window (F12 shortcut).

I checked the logs. Unfortunately nothing was logged when I browsed through the clipboard history.
Scrolling through history jumps and gnome-shell CPU usage goes really high. It settles down, once copyQ is closed.

copyq.log
CopyQ

Thanks, for the recording. It looks like gnome-shell is eating the CPU even when the app window is closed and CopyQ is not doing much. Could be an issue in gnome-shell or its window manager.

I'll try to reproduce it in a VM.

I noticed it now too. That's cause by the recording I'm afraid. I tried without recording and as soon as the CopyQ window is closed, usage drops.
I didn't find any other apps causing this issue. If you have any sample app using the same UI component in mind, please let me know. I could test some other app.

I'm using CopyQ on my Mac without any issues. I'd love to use the same on my Ubuntu.

I cannot reproduce this in VM unless I change the scaling factor in Gnome, but then I'm not sure if it isn't problem in the VM provider. It could be some scaling issue in Qt or some gnome part.

Can you try start the app with following?

env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1 QT_SCREEN_SCALE_FACTORS=1 copyq

I think I found the reason for the slowdown. It's because gnome asks the application to provide a high resolution icon and CopyQ often changes its window/tray icon to show that it's running some commands/scripts. In this case, when you browse items in the list, it's checking if it can enable some menu/toolbar actions (i.e. menu commands with filters set).

Workaround now is to disable these menu items in Command dialog (F6 shortcut). By default, the commands to disable are:

  • Tag as “Important”
  • Remove tag “Important”

I'll probably just remove the changing app icon feature because it's difficult to test and maintain. Also, some people asked me how to disable it.

Disabling the two commands fixes the issue for me. It now performs as expected.

Thank you very much.

The performance problems are caused by the tray in Gnome (or the Qt integration it uses).

So, alternative to removing the commands I mentioned above, is to disable tray icon (in Tray configuration tab).

Disabling tray icon worked for me :)

Bonjour à tous :)
I'm using ubuntu 20.04 also and there are no problems.
Note that I use kvantum engine for QT apps, could the default style of QT be the reason ??
that's Strange.

The issue might be with scaling as this "env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1 QT_SCREEN_SCALE_FACTORS=1" has worked for me as well.

I have high res screen (14" 2560x1440) and thus the scaling is by default set to 200%. I'd assume it might get even worse with fractional scaling.

Just want to note that this workaround...

Workaround now is to disable these menu items in Command dialog (F6 shortcut). By default, the commands to disable are:

  • Tag as “Important”
  • Remove tag “Important”

... does not fix the performance problem for me. Each copy-action still invokes the "scissor-animation" in the tray with a noticeable lag.

So, alternative to removing the commands I mentioned above, is to disable tray icon (in Tray configuration tab).

This worked for me :) It would be great to keep the tray, though (without the changing icon).

Awesome software, by the way!

This was fixed in recent versions -- there is no tray icon animation. You can install the latest version from PPA (see the documentation for details).

Was this page helpful?
0 / 5 - 0 ratings