ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.21k stars 2.27k forks source link

Game doesn't enter exclusive full-screen with some nvidia cards #6075

Closed reflect-git closed 1 year ago

reflect-git commented 5 years ago

Describe the bug: I feel like there's a slight delay between input and cursor movement. It's so slight I can't tell if it's just me or not, but playing the same map between stable and lazer, I feel like lazer has a tiny bit more lag on the cursor. This is most noticeable for me on jumpy maps where you need to flail the cursor around rapidly in different directions. I haven't tested keypresses, meaning they could or could not have a similar issue.

Settings I use: 1080p (native) Unlimited framerate Raw input (for testing this had to be removed) Compatibility mode on stable

System I'm running on: MSI GE63 laptop 1080p 120fps monitor i7 8750h GTX 1060 (this is a nvidia optimus laptop) Windows 10 1809

I did a small test with my phone (Nokia 8.1) using the slow motion video function to record the screen and a keypad which lights up an led on pressing a key. I think the video was recorded at 120fps, I can't find a setting on the phone to confirm this. The video itself plays back at 30fps. To emulate mouse movement, I used the windows 10 ease of access option to move the mouse with keyboard buttons. To get osu! to move the cursor I had to disable raw input. The test itself could use a more professional recreation, probably even a complete change in methodology, but I don't have the means or skills to do it right now.

Screenshots or videos showing encountered issue: https://www.youtube.com/watch?v=FCuA324P5Ic Pause the video and use the comma and period keys to move frame by frame on youtube. It appears that lazer takes a frame or more longer to react to the button press, but this could just be due to a fault in the testing method.

Possible causes for the test results other than osu!: The sample size is too small, doesn't prove a consistent issue. The video framerate isn't high enough to capture the latency in higher detail. The keypad LED isn't perfectly synced to the button press. (The LED is controlled by programmable on-board firmware, it isn't hard wired) The ease of access setting to move the mouse behaves in a way that doesn't move the mouse immediately when the button is pressed.

osu!lazer version: 2019.910.0

Logs: Screenshot of the graphs while moving the mouse The frame time on stable is 1,7ms, if I'm correct, this means I get about 580fps on stable.

Morilli commented 5 years ago

Have had the very same feel. I believe this to be caused by lazer not using true fullscreen, as I experience a similar delay on stable when I'm playing in borderless there.

peppy commented 5 years ago

Can you confirm it is not running in exclusive full screen? It does for our test machines.

reflect-git commented 5 years ago

I'm not sure what the proper test is, but alt tabbing doesn't minimize the game. Game still renders in the background while another window is up and the tickrates on the graphed elements fall to 60hz. This is with both borderless fullscreen and fullscreen in the options.

peppy commented 5 years ago

If you are on windows 10, you can check whether the windows game bar will display by using win-g. If it does, you are not in exclusive full-screen.

reflect-git commented 5 years ago

I had the game bar disabled, so I enabled it for this test. The game bar overlays onto lazer. On stable, it minimizes the game before showing up.

peppy commented 5 years ago

Thanks for the confirmation. Looks like it's definitely going to be an issue with exclusive fullscreen here.

reflect-git commented 5 years ago

I did some further testing with optimus. Specifically, I used the "run with graphics processor" option when right clicking on the executable. The only time lazer appears to enter exclusive fullscreen is when I run it with integrated graphics (Intel UHD630) and have "fullscreen" selected in the options. When using those settings, the game bar does open, but lazer blinks black for a frame and game bar says it's not supported. When running on integrated graphics and using "borderless", the game bar opens instantly without any flashing form the game window and the game bar doesn't say it isn't supported. When running on the dedicated graphics card (GTX 1060), both "fullscreen" and "borderless" open the game bar without issues, just like with integrated+borderless.

Cherenkov11 commented 4 years ago

I have the same issue, with the compatibility option of "disable fullscreen optimization", only when I execute the game with the integrated graphics card (Intel HD Graphics) goes to exclusive fullscreen, no volume OSD. But, when I execute the game with "High Performance Nvidia" (GT 840M) no exclusive fullscreen, as you can see the volume OSD and app can be upfront of the game. Games like CSGO can go to exclusive fullscreen mode even with Integrated and Dedicated graphics card. So, this must be some problem on the game. BTW, osu!stable presents the same issue. I'm in Windows 10 1909

SchnixXilein commented 4 years ago

I also cant get into exclusive fullscreen. I tried reinsaling and all weird stuff i found (like this). I had this issue for month now but sadly still no fix. I am on Win10 with gtx960. Game bar is disabled but I enabled it to try if i can get into exclusive fullscreen (I cant). Stable version of Osu works fine for me.

mbalsdon commented 3 years ago

Getting this issue as well, adding here for a better sample

Asus ROG Strix GL553VD laptop i7 7700HQ Intel HD Graphics 630 (integrated) / GTX 1050 1080p 60hZ monitor Windows 10 2004

I have this issue on stable if I run the game on my NVIDIA card and don't use compatibility mode. If I use my integrated card, there is no input lag regardless of compatibility mode. Similarly on lazer, my integrated card runs the game with no latency (though it can't handle the load well). When I run lazer on my NVIDIA card I get the input delay described. Disable fullscreen optimizations doesn't do anything, and running the game on compatibility mode (through windows) doesn't do anything either. I guess whatever osu stable's compatibility mode does is different than windows (and fixes it).

peppy commented 3 years ago

compatibility mode runs in directx, offering your drivers a second chance at getting things right.

are you on the latest nvidia drivers?

mbalsdon commented 3 years ago

Yes, GeForce Game Ready Driver version 460.89. If it's worth mentioning, I've had this issue since I first installed lazer ~8 months ago with older lazer versions and drivers.

mangkoran commented 3 years ago

Maybe you have vertical sync turned on in Nvidia Control Panel?

mbalsdon commented 3 years ago

I tried fiddling with the NVIDIA control panel to no avail including VSync as well as various lazer settings.

peppy commented 3 years ago

The issue is not entering exclusive full screen. The only settings that may affect this are your resolution, monitor layout, refresh rate etc.

MavisTail commented 3 years ago

I do get this same issue on both my laptops, I also get on Stable but it's different on stable a little The issue seems to affect laptops with integrated graphics and a gpu, I forgot about the issue long time ago since I disabled optimus on both my laptops, it seems like the issue was with optimus On stable, osu refuses to use nvidia gpu unless i force it in the control panel, but this can lead to other issues. disabling optimus fixes pretty much everything note: i dont get this issue on other games

bdach commented 3 years ago

@BlueskyFR unless you're also using a dual-GPU laptop with optimus i doubt your issue is related to this issue thread and you haven't provided enough detail to even bother looking at a potential cause. this thread is about exclusive full-screen with optimus specifically.

BlueskyFR commented 3 years ago

@BlueskyFR unless you're also using a dual-GPU laptop with optimus i doubt your issue is related to this issue thread and you haven't provided enough detail to even bother looking at a potential cause. this thread is about exclusive full-screen with optimus specifically.

Yes you are right, sorry!

Siliil commented 3 years ago

I have simil;ar problem on laptop, but in osu!stable using the directx solve problem, on Lazer i can't force directx and have input lag. I can mark that Lazer even with input lag work more stable than STABLE. If I use external monitor plugged to nvidia card Lazer work without problems and input-lag and osu!stable too. Does exist some solution to force directx in lazer?

peppy commented 3 years ago

Yes, this is an ongoing effort in the background. It will come in the coming months, hopefully.

progamingguide commented 2 years ago

Just wanted to say this is still an active issue (atleast for me).

kkard2 commented 2 years ago

it has been fixed on my machine; cannot tell when exactly, because i tried lazer many months ago and it could also be because of the fact that i reinstalled my os, but right now with version 2022.509.0 i don't experience any lag (which was quite apparent before)

peppy commented 2 years ago

Would be appreciated if you try on old version you know to have been failing and see if it works correctly now (to understand whether it was something our end or your end that fixed the issue for you).

kkard2 commented 2 years ago

okay, checked 2020.515.0 and i don't feel the lag, also there is a difference between borderless/fullscreen. so, drivers update/reinstalling os fixed the issue or i played borderless when i tested it before

info about my setup: OS: Windows 10 21H2 (19044.1645) GPU: GTX 1050 Ti (driver version: 27.21.14.5671) CPU: i3-8100 @ 3.60GHz

and just to be sure, is running install.exe and playing the game immediately a good way to test this? maybe some dependencies from later versions are not updated that way, but notification displayed which version i was running so i thought it was fine

smoogipoo commented 2 years ago

Please post logs, specifically the runtime.log file.

kkard2 commented 2 years ago

runtime.log this is with newest version, should i post it after i run an older build?

smoogipoo commented 2 years ago

And there's a difference in functionality between fullscreen and borderless? Such as, when alt-tabbing, in fullscreen mode you should get a black screen and it should minimise directly to the desktop.

If fullscreen is indeed exclusive for you, then this is very weird, as Optimus has historically not supported this behaviour. I also can't find a mention of it in that driver's documentation.

Edit: It's fine if you don't post logs from the older build.

kkard2 commented 2 years ago

yeah, in old version fullscreen mode does not switch to desktop when alt-tabbing, but cursor behavior is different than in borderless

in current version fullscreen is forcing desktop on alt-tab

smoogipoo commented 2 years ago

@kkard2 just to make sure, you're testing on a laptop correct?

kkard2 commented 2 years ago

@kkard2 just to make sure, you're testing on a laptop correct?

hmm, i somehow missed that the entire thread is only talking about laptops, i have no idea how... i'm on pc, so my previous lag may be unrelated

mirh commented 1 year ago

I just updated my 950M laptop from 516.59 to 527.56. I don't really have an eye for lag, but PresentMon can reliably tell me that I'm no longer getting Composed: Copy with GPU GDI. It's still not Hardware: Legacy Flip (that I get instead if I disable the dGPU), but AFAIU Hardware: Independent Flip should be virtually as good. Even more specifically, the window has PresentFlags=512 which I believe to equal DXGI_PRESENT_ALLOW_TEARING.

lybxlpsv commented 1 year ago

I just updated my 950M laptop from 516.59 to 527.56. I don't really have an eye for lag, but PresentMon can reliably tell me that I'm no longer getting Composed: Copy with GPU GDI. It's still not Hardware: Legacy Flip (that I get instead if I disable the dGPU), but AFAIU Hardware: Independent Flip should be virtually as good. Even more specifically, the window has PresentFlags=512 which I believe to equal DXGI_PRESENT_ALLOW_TEARING.

image

They've added driver-level DXGI layering few versions ago, probably related? This is probably the best we can get with opengl apps on optimus laptops at the moment.

mirh commented 1 year ago

Yes, that's it, sorry (over the week I quite advanced my understanding of the situation, as you can see at the end of #8165). It's just that since I'm only a filthy casual (and I don't have one of those fancy LDAT) I didn't feel authorized into claiming actual progress.

peppy commented 1 year ago

Please wait for the upcoming renderer change which will make this a non-issue.

Hasster1 commented 1 year ago

Hah. New renderer has come, and it did help with one thing - now you can choose between the old way without an exclusive fullscreen (open gl), or you can choose direct x, which uses flip fullscreen (flip mode, whatever you want to call it), that produces terrible screen tearing on a laptop with 2 GPUs (at least for me).

peppy commented 1 year ago

We're still tracking the tearing issue but it's safe to say the exclusive full screen part was fixed, so let's close this.