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

Cursor ocassionally stops (input thread stutter) #27227

Open
YesLifer opened this issue Feb 18, 2024 · 34 comments
Open

Cursor ocassionally stops (input thread stutter) #27227

YesLifer opened this issue Feb 18, 2024 · 34 comments
Labels
osu!framework issue Can't resolve this without changes to osu!framework. type:input

Comments

@YesLifer
Copy link

Type

Game behaviour

Bug description

After updating lazer I've discovered a really annoying thing: when playing STD (may also happen in Song Select menu) cursor ocassionaly stops while dragging tablet pen and after some time just "teleports" to the point where the pen is currently located. It happens anytime during gameplay and it is especially irritating when it happens at the end of a song.

Screenshots or videos

issue.mp4

Version

2024.131.0

Logs

compressed-logs.zip

@longnguyen2004
Copy link

Tracked at ppy/osu-framework#6181

@frenzibyte frenzibyte added osu!framework issue Can't resolve this without changes to osu!framework. type:input platform/windows and removed platform/windows labels Feb 18, 2024
@frenzibyte
Copy link
Member

frenzibyte commented Feb 18, 2024

Keeping this issue open and pinning to give visibility for anyone else coming to report it, since it's been reported over 5 times in the span of few days.

@frenzibyte frenzibyte pinned this issue Feb 18, 2024
@peppy
Copy link
Member

peppy commented Feb 19, 2024

Does turning off "high precision input mouse" with this?

2024-02-19 11 12 26@2x

@YesLifer
Copy link
Author

Tried both turning off and on this option, but the problem still shows up

@BenCheung0422
Copy link

For my experience, I have a kind of 2 types of input lags: sudden stop and delayed movements, and luckily I am able to record them. For the type with sudden slow cursor movements, I have experienced for periods vary from a few hundreds of milliseconds to a few seconds. And sometimes coming with rendering lags, but it seems like it would be another problem.

  • Sudden stop (blue circles "1" to "2"):
2024-03-11.22-26-13.out.mp4
  • Sudden delayed movements (near the end of this play, and apparent drop in input FPS is recorded):
2024-03-11.23-00-00.out.mp4

From #9283 (the case with rendering lag), it is mentioned that it might be GC-related, but for my recordings, no apparent relationships to GC can be found. In the mean time, I will still try to collect more information related to the lags and delays as useful as possible.

@peppy peppy changed the title Cursor ocassionally stops Cursor ocassionally stops (input thread stutter) Mar 12, 2024
@BenCheung0422
Copy link

BenCheung0422 commented Mar 12, 2024

This time. I have tracked on the logs and probably found that it might be related to the slow frames on the threads.

2024-03-13.00-51-08.out.mp4

Here, I used 2880x1620 DSR for my 1920x1080 monitor, and 8 font size instead of 12 (default) for the terminals.

logs-1710256102.zip

@peppy
Copy link
Member

peppy commented Mar 12, 2024

Having the stats open probably does that, and is probably not related.

Also having windows displayed above the game, and potentially the game not focused, will not help.

ALso it's not running in fullscreen mode since windows are being displayed.

@BenCheung0422 Please open a separate discussion for your issue (or better yet, self-troubleshoot), it's not the same issue as what is being tracked here.

@BenCheung0422
Copy link

BenCheung0422 commented Mar 12, 2024

I am not sure if stats affect that. Also, in the video clip, I used OBS so that the console windows on the back can be rendered in front of the game window. Yesterday, I just captured the moments with cursor movement pauses. I will try to record with stats opened and see if I can capture the moments with slow movements. It is like there is frame loss in input threads in this case. I will open a new discussion (or issue) for this.

@yomikomanda
Copy link

I had this problem too and switching from Multi threaded rendering to Single threded fixed it for me

@iwa
Copy link

iwa commented Jun 5, 2024

i had a few input stutters in the last 2-3 weeks, and recorded one tonight

here's the clip:
https://github.com/ppy/osu/assets/19956672/a9b5bb30-3953-48df-b4ec-1eefaccdab6d
edit: seems we can't really see the input lag on the clip as the clip itself stuttered too

the logs:
compressed-logs.zip

specs (dunno if you have them in the logs but in case):

  • ryzen 7 7700x, rx 7800 xt, 32gb ddr5 ram
  • wacom ctl-472, using external opentabletdriver
  • in-game tablet support disabled, high precision mouse disabled (always had issue with this setting on when using my tablet)
  • directX 11 experimental (my fps are more stable with it than normal directX 11)

if you need further details don't hesitate to @ me

edit 2: happened again, also have clip + logs if needed

@BenCheung0422
Copy link

@iwa I think they are still working on it to fix this issue.

@iwa
Copy link

iwa commented Jun 5, 2024

