WineHQ
Bug Tracking Database – Bug 57504

 Bugzilla

 

Last modified: 2024-12-13 21:36:49 UTC  

Possible regression with Unity3D games: Framedrops when moving cursor.

Bug 57504 - Possible regression with Unity3D games: Framedrops when moving cursor.
Possible regression with Unity3D games: Framedrops when moving cursor.
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: win32u
9.22
x86-64 Linux
: P2 major
: ---
Assigned To: Mr. Bugs
: regression
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2024-12-05 22:28 UTC by roidal
Modified: 2024-12-13 21:36 UTC (History)
2 users (show)

See Also:
Regression SHA1: b3bae21789f9ca4240ef70a17985d1bf655fbfde
Fixed by SHA1: c6614894be3d465540fee1ecca059b68e02fe0f1
Distribution: ---
Staged patchset:


Attachments
Output of ecognomix (25.06 KB, text/plain)
2024-12-05 22:28 UTC, roidal
Details
Possible fix (15.40 KB, patch)
2024-12-09 09:54 UTC, Rémi Bernon
Details | Diff
build error (1.56 KB, text/plain)
2024-12-09 10:32 UTC, roidal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description roidal 2024-12-05 22:28:20 UTC
Created attachment 77534 [details]
Output of ecognomix

I get huge framedrops (sometimes to 0) while moving the mouse/cursor in Unity3D games, after upgrading to wine 9.21/9.22 (from 9.20).

Specs:
OS    : Fedora 41
Kernel: 6.11.10-300
GPU   : Radeon RX 5500
Driver: radv/mesa 24.2.8
DXVK  : 2.5.1

Tested games: EcoGnomix, UBOAT, Breachway, Star Trucker, DREDGE.

If you need more Informations, logs, etc. let me know.
Comment 1 roidal 2024-12-05 22:39:12 UTC
Problem is also happening on a complete new wineprefix (and using WineD3D).
Comment 2 Fabian Maurer 2024-12-06 16:51:11 UTC
Can you try normal wine without DXVK?
Also, does downgrading Wine help? This would make it a regression.
Any free game to test with?
Comment 3 roidal 2024-12-06 17:14:33 UTC
A clean wineprefix without DXVK has the same problem.

All the games are working fine again when switching back to wine 9.20.

The pools-demo can be used for testing: https://tensori.itch.io/pools
With wine 9.21 or 9.22 it comes to a complete halt while moving the mouse even in the main-menu (use mangohud or similar to check FPS).
Comment 4 Fabian Maurer 2024-12-07 16:46:16 UTC
Running the POOLS Demo with wine-9.20, I only get a blackscreen. It works with DXVK though. Self compiled wine-9.22 works for me, but doesn't seem to have framerate drops.
Comment 5 roidal 2024-12-07 17:10:59 UTC
Thanks for testing!

That is unfortunate though.

I made a complete fresh installation of Fedora and a new user, but the problem still exist. Might be combination of hardware and drivers?
I also checked systemlogs and dmesg, but i can't see anything relevant.

Do you have an idea how i might be able to track down the problem?
Comment 6 Fabian Maurer 2024-12-08 01:38:27 UTC
You could do a regression test (see https://gitlab.winehq.org/wine/wine/-/wikis/Regression-Testing) to figure out what exactly causes this.

I'd offer to help, but since I can't reproduce the issue...
Comment 7 roidal 2024-12-08 12:15:59 UTC
The problem seem to be introduced by commit b3bae21789f9ca4240ef70a17985d1bf655fbfde
Comment 8 roidal 2024-12-08 12:32:45 UTC
Updated component to win32u since the problem seem to be related to commit b3bae21789f9ca4240ef70a17985d1bf655fbfde

Let me know if i should provide more informations, or do some specific testing.
Comment 9 roidal 2024-12-08 19:08:06 UTC
I did more testing and it seems like it's caused by

get_win_monitor_dpi() -> monitor_dpi_from_rect() -> lock_display_devices()

It's the lock_diplay_devices() which either seem to be blocked, or block something else by taking too much time.
I believe it is rather the last one.

Worth mentioning here is that get_win_monitor_dpi() seem to be called at least for each mouse-update, and therefore more than 1000 times per second. When i move the mouse it is even more and i get 50k calls within just a few seconds.
Comment 10 Fabian Maurer 2024-12-08 20:07:09 UTC
Alright, CCing commit author.
Comment 11 Rémi Bernon 2024-12-09 09:54:53 UTC
Created attachment 77558 [details]
Possible fix

Thanks for the report! Could you check whether this patch helps?
Comment 12 roidal 2024-12-09 10:32:58 UTC
Created attachment 77559 [details]
build error

error after applying 0004-win32u-Use-the-winstation-monitor-update-serial-to-d.patch to wine-10.0-rc1
Comment 13 roidal 2024-12-09 10:35:46 UTC
wine failed to build after applying the patch to wine-10.0-rc1.
see comment 12 for for the error-message.
Comment 14 Rémi Bernon 2024-12-09 10:40:02 UTC
Ah sorry, you need to run `tools/make_requests` as well before building. I'm used to not including this in patches as it's automatically done when they get merged.
Comment 15 roidal 2024-12-09 11:44:35 UTC
With the patch i don't have the framedrops anymore.

Thanks!
Comment 16 Rémi Bernon 2024-12-10 22:33:18 UTC
Should be fixed after c6614894be3d465540fee1ecca059b68e02fe0f1
Comment 17 Alexandre Julliard 2024-12-13 21:36:49 UTC
Closing bugs fixed in 10.0-rc2.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers