emoose / DLSSTweaks

Tweak DLL for NVIDIA DLSS, force DLAA on DLSS-supported titles, tweak scaling ratios & DLSS 3.1 presets, override DLSS versions without overwriting game files.
MIT License
1.24k stars 21 forks source link

Hogwarts legacy gets stuck at starting warning message #33

Open jpgsantos opened 1 year ago

jpgsantos commented 1 year ago

Hogwarts legacy gets stuck at starting warning message or crashes on start with some of the builds of DLSSTeaks, particularly builds after DLSSTweaks 0.123.10.

DLSSTweaks versions tested:

0.123.8 ✅

0.123.9beta4 ✅

0.123.10beta2 ❌ stuck on warning screen 0.123.10beta4 ❌ stuck on warning screen

0.123.11 ❌ stuck on warning screen

0.123.12beta3 ❌ stuck on warning screen 0.123.12beta3a ✅ 0.123.12beta4 ❌ crash on start 0.123.12beta4a ❌ crash on start 0.123.12beta4b ❌ stuck on warning screen 0.123.12beta5 ❌ stuck on warning screen

It as been reported by some people that this bug is randomly sidesteped by trying to start the game multiple times. I have not experienced this, the versions that don't work are consisted in their behaviour.

I am not using anuy other software appart from DLSSTweaks.

DLSS version 3.1.1 (v1) from tech power up Computer specs and relevant software versions: GPU: Nvidia 2070 Super Driver 528.49 CPU: intel 10980XE Windows 11 Version 22H2 Build 22621.1265 DLSS version 3.1.1 (v1) from tech power up

Previous discussion on this problem on these threads:

28 #22

emoose commented 1 year ago

Many thanks for the testing, shame that beta5 didn't work, had hopes up for that...

Started a small refactor in dllmain-hook branch, that makes it so instead of our DLL applying all the hooks, our DLL only makes a single hook into the DLSS DLL, and from that the hooked DLL itself handles hooking its own functions.

Should improve things if the game might be loading DLSS -> unloading DLSS -> loading DLSS again, etc, since we don't have to try tracking the DLL across all that.

Build is at dlsstweaks-0.123.12beta5a.zip

That adds a little more debug logging as well, if you try it could you post the INI + log here too?

jpgsantos commented 1 year ago

Still same behaviour it gets stuck at the starting warning message

INI text

[DLSS]
ForceDLAA = false

OverrideAutoExposure = 0

OverrideAppId = false

OverrideDlssHud = 1

DisableDevWatermark = false

WatchIniUpdates = false

[DLSSQualityLevels]
Enable = true
UltraPerformance = 0.33333334
Performance = 0.5
Balanced = 0.58
Quality = 0.66666667
UltraQuality = 0.77

[DLSSPresets]
DLAA = F
Quality = F
Balanced = F
Performance = F
UltraPerformance = F

Log text:

[2023-02-27 20:54:07.202] [info] DLSSTweaks v0.123.12, by emoose: DLL wrapper loaded, watching for DLSS library load.
[2023-02-27 20:54:07.203] [info] Game path: D:\Pedro\steamapps\common\Hogwarts Legacy\Phoenix\Binaries\Win64\HogwartsLegacy.exe
[2023-02-27 20:54:07.203] [info] DLL path: D:\Pedro\steamapps\common\Hogwarts Legacy\Phoenix\Binaries\Win64\dxgi.dll
[2023-02-27 20:54:07.203] [info] Config path: D:\Pedro\steamapps\common\Hogwarts Legacy\Phoenix\Binaries\Win64\dlsstweaks.ini
[2023-02-27 20:54:07.203] [info] ---
[2023-02-27 20:54:07.203] [debug] LdrRegisterDllNotification callback set
[2023-02-27 20:54:15.740] [info] nvngx: applied export hooks, waiting for game to call them...
[2023-02-27 20:54:16.367] [debug] nvngx_dlss: applied hud hook via registry
[2023-02-27 20:54:16.841] [info] DLSS functions found & parameter hooks applied!
[2023-02-27 20:54:16.841] [info] Settings:
[2023-02-27 20:54:16.841] [info]  - ForceDLAA: false
[2023-02-27 20:54:16.841] [info]  - OverrideAutoExposure: default
[2023-02-27 20:54:16.841] [info]  - OverrideAppId: false
sam3000 commented 1 year ago

FWIW - your ini config with 0.123.11, rtx 4090, same nvidia driver, ryzen 5800X, dlss 3.1.1 v2 (also from techpowerup): no hangs with multiple attempts.

emoose commented 1 year ago

@jpgsantos wonder if the UltraQuality setting might be causing some problem, could you try removing that from the INI and see if it makes any difference?

Maybe try running game without DLSSTweaks and make sure DLSS is set to one of the other options too.

Sinkingsun commented 1 year ago

Tested Beta5a with Hogwarts Legacy, same as before. Sometimes it boots, sometimes it doesn't. So, the issue remains. Thank you for continuing to try to resolve the issue, we appreciate it.

jpgsantos commented 1 year ago

I have tried without the UltraQuality and the results are the same. I have also tried with OverrideAppId set to true and same problem. I am available for further testing. BTW in cyberpunk everything seems to work just fine, this seems a Hogwarts legacy specific problem on my computer.

jpgsantos commented 1 year ago

It seems that the latest nvidia driver as solved my problems, with driver 531.18 hogwarts legacy seems to start properly.

But unfurtunatly not everything is ok yet, the DLSSQualityLevels seem to behave strangely for low values below 0.5, either by not appearing in the in game selector or by making so the game cannot start properly (hang at the warning message).

Any value between 0.5 and 0.3333334 seems to default in game to 0.5, values bertween 0.3333334 and 0.3 default to 0.3333334 and lower values seem to cause the game to hang on start.

Anyway the behaviour is much better now and the problem seems to have been caused by something exterior to your software.

emoose commented 1 year ago

Glad to hear it's working better now, still wonder what might have been the cause tho.. but hopefully it won't come up again.

Odd issue with the custom QualityLevels, not really sure why it'd act like that, afaik most UE4 games are all sharing the same NV-provided UE4 plugin too, so if other UE4 titles worked fine with custom qualities this should have too really... will have to try getting a copy of the game to test against soon.

Sinkingsun commented 1 year ago

### EDIT:

Scratch all of the below, I got lucky and the game ran fine 3 times in a row. But it was just luck, it still needs multiple boots to run.

I was facing the same issue as before, takes a few runs for the game to run. But looked at @jpgsantos ini tweaks and started tweaking my ini file to narrow down what was causing the issue and I believe I found it... it's changing:

OverrideAppId from true to false that fixed the issue. Now the game runs on every boot. This is the opposite of a week ago, where without this set to true, the custom quality percentages were not working. Now everything is working fine with Hogwarts Legacy, just have to set this to false. Including Ultra Quality is working fine, this is my current ini tweaks:

[DLSS]
ForceDLAA = false
OverrideAutoExposure = 1
OverrideAppId = false
OverrideDlssHud = -1
DisableDevWatermark = true
WatchIniUpdates = true

[DLSSQualityLevels]
Enable = true
UltraPerformance = 0.5
Performance = 0.6
Balanced = 0.66666667
Quality = 0.75
UltraQuality = 0.90

[DLSSPresets]
DLAA = F
UltraQuality = F
Quality = F
Balanced = F
Performance = F
UltraPerformance = F

Also @emoose where do I find your latest beta updates? It keeps jumping from one comment section to another haha, is there a folder that's available with the latest betas in it always?

rpcarvalheira commented 1 year ago

https://github.com/emoose/DLSSTweaks/issues/35 seems the same issue, I'll use it as reference, is it okay?

Obihoernchen commented 1 year ago

I can confirm that 0.123.12beta3a works 100% for me.

Every other version (releases and some betas I tested) since 0.123.10 are stuck on warning screen most of the time (only every 3rd-4th restart works). I didn't test earlier versions though. 0.123.12beta5a doesn't work either.

Sinkingsun commented 1 year ago

I can confirm that 0.123.12beta3a works 100% for me.

Every other version (releases and some betas I tested) since 0.123.10 are stuck on warning screen most of the time (only every 3rd-4th restart works). I didn't test earlier versions though. 0.123.12beta5a doesn't work either.

@emoose I can also confirm, the same as above. That 0.123.12beta3a works every single time with Hogwarts Legacy. Ran it 9 times in a row, restarted and tested a few other times. Every time it works on first boot.

rpcarvalheira commented 1 year ago

Yeah, saying the same in #35 and probably is the same related of #28 There is a chance that fixing stuff in #28 will fix #33 and #35

emoose commented 1 year ago

0.200.0alpha release:

Found an easier way to get DLSSTweaks loaded into the game, now it can wrap the nvngx.dll module directly, rather than needing to wrap a system DLL + watch for nvngx.dll to be loaded in etc.

This method also uses far less hooks now (really only 1, for us to hook nvngx_dlss & apply OverrideDlssHud stuff), since those hooks seemed to be causing the hangs some people had I'm hoping it'll be an improvement.

For this to work a .reg file has to be applied first though, this is the same .reg used by CyberFSR2, just stops the DLSS code from checking signature on nvngx.dll.

0.200.0alpha download: dlsstweaks-0.200alpha.zip (includes reg file etc)

To set it up just make sure to apply the EnableSignatureOverride.reg, then copy nvngx.dll & dlsstweaks.ini next to your game EXE. Not really sure how this will work with UE4 games that keep nvngx_dlss.dll in a different folder, the nvngx.dll might also need to be kept next to nvngx_dlss.dll instead of the game EXE there (INI should work fine in either location)

Hoping this will have the same/better game compatibility than the older versions, would appreciate any results from anyone that tries it out.

(I did want to try and keep the older dxgi/winmm/etc wrapper code included too, so people that didn't have issues with those could just keep using them and not need any .reg, had something working for that but the code to get both methods working together was pretty messy, and I'd guess having a bunch of methods could confuse some people too, so decided to remove the older stuff - could probably bring it back in future if this nvngx.dll method shows any issues with certain titles though)

Sinkingsun commented 1 year ago

The only question I have is if that registry tweak might cause ANY issues now or in the future with games that use anti-cheat? Especially low level (kernel level) anti-cheat.

emoose commented 1 year ago

The only question I have is if that registry tweak might cause ANY issues now or in the future with games that use anti-cheat? Especially low level (kernel level) anti-cheat.

I was wondering that myself too, haven't seen any reports on CyberFSR2's repo about games having issues with that tweak in place at least (other than anticheats refusing to launch if the modded nvngx.dll is present, which is to be expected)

The registry key being changed there seems to be specific to NV, seems the DLSS SDK-code that's included into games checks that, AFAIK that's only provided as a library file without source code, so isn't likely any game devs are tapping into those checks at least.

Almost every anticheat has their own methods to sign the game files/check for unknown modules too, probably wouldn't want to rely on NV's sig check for anything when their own stuff would be able to catch it fine.

If some weird anticheat does detect it I wouldn't really expect a ban for it, seeing as registry changes and unknown modules being loaded could be caused by all kinds of things (eg corrupt registry, anti-virus loading into each process...), most likely it would just prevent launch / kick you out once you go online, like when EAC detects the current DLSSTweaks release.

Can't really guarantee anything though, if you want to be 100% safe you can remove the registry changes with the DisableSignatureOverride.reg script before going online.

(needing to keep enabling/disabling it each time isn't really that convenient though, so maybe will look into re-adding the older wrappers back here too)

emoose commented 1 year ago

0.200.2alpha download: dlsstweaks-0.200.2alpha.zip

This brings back the dxgi/winmm/etc wrappers, and improves the code that lets the dxgi & nvngx wrappers work together.

If anyone here had hanging issues with any of the older test builds please give this a try!

Install guide from INI:

DLSSTweaks now offers two ways of loading itself in, to help with systems that had issues with the older method:

  • Naming the DLSSTweaks DLL as "nvngx.dll" will wrap the nvngx.dll DLSS module, usually has the best chance of working since it requires less code hooks to be installed. However, this method needs a registry change to be applied first to stop DLSS from checking the nvngx.dll signature. Reg file for that can be found at https://github.com/emoose/DLSSTweaks/blob/master/EnableSignatureOverride.reg, just download it and double-click -> Run -> Yes to all prompts.

  • Alternatively, a legacy method can be used by naming the DLSSTweaks DLL as one of the following names (different games may require certain filenames to load in properly, and some games may have issues with this method altogether, the nvngx.dll method above is recommended) = XInput1_3.dll = XInput1_4.dll = XInput9_1_0.dll = XAPOFX1_5.dll = X3DAudio1_7.dll = dxgi.dll = winmm.dll

If you find a DLSS-supported game that doesn't work with either of these methods please let me know!

Obihoernchen commented 1 year ago

0.200.2alpha with nvngx.dll works very well for me. Tested 7 times, 100% success.

Sinkingsun commented 1 year ago

Tested over multiple runs of Hogwarts Legacy, without the registry tweak, and it is also working fine for me with every run.

DespisEGaming commented 1 year ago

Using the latest 3.1.1 V2 DLSS DLL dropped into the DLSS plugins folder of Hogwarts Legacy along with the DLSSTweaks 0.123.10 config and DLSS wrapper next to the root folder .exe for the game seems to be working fine for myself. The only issue I've seen is when trying to force DLAA through the config argument or when creating a new custom preset with scaling set to 1. The preset can be selected, but once selected everything except the UI / Mouse on screen will freeze until switching back to one of the preloaded Nvidia DLSS presets which will work as they should even if modified in DLSSTweaks as long as the scaling isn't forced to 1.

Sinkingsun commented 1 year ago

Only one issue I see remaining @emoose when changing the Ratios/Multipliers for each Quality Level under [DLSSQualityLevels], they all work except UltraPerformance, it will always show as the default in game, regardless of what it is set to in the DLSSTweaks.ini