34736384 / genshin-fps-unlock

unlocks the 60 fps cap
MIT License
2.8k stars 216 forks source link

Screen freezes with 3.0.3+ with HDR registry edit #369

Open jitunicornfx opened 8 months ago

jitunicornfx commented 8 months ago

Starting with 3.0.3 a problem cropped up with launching the game. After you would click to proceed through the door to load into the world the loading screen would flash white for a split second and then your desktop would be drawn on the screen as if the game window had minimized, which isn't the case as the game still has focus. Mouse still shows active on the screen though. If you alt-tab away and alt-tab back then the game would redraw and display correctly. Which would amount to a minor annoyance but once in the game similar behavior can be triggered by certain actions. Viewing notices or going to the party setup screens would result in the screen displaying some static image such as a loading screen or the background of the party screen. Alt-tabbing out and back in restores functionality, which now makes it a major annoyance.

Now, what seems to trigger this is setting a registry key for enabling HDR: Set-ItemProperty -Path "HKCU:\SOFTWARE\miHoYo\Genshin Impact" -Name WINDOWS_HDR_ON_h3132281285 -Value 1

Whether I use a script to set it or manually set it via regedit does not appear to matter. This error gets triggered nonetheless. With unlockers 3.0.2 and lower it launches fine. Also runs fine when running without the unlocker, so the issue is definitely triggered by the unlocker.

To make matters more difficult I haven't been able to replicate this issue on my spouse's system. The game launches and runs as expected with 3.0.4.

ipisano commented 8 months ago

Pretty sure HDR has nothing to do with it, as I have the same issue on Windows 11 with Auto-HDR (I didn't do the registry edit you mentioned) and I also use to get it on Windows 10 (again, no registry edit). In both cases I use exclusive fullscreen because with borderless I have microstuttering if I have a browser window with hardware decoding on my second monitor. Also possibly unrelated, but I need to minimize the game (by win key or alt tab) after it's loaded into the world or I still get the microstuttering I mentioned.

jitunicornfx commented 8 months ago

Auto-HDR runs fine over here. In my testing it appears to be only tied to when that registry key is set. You did just remind me about fullscreen exclusive mode though. I took a look and that is what I was using. I think it used to be required for the in-game HDR to work. Anyhow, disabling exclusive and switching back to borderless does appear to have resolved this! Though I am curious why the change from 3.0.2 to 3.0.3 just setting the working directory would cause this break.

XaiverTips commented 7 months ago

same problem,seems like there is a conflict between HDR/unlock_fps and nvidia auto-replay. Try to disable NV auto-replay to solve it. Same problem occured when I play other games with native HDR. I can solve it easily by restarting the game but it's not work on Genshin. xd

Foul-Tarnished commented 5 months ago

Only way to get a proper HDR is with SpecialK You can also get nvidia reflex and a better framelimiter

but it's code injection, so you're at risk even though 99% of anti-cheat don't even detect it

Elon61 commented 5 months ago

Only way to get a proper HDR is with SpecialK You can also get nvidia reflex and a better framelimiter

but it's code injection, so you're at risk even though 99% of anti-cheat don't even detect it

The HDR registry edit worked a lot better for me than SK in this case.

jitunicornfx commented 5 months ago

I can confirm in this case that borderless does resolve the issue and allows the HDR registry edit to work. Borderless is fine for me, no need for exclusive.