Author Topic: sluggish / laggy input in Wine/Linux, input events sometimes get lost  (Read 456 times)

CyrusValkonen

  • Noob
  • *
  • Posts: 2
  • Karma: +1/-0
    • View Profile
At first glance the game seems to work quite well, but if you play a while you will notice that there is something slightly wrong with the mouse and keyboard input (the graphics being perfectly fluid).

The mouse feels a tiny bit laggy, and 1 out of 10 times drag & drop, single or double-click or pressing spacebar (to end turn) does not register. The game is still playable enough, but the sluggish input makes the whole experience a lot more nasty and frustrating than it should be. If the game was not turn-based but real-time, it would be totally unplayable like this.

Please understand that I am a software dev myself, and I have already ruled out all other sources of errors and tried multiple wine versions as well as EVERY registry key of wine related to direct input/draw, and also all workarounds that exist for this online for over 4 hours. Wine also runs at only 50% CPU max, as my PC is very powerful, and I have downgraded my refresh rate to 60Hz plus my mouse to 125Hz which had no huge effect. On the Internet you will find very old advice for what seems to be a similar behavior with certain games like Fallout, and the consensus is that the only way to fix this is to modify the .INI file of the game to make it use either "alternative mouse API" or "background mouse enabled".

So as you can see I have strong reason to believe that this is a known problem with Wine that affects quite some older games, but it cannot be fixed with Wine it can only be fixed by game settings.

Another thing with this bug is, that it might start out ok-ish but then alternates back and forth for XX minutes between being ok-ish and more laggy. Like outlined, this is unrelated to background programs, what is going on in the game and CPU/GPU utilization. I suppose there is some sort of polling rate mismatch that creates those shifts and lost/delayed input events.

Unfortunately no version of DXVK works for me and Underrail in particular, not sure if this would change anything though.

Here you can see how this manifests in the inventory: http i.imgur.com ykGDKOE.mp4

Despite the game feeling slightly sluggish to interact with (like what you see on screen has some +80ms extra delay), the faster you interact with the game, the more input events can get lost. Like you see/hear in the video, each time I move the mouse up and down I drag one item precisely, and it fails to register every 10th click or so. Then in the end it doesn't even register 5 clicks in a row, because ostensibly with my timings I have hit the "timing hole" where the polling fails.

Btw. this is with Underrail Heavy Duty 1.2. I will try version 1.1 now, as this also has the dev console and maybe by remote chance it allows me to change something relevant.
« Last Edit: October 31, 2024, 07:06:00 pm by CyrusValkonen »

CyrusValkonen

  • Noob
  • *
  • Posts: 2
  • Karma: +1/-0
    • View Profile
Re: sluggish / laggy input in Wine/Linux, input events sometimes get lost
« Reply #1 on: November 01, 2024, 03:20:40 am »
OK, I fixed the problem by using DXVK.

The game now feels much snappier and the input delay is gone.

It is still strange though, because I have played other .NET games like Magic Arena without DXVK, and there is no real difference if the game has low minimal specs. Somehow apparently DXVK was not working for me, because Underrail uses 32-bit Vulkan, despite the game running in the same 64-bit Wine prefix, where DXVK works in for all the other games. This is why it didn't come to my mind to check for missing 32-bit vulkan packagages in my distribution. And I assumed DXVK had a bug with Underrail specifically, as it was rarely ever mentioned as necessary for the game to work properly or mentioned at all by people who gave Underrail a "gold" rating with Wine/Proton.

Anyway, sorry for the false alarm. End of story: Underrail doesn't work well without DXVK.

Arclight

  • Zoner
  • **
  • Posts: 93
  • Karma: +6/-5
    • View Profile
Re: sluggish / laggy input in Wine/Linux, input events sometimes get lost
« Reply #2 on: November 02, 2024, 06:27:05 pm »
This is good to know, maybe even foreshadowing for me. I'm planning on moving over to Linux, since I don't want to live on Windows any longer.