Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening the context menu becomes slow after a while #2877

Open
cmvizitiu opened this issue Oct 30, 2024 · 5 comments
Open

Opening the context menu becomes slow after a while #2877

cmvizitiu opened this issue Oct 30, 2024 · 5 comments
Labels

Comments

@cmvizitiu
Copy link

Describe the bug
After some period of time after pressing the shortcut key for opening the CopyQ window (to show the clipboard items listing) it takes between 2 to 3 seconds to display the CopyQ window.

To Reproduce
Install CopyQ. Assign shortcut from Plasma (Meta-V) (actual value makes no difference). First use the computer for some time to fill the history; after some time using the computer WITHOUT ENGAGING the CopyQ clipboard items listing window notice that pressing the shortcut to engage CopyQ results in a three seconds delay before displaying the window.

Expected behavior
CopyQ window should have been displayed instantaneous the same way it is displayed after two or three calls to CopyQ (or immediately after install)

Version, OS and Environment
CopyQ Clipboard Manager 9.0.0
Qt: 5.15.14
KNotifications: 5.116.0
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Fedora Linux 40 (Workstation Edition)

Plasma on X11 running on Intel Core i9-12900K with both "E" and "P" cores but the problem manifests itself on other classic Intel architecture and the same Fedora configuration.

free -h 
               total        used        free      shared  buff/cache   available
Mem:            62Gi        14Gi        27Gi       3.8Gi        25Gi        47Gi
Swap:           23Gi          0B        23Gi

Additional context
Definitely not a keyboard problem and not an issue with the "E"/"P" Intel Core architecture: it happens on completely different Intel systems too. The problem is actually difficult to reproduce because once you notice it, it disappears (almost like a "heisenbug") and the application window will appear immediately.

What can be said for sure is that it takes about two to five minutes of regular use of the computer without displaying the CopyQ window to then get between one and three delayed displays of the clipboard window. So it's not always that it's only the first "call" to the CopyQ window which has the delay, sometimes multiple attempts result in the same two or three seconds delay. Sometimes simply swapping between items fixes the problem and the CopyQ window appears instantaneously. I tried reducing the number of items in history from 200 to 100 and for a short period of time that appeared to solve the problem.

I would like to underline that the issue is strictly related to the display of the clipboard items window, using the regular copy/paste is never delayed. At times the regular clipboard and the X clipboard become messed up though in the sense that no matter what I put into the clipboard, SHIFT-INSERT will paste the same item (most likely to occur after an image copy). The only way out of that problem is to display the clipboard items, chose any other item than the current selected one (and which should have been pasted...) then select back the item you're interested in.

The time it took me to write and edit the paragraphs above (from "Additional Context" downwards) was enough to produce the problem ONCE. Took two seconds to display the window when I pressed Win-V but additional presses of the keyboard shortcut resulted in the immediate display of the window.

Tried deleting the images from clipboard, made no difference. Following an older bug report from 2020 I disabled the tray icon, it made no difference either. The only thing that is most likely to fix the issue for a few minutes, is interacting with the CopyQ window one way or another.

copyq log comes empty but the GUI Help options produces this:

Warning [2024-10-22 09:18:30.450] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 09:18:30.451] <monitorClipboard-93093>: ELAPSED 5002 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:18:30.452] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:19:49.778] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 09:19:49.780] <monitorClipboard-93093>: ELAPSED 5002 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:19:49.781] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:19:49.802] <synchronizeToSelection-146689>: ELAPSED 5001 ms accessing [data:text/plain]
Warning [2024-10-22 09:19:49.804] <synchronizeToSelection-146689>: ELAPSED 5002 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:19:49.805] <synchronizeToSelection-146689>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:19:49.779] <synchronizeFromSelection-146691>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 09:19:49.880] <synchronizeFromSelection-146691>: ELAPSED 5101 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:19:49.880] <synchronizeFromSelection-146691>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:33:55.592] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 09:33:55.602] <monitorClipboard-93093>: ELAPSED 5011 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:33:55.603] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:36:46.540] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 09:36:46.550] <monitorClipboard-93093>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:36:46.550] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:52:40.314] <monitorClipboard-93093>: ELAPSED 5001 ms accessing [data:text/plain]
Warning [2024-10-22 09:52:40.323] <monitorClipboard-93093>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:52:40.324] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 09:58:53.944] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 09:58:53.954] <monitorClipboard-93093>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-22 09:58:53.955] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-22 10:05:28.419] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-22 10:05:28.421] <monitorClipboard-93093>: ELAPSED 5002 ms accessing [UTF8:text/plain]
Warning [2024-10-22 10:05:28.422] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 14:41:10.559] <monitorClipboard-93093>: ELAPSED 5001 ms accessing [data:text/plain]
Warning [2024-10-23 14:41:10.560] <monitorClipboard-93093>: ELAPSED 5002 ms accessing [UTF8:text/plain]
Warning [2024-10-23 14:41:10.560] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 15:12:46.026] <monitorClipboard-93093>: ELAPSED 5001 ms accessing [data:text/plain]
Warning [2024-10-23 15:12:46.036] <monitorClipboard-93093>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-23 15:12:46.036] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 15:20:57.486] <synchronizeFromSelection-288071>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-23 15:20:57.486] <synchronizeFromSelection-288071>: ELAPSED 5001 ms accessing [UTF8:text/plain]
Warning [2024-10-23 15:20:57.487] <synchronizeFromSelection-288071>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 15:20:57.512] <synchronizeToSelection-288070>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-23 15:20:57.512] <synchronizeToSelection-288070>: ELAPSED 5000 ms accessing [UTF8:text/plain]
Warning [2024-10-23 15:20:57.513] <synchronizeToSelection-288070>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 15:20:57.486] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-23 15:20:57.587] <monitorClipboard-93093>: ELAPSED 5101 ms accessing [UTF8:text/plain]
Warning [2024-10-23 15:20:57.587] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 18:55:24.368] <monitorClipboard-93093>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-23 18:55:24.377] <monitorClipboard-93093>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-23 18:55:24.378] <monitorClipboard-93093>: Clipboard data expired, refusing to access old data
Warning [2024-10-23 20:01:53.280] <Server-3153>: CopyQ server is already running.
Warning [2024-10-24 15:17:56.841] <monitorClipboard-3450>: ELAPSED 5002 ms accessing [data:text/plain]
Warning [2024-10-24 15:17:56.851] <monitorClipboard-3450>: ELAPSED 5012 ms accessing [UTF8:text/plain]
Warning [2024-10-24 15:17:56.852] <monitorClipboard-3450>: Clipboard data expired, refusing to access old data
Warning [2024-10-25 10:44:20.649] <monitorClipboard-3450>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-25 10:44:20.650] <monitorClipboard-3450>: ELAPSED 5001 ms accessing [UTF8:text/plain]
Warning [2024-10-25 10:44:20.651] <monitorClipboard-3450>: Clipboard data expired, refusing to access old data
Warning [2024-10-25 13:44:49.041] <monitorClipboard-3450>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-25 13:44:49.050] <monitorClipboard-3450>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-25 13:44:49.051] <monitorClipboard-3450>: Clipboard data expired, refusing to access old data
Warning [2024-10-25 14:21:27.234] <monitorClipboard-3450>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-25 14:21:27.235] <monitorClipboard-3450>: ELAPSED 5002 ms accessing [UTF8:text/plain]
Warning [2024-10-25 14:21:27.235] <monitorClipboard-3450>: Clipboard data expired, refusing to access old data
Warning [2024-10-25 14:21:27.235] <synchronizeFromSelection-99162>: ELAPSED 5002 ms accessing [data:text/plain]
Warning [2024-10-25 14:21:27.336] <synchronizeFromSelection-99162>: ELAPSED 5103 ms accessing [UTF8:text/plain]
Warning [2024-10-25 14:21:27.336] <synchronizeFromSelection-99162>: Clipboard data expired, refusing to access old data
Warning [2024-10-27 20:35:10.527] <synchronizeFromSelection-212728>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-27 20:35:10.537] <synchronizeFromSelection-212728>: ELAPSED 5009 ms accessing [UTF8:text/plain]
Warning [2024-10-27 20:35:10.537] <synchronizeFromSelection-212728>: Clipboard data expired, refusing to access old data
Warning [2024-10-27 20:35:10.533] <monitorClipboard-3450>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-27 20:35:10.633] <monitorClipboard-3450>: ELAPSED 5101 ms accessing [UTF8:text/plain]
Warning [2024-10-27 20:35:10.633] <monitorClipboard-3450>: Clipboard data expired, refusing to access old data
Warning [2024-10-27 20:35:20.882] <synchronizeFromSelection-212728>: ELAPSED 5001 ms accessing [data:text/plain]
Warning [2024-10-27 20:35:20.891] <synchronizeFromSelection-212728>: ELAPSED 5009 ms accessing [UTF8:text/plain]
Warning [2024-10-27 20:35:20.891] <synchronizeFromSelection-212728>: Clipboard data expired, refusing to access old data
Warning [2024-10-27 20:35:20.982] <monitorClipboard-3450>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-27 20:35:20.983] <monitorClipboard-3450>: ELAPSED 5001 ms accessing [UTF8:text/plain]
Warning [2024-10-27 20:35:20.983] <monitorClipboard-3450>: Clipboard data expired, refusing to access old data
Warning [2024-10-28 13:29:39.413] <monitorClipboard-3408>: ELAPSED 605 ms accessing [data:text/plain;charset=utf-8]
Warning [2024-10-28 13:29:39.423] <monitorClipboard-3408>: ELAPSED 615 ms accessing [UTF8:text/plain;charset=utf-8]
Warning [2024-10-28 18:00:10.308] <monitorClipboard-3408>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-28 18:00:10.317] <monitorClipboard-3408>: ELAPSED 5009 ms accessing [UTF8:text/plain]
Warning [2024-10-28 18:00:10.317] <monitorClipboard-3408>: Clipboard data expired, refusing to access old data
Warning [2024-10-28 18:00:10.552] <synchronizeFromSelection-46434>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-28 18:00:10.560] <synchronizeFromSelection-46434>: ELAPSED 5009 ms accessing [UTF8:text/plain]
Warning [2024-10-28 18:00:10.561] <synchronizeFromSelection-46434>: Clipboard data expired, refusing to access old data
Warning [2024-10-28 18:00:20.653] <monitorClipboard-3408>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-28 18:00:20.662] <monitorClipboard-3408>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-28 18:00:20.662] <monitorClipboard-3408>: Clipboard data expired, refusing to access old data
Warning [2024-10-28 18:00:21.039] <synchronizeFromSelection-46434>: ELAPSED 5001 ms accessing [data:text/plain]
Warning [2024-10-28 18:00:21.048] <synchronizeFromSelection-46434>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-28 18:00:21.048] <synchronizeFromSelection-46434>: Clipboard data expired, refusing to access old data
Warning [2024-10-28 18:01:56.892] <synchronizeFromSelection-46434>: ELAPSED 5001 ms accessing [data:text/plain;charset=utf-8]
Warning [2024-10-28 18:01:56.902] <synchronizeFromSelection-46434>: ELAPSED 5011 ms accessing [UTF8:text/plain;charset=utf-8]
Warning [2024-10-28 18:01:56.902] <synchronizeFromSelection-46434>: Clipboard data expired, refusing to access old data
Warning [2024-10-29 09:37:30.245] <synchronizeFromSelection-64119>: Failed to provide clipboard
Warning [2024-10-29 10:35:38.498] <synchronizeFromSelection-68628>: Failed to provide clipboard
Warning [2024-10-29 10:35:41.656] <synchronizeFromSelection-68647>: Failed to provide clipboard
Warning [2024-10-29 10:57:22.203] <synchronizeFromSelection-72584>: Failed to provide clipboard
Warning [2024-10-29 11:00:21.463] <synchronizeFromSelection-73146>: Failed to provide clipboard
Warning [2024-10-29 11:05:13.825] <synchronizeFromSelection-73903>: Failed to provide clipboard
Warning [2024-10-29 11:15:18.264] <synchronizeFromSelection-75113>: Failed to provide clipboard
Warning [2024-10-29 11:27:08.936] <synchronizeFromSelection-76702>: Failed to provide clipboard
Warning [2024-10-29 13:48:40.964] <synchronizeFromSelection-86220>: Failed to provide clipboard
Warning [2024-10-30 13:08:52.162] <monitorClipboard-3408>: ELAPSED 5000 ms accessing [data:text/plain]
Warning [2024-10-30 13:08:52.172] <monitorClipboard-3408>: ELAPSED 5010 ms accessing [UTF8:text/plain]
Warning [2024-10-30 13:08:52.172] <monitorClipboard-3408>: Clipboard data expired, refusing to access old data
@cmvizitiu cmvizitiu added the bug label Oct 30, 2024
@hluk
Copy link
Owner

hluk commented Nov 9, 2024

Can you try CopyQ 9.1.0? I've fixed some context menu update problems.

@cmvizitiu
Copy link
Author

OK, upgraded to 9.1.0. Sorry to have to report but, after what appeared to be a promising start the issue is back.

What I can confirm though is that on a freshly booted Fedora Linux the rate at which the issue appears is way lower. I mean in three hours after the update I've only noticed the issue twice. But, after several "computer sleep -> computer wake" cycles the problem re-appeared.

Will need more experimentation but it would seem as if heavy usage of am HTML rendering engine (either Gecko or the Chrome equivalent) to edit / work with complex JavaScript (e.g. this text editor here) would make the problem appear faster.

Before you ask: no, echo 1 | sudo tee /proc/sys/vm/compact_memory made no difference.

@chrapuch
Copy link

Hi, I had a similar problem, but read somewhere that using nVidia GPU might have to do with it.
Are you using nVidia GPU?
What I did, as a experiment is that I disabled the Composing with Shift+Alt+F12 and CopyQ started behaving really fast.
So then, I went to System Settings -> Window Management -> Window Rules, added a new profile for CopyQ:

  • Window Class (Substring Match): copyq
  • Window Role (Exact Match): main
  • Block Composing (Force): Yes
    image

Now, I have Composing enabled, like always and CopyQ w/o composing, which makes it fast and responsive.
Good luck!

@cmvizitiu
Copy link
Author

Hi, thanks for your suggestions.

Silly me, I thought I specified the GPU... apparently I didn't.

Right now I'm running on i9-12900K's native GPU (whatever that is) and in all cases where I've encountered the issue it was X11 on Intel GPUs. I will try your suggestion though, who knows.

@gtahp
Copy link

gtahp commented Dec 4, 2024

Hi, I had a similar problem, but read somewhere that using nVidia GPU might have to do with it. Are you using nVidia GPU? What I did, as a experiment is that I disabled the Composing with Shift+Alt+F12 and CopyQ started behaving really fast. So then, I went to System Settings -> Window Management -> Window Rules, added a new profile for CopyQ:

  • Window Class (Substring Match): copyq
  • Window Role (Exact Match): main
  • Block Composing (Force): Yes
    image

Now, I have Composing enabled, like always and CopyQ w/o composing, which makes it fast and responsive. Good luck!

I've tried this and indeed the CopyQ shows up instantly, no delay for the window to show up. However, now when closing the window by performing an action such as selecting what to paste, the whole screen flashes black and it seems to redraw everything. That's on X11, on wayland that doesn't seem to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants