https://bugs.winehq.org/show_bug.cgi?id=56981
Bug ID: 56981 Summary: Mouse movement causes huge CPU spikes when using WINEESYNC. Product: Wine-staging Version: 9.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: logos128@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Regression SHA1: e479cad86f1f7de5d2a0a0d1398e7733c0aaef3e Distribution: ArchLinux
The problem occurs every time when Wine is launched with WINEESYNC=1 - doesn't matter the application or the type of desktop used (virtual/non-virtual). It also happens when wine apps are in background, i.e. the topmost window is from a Linux app, etc. (As a side note Proton's fsync patchset is also affected.)
The process with highest CPU usage is c:\windows\system32\explorer.exe (~70%) followed by /usr/bin/wineserver (~40%) - on a 6 core Intel CPU (12 virtual cores). Normally these processes have very low CPU usage (<1%) on mouse movement.
I did manual bisect on the wine-development tree and found that commit 90dcd2eaa6b6a2afaf298f1e457938350b0becfc "win32u: Use the thread message queue shared memory in peek_message." was causing the problem with the eventfd_synchronization patchset. After reverting this commit + the other two related win32u commits, CPU usage is back to normal when using esync.
Steps to reproduce: 1. Launch any Wine app - for example "winecfg". 2. Move the mouse pointer intensively. 3. See the CPU usage.