@iwa I think they are still working on it to fix this issue.

ikik but as it seems to be kind of an awkward issue, the more logs / cases they can analyze, the merrier i guess?

@Packsolite
Copy link

What i find interesting with this issue is that i'm playing lazer for years but it only started occuring around feburary this year.
Also you can easily recreate this by stressing your cpu using prime95.

@bdach
Copy link
Collaborator

bdach commented Jun 10, 2024

Also you can easily recreate this by stressing your cpu using prime95.

That sounds like conflating two issues with different causes unless prime95 is doing windows input hooks for whatever reason which I find unlikely.

@Packsolite
Copy link

Packsolite commented Jun 10, 2024

Also you can easily recreate this by stressing your cpu using prime95.

That sounds like conflating two issues with different causes unless prime95 is doing windows input hooks for whatever reason which I find unlikely.

Not sure, could be some weird windows services, update or whatever program in the background causing this.
Stable/old client doesn't suffer from this issues when running stress tests (except a few dropped frames, but not like 1 sec input freezes).

Edit:
I obviously won't get nearly the same performance when running prime95 in the background - no shit. The problem is the inconsistency, why do i get 200+ fps and a smooth gameplay for the first 30 seconds and then a random 500ms or so long input freeze when there is a little stress on the cpu? I'm in no way familiar with the osu framework so it's just guessing but it might be worth investigating.
Of couse this doesn't rule out there being a sescond/different issue that is unrealted to this "seemingly-poor-scheduling" issue.

@BenCheung0422
Copy link

BenCheung0422 commented Jun 11, 2024

In my opinion, I would think this might not be really related. In my observation, there are mainly 4 types of threads: input, audio, update, draw. Certainly, draw (rendering) would be mainly handled by GPU threads alone, either single or multi-thread, and both input, audio and update handled mainly by CPU process. Lagging in threads absolutely can have several causes, including but not limited to: background services, process bottlenecks, library/API (including Windows API) incompatibility, driver incompatibility, driver or service errors, incompatible BIOS configurations, etc. In my case, there is only a hanging in input thread is the cause of input lagging, as what handled by the coming changes.

It seems like their believe is the issue related to some incompatibilities of Windows API input handling. Also, certainly, stressing CPU can cause all the threads (and processes) lagging as mostly they are handled by CPU, doubtlessly, so it might not be really related.

@iwa
Copy link

iwa commented Jun 16, 2024

something is definitely wrong on the rendering side

I was having the freeze issue with Valorant so I disabled GPU Scheduling (windows 11), and my issue worsen drastically, to the point where my tablet would sometimes freeze and dont respond at all unless I restarted opentabletdriver
it never happened with stable, and nothing changed expect the GPU scheduling setting
I then tried @yomikomanda 's suggestion to set render mode to single thread and it fixed everything (played all day and no stutter nor tablet freeze)

I can retrieve clips & logs if needed

@bdach
Copy link
Collaborator

bdach commented Jun 17, 2024

@iwa unless you can produce a video with frame graph showing (ctrl-f11) any speculation that this issue has anything "to do with the rendering side" is unsubstantiated. i don't even know if you're trying to report the same issue which the OP is.

@iwa
Copy link

iwa commented Jun 17, 2024

@iwa unless you can produce a video with frame graph showing (ctrl-f11) any speculation that this issue has anything "to do with the rendering side" is unsubstantiated. i don't even know if you're trying to report the same issue which the OP is.

fair enough, I should be able to provide a video proof sometime during this week
should i enable/grab something else during my testing besides frame graph + logs?

@BenCheung0422
Copy link

BenCheung0422 commented Jun 17, 2024

For your information, this case we would have this kind of situation or otherwise it should be another issue. Here, you can see that in the graph (by clicking twice CTRL-F11), you can see there are tall lines in ticking thread graph but not any observable and obvious tall lines in rendering thread graph. If you case is different (like rendering lags), that should be another issue.

312904247-40662e8a-6eba-42be-8e60-49a2eedcedf6 - frame at 0m7s

EDIT:
This can occur regardless of rendering mode (either single or multi-thread) setting. Also, I cannot see any related logs regarding this (unless there is something detailed debugging logging settings).

@iwa
Copy link

iwa commented Jun 17, 2024

alright, thanks for your clarifications

after reviewing the original clip i posted, i can understand that y'all feel like it's a different issue (clip is cutting during the stutter for whatever reasons), but i'm pretty confident that i get stutter like OP does, or at least it feels the same
I'll change my recording method to be sure we can visualize the issue + include frame graph

the only thing that makes me think it's rendering-related is that, strangely enough, input stutters totally stopped when i switched to Single thread rendering mode, but without any proofs my thinking is pointless, so i'll work on that

edit: after re-reviewing my original clip but at 0.25x, seems like i'm wrong & we can clearly see the input stutter happening, but still no frame graph so still pointless

edit 2 on 24/06: im not dead lol, still doing testings but i havent been able to replicate the issue since switching to single threaded rendering. even though i've set back to multi threaded for testings, no issues so far. strange.

@LWapsyTN
Copy link

LWapsyTN commented Jun 22, 2024

i might have an idea what is causing this.
if you have a gamepad or controller connected disconnect it, if you also have any input mapping software such as rewasd or xoutput stop it, for some reason they cause this, i think it is part of the input mapping process, but if you have any of these running and experience this issue, stop them, even steam input, it might cause the same issue.
this might not actually be the real reason, but it is worth a try, it might work for you same as it did to me.

@BenCheung0422
Copy link

BenCheung0422 commented Jun 22, 2024

I have none of these software running, but seemingly it would interact with windows input and could cause delays in osu input handling, as osu at the moment is not handling with really raw input signals/events.

Edit: By the way, why would people use input mapping apps when playing osu? Though I am not sure if tablet pen driver affects.

@iwa
Copy link

iwa commented Jun 24, 2024

i have never used this kind of software, always disabled steam input, and using a controller only when playing RL, controller is disconnected otherwise

i don't fully exclude steam hypothesis tho, will try to test with steam opened and steam input enabled

i was thinking about it but couldn't it be a regression with old lazer installations? something that maybe would "magically" get fixed in the local config by updating the single/multi threaded setting?
some of my friends installed lazer a month ago, fresh installs, some are playing with a tablet with external opentabletdriver, and they never had any kind. i've been running the same lazer install since 2018/2019, could maybe be related?
(100% speculation here, idk how lazer works internally, trying to figure out as much ideas as i can)

@ni5arga
Copy link

ni5arga commented Jul 2, 2024

Had the same issue, tried switching from multi thread rendering to single thread rendering and it seems to be fine now.

@iwa
Copy link

iwa commented Jul 2, 2024

@ni5arga if you switch back to multi threaded, does the issue reappears for you by any chance?

@BenCheung0422
Copy link

BenCheung0422 commented Jul 2, 2024

It does not help anything for my case. Logically, rendering is tacked by renderer (either GPU or CPU), but input is tacked by CPU, so there seems to be no obvious intersection between them. However, changing max FPS value may change something, but the input thread would still be 1000Hz (for me).

Edit: Actually, different computer configuration may give different results.

@BraianAzcune
Copy link

BraianAzcune commented Aug 23, 2024

In the past two months, I've been experiencing an issue where the mouse suddenly freezes during gameplay. This problem hasn't occurred while using the tablet. I've tried all the available graphics engines—DirectX, OpenGL, Vulkan—but the issue persists regardless of the engine. I also tested with and without the high-precision mouse option enabled, disconnected my tablet to rule out interference, and even tried using a different mouse, but the problem continues.

I'm sharing two videos that demonstrate the issue:

The first one is more subtle:
Subtle freeze

However, in the second one, it's quite obvious:
Significant freeze

I should also mention that I haven't noticed any FPS drops or increases in ms during these occurrences.

If there is any additional information or specific tests you'd like me to run, please let me know. I'm happy to provide more details or assist in any way that could help diagnose and fix this issue.

@Trung0246
Copy link

Trung0246 commented Aug 23, 2024

For me this can be easily replicated if you switch between full screen and windowed mode on windows 11 multiple times, the cursor lag will getting more noticeable (especially with high precision mouse on).

The easy fix is just quit the game and reopen it.

@MEMORIEmusic
Copy link

Also facing this issue - on macOS. Have been for a long time.

@BenCheung0422
Copy link

The poor performance on windowed mode would be expected as it is not as optimized as full screen mode. This includes rendering and also other window-related events (as well as input events). However the situation should be optimized, especially on full screen mode.

@AlejandroSuero
Copy link

@MEMORIEmusic I have the same issue since I started playing on macOS. I have a video (recorded a replay with OBS, to not affect performance) in this discussion #29782.

Tried with playing borderless, fullscreen and windowed, all to the same effect.

@AlejandroSuero
Copy link

I was playing a bit now while warming up and got 2 replays in the same map recorded from when it happens, different places and different amounts of times it happens:

First try (happened once):

video
2024-09-10.16-48-24.mp4

Second try (happened twice:

videos
2024-09-10.16-45-28.mp4
2024-09-10.16-46-16.mp4

compressed-logs.zip

@Apple2007
Copy link

I have also been facing this issue on the macOS version. It happens practically, and it usually kills my SS runs. I have tried everything suggested in the thread, and nothing has worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osu!framework issue Can't resolve this without changes to osu!framework. type:input
Projects
None yet
Development

No branches or pull requests