Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Hogwarts Legacy (990080)

Open kzdixon opened this issue 2 years ago • 286 comments

Compatibility Report

  • Name of the game with compatibility issues: Hogwarts Legacy
  • Steam AppID of the game: 990080

System Information

  • GPU: RX 7900 XTX
  • Driver/LLVM version: Mesa 22.3.4; LLVM 15.0.7 (also tested latest mesa 23.1-devel)
  • Kernel version: 6.1.10-zen1
  • Link to full system information report as Gist: https://gist.github.com/kzdixon/939144ca6c2c3a1928b90c38b0f05b59
  • Proton version: Experimental (Bleeding Edge), GE-Proton7-49

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

Proton Log (had to compress, took a bit to get it to crash but the incorrect shaders on close NPCs was consistently appearing the entire time): steam-990080.log.zip

Symptoms

  • Very often, characters will load in their shaders for clothes, etc., and when getting closer to the player will have them unload and become completely black. This typically persists forever unless a scene reloads, but there is another issue with loading scenes after seeing this occur...
  • Loading scenes (especially so after seeing the black shaders) seems to oftentimes lead to a complete crash of the game. This means loading for a quest, fast travel, or going to the main menu to try and reload a save.
Reference Pictures:

2023-02-07-17:54:53-screenshot 2023-02-07-19:00:29-screenshot 2023-02-07-19:00:36-screenshot

Reproduction

Simply playing the game on a RX 7900 XTX with Proton using the latest stable driver release seems to result in this issue pretty regularly.

kzdixon avatar Feb 08 '23 00:02 kzdixon

Can't say I can reproduce the missing/black materials on my RX 570, though performance of the game does seem a bit rough. Long pauses/loading between pausing and unpausing the game. Game seems to want a lot of RAM and running without a swapfile is unadvised if you have only 16GB to work with. Used Proton 7.0-6.

rabidcopy avatar Feb 08 '23 01:02 rabidcopy

Looks like RADV_DEBUG=nodcc,nohiz seems to be fixing the LOD/Shading issue so it might be another RDNA3 specific LOD issue like with Hi-Fi Rush... Will add it to my report on the mesa side. Note: This doesn't fix the crashing when sometimes teleporting via fast travel.

kzdixon avatar Feb 08 '23 02:02 kzdixon

Using Proton Experimental

System: Arch (Kernel 6.1.9-arch1-2) CPU: AMD Ryzen 7 3700X GPU: AMD Radeon RX 6750 XT DRIVER: Mesa 22.3.4 RAM: 16 GB

Looks and runs really well at Ultra Settings in 1440p+FSR2 Quality. The only issues I encountered are:

  1. After around 2 to 3 hours of playing, the game will freeze and crash (memory leak?);
  2. If you set the launch options RADV_PERFTEST=rt and VKD3D_CONFIG=dxr11 it freezes the game during the first load screen.

KawaiiDinosaur avatar Feb 08 '23 03:02 KawaiiDinosaur

With an RX 6700 I do not have shaders issue. But yes, sometimes with scene loading or fast travel I have an instant crash. Restarting the game allows me to play past that loading screen but it will eventually crash a few scenes later.

Aztorius avatar Feb 08 '23 05:02 Aztorius

Played for a few hours, now the game won't launch at all and I am presented with an error box with a link to the following page: https://support.codefusion.technology/pp_inaa2nm/?e=88500006&l=english which I guess is probably broken DRM or something

AnthonyLTeal avatar Feb 08 '23 06:02 AnthonyLTeal

I can confirm the crashes on my 1060 6gb, though no shader issues.

Looks to me like a memory leak...

  • before it crashes (and the crashes occurred to me only while on the loading screens between scenes, though not every time), the quest scenes get very laggy.
  • Starting the game after the crash the same scene gets repeated because the last save was before the scene, but then the frame rate is fine.
  • Then it goes through the same loading screen that crashed before and passes it without crashes
  • after a few scenes the same thing repeats, starting with the lag/very low framerate on a different scene

TsPG128 avatar Feb 08 '23 06:02 TsPG128

I'm having issues where the game will crash during a loading screen on my 6700 XT.

Baysul avatar Feb 08 '23 08:02 Baysul

* before it crashes (and the crashes occurred to me only while on the loading screens between scenes, though not every time), the quest scenes get very laggy.

* Starting the game after the crash the same scene gets repeated because the last save was before the scene, but then the frame rate is fine.

* Then it goes through the same loading screen that crashed before and passes it without crashes

Same crash here, Proton Experimental (bleeding-edge) and Proton-GE 49. I get this in stderr when it crashes:

Win64\HogwartsLegacy.exe: ../src-wine/dlls/ntdll/unix/virtual.c:1481: create_view: Assertion `!((UINT_PTR)base & page_mask)' failed.

PedroHLC avatar Feb 08 '23 11:02 PedroHLC

I can confirm that game crashes a lot during fast travel/loading screens on my both PC. One with RX 5600 XT and second with RX 6600 XT.

nadrolinux avatar Feb 08 '23 13:02 nadrolinux

For me the game stays on the "Warning" screen indefinitely. And I suddenly discovered that my game runs fine when I did not focus the window at the game. (That means I have the game running in background, and it shows up just fine as I am typing this. Once I switched back, making it full screen, the game freezes again.

sorat0mo avatar Feb 08 '23 13:02 sorat0mo

Hello. Could any of you people with the crash issue try something to see if it helps? In /proc/sys/vm/max_map_count up the default value to something like 1000000 and then try to play the game again.

To make it permanent across reboots you'll instead have to add vm.max_map_count = 1000000 to /etc/sysctl.conf This change should kick in after a reboot or if you run sudo sysctl -p

You can read a short description of what it does here https://sysctl-explorer.net/vm/max_map_count/

Steam Deck already ship with a much higher value than default which might be why i haven't seen any report of this on Deck.

Edit: On newer versions of systemd a conf file might need to be created in a different location. See https://github.com/ValveSoftware/Proton/issues/6510#issuecomment-1422921442

Blisto91 avatar Feb 08 '23 14:02 Blisto91

systctl -> sysctl?

kisak-valve avatar Feb 08 '23 15:02 kisak-valve

Whoops. thanks for the spot

Blisto91 avatar Feb 08 '23 15:02 Blisto91

@Blisto91 thanks for the idea, i am trying it out now, changed it in proc, will keep you updated

TsPG128 avatar Feb 08 '23 15:02 TsPG128

I was able to play the game 1 time, but trying to launch it again leads to it crashing. The logs are quite strange... Proton Logs Here: https://filebin.net/96b7nxeu1hld0spc

The game seems to enter some kind of loop where it keeps printing:

01ec:warn:d3d12_pipeline_library_load_pipeline: Pipeline "2B1C3EF2891BAC37" does not exist.

then I think it tries to create a new pipline, then it complains that pipeline doesn't exist until it hits:

eventfd: Too many open files
x11drv: Can't allocate handle for display fd
365.751:0118:0210:warn:seh:OutputDebugStringA "Shutdown handler: cleanup.\n"

Hello. Could any of you people with the crash issue try something to see if it helps? In /proc/sys/vm/max_map_count up the default value to something like 1000000 and then try to play the game again.

To make it permanent across reboots you'll instead have to add vm.max_map_count = 1000000 to /etc/systctl.conf This change should kick in after a reboot or if you run sudo systctl -p

You can read a short description of what it does here https://sysctl-explorer.net/vm/max_map_count/

Steam Deck already ship with a much higher value than default which might be why i haven't seen any report of this on Deck

I did try this even though I didn't think it would help with my issue and yeah it didn't help.

Any ideas?

michael-hardeman avatar Feb 08 '23 15:02 michael-hardeman

@MichaelAllenHardeman I have been told that might be an esync "issue" (maybe not a issue with esync itself per say, but can trigger it when a low fd limit is set). You could try launching with PROTON_NO_ESYNC=1 %command% and see if that helps? CPU performance might decrease tho. People with kernel 5.16+ use fsync by default instead.

Blisto91 avatar Feb 08 '23 15:02 Blisto91

@Blisto91 game has successfully launched three times in a row with that option. Thanks :+1:

michael-hardeman avatar Feb 08 '23 15:02 michael-hardeman

@Blisto91 I think the map count did the trick for the loading screen crashes. I've been able to fast travel to 6 different locations and it still hasn't crashed. My best before the change was 2. My max_map_count was only 65530 before the change

t-jonesy avatar Feb 08 '23 15:02 t-jonesy

Hello @MichaelAllenHardeman, please verify that ulimit -Hn gives you a high value and not 4096.

kisak-valve avatar Feb 08 '23 15:02 kisak-valve

Hello. Could any of you people with the crash issue try something to see if it helps? In /proc/sys/vm/max_map_count up the default value to something like 1000000 and then try to play the game again.

To make it permanent across reboots you'll instead have to add vm.max_map_count = 1000000 to /etc/sysctl.conf This change should kick in after a reboot or if you run sudo sysctl -p

You can read a short description of what it does here https://sysctl-explorer.net/vm/max_map_count/

Steam Deck already ship with a much higher value than default which might be why i haven't seen any report of this on Deck

On newer versions of systemd you need to create a .conf file inside /etc/sysctl.d/. I created file named 99-max_map_count.conf with the parameter vm.max_map_count=1048576.

On the next boot, you can check the value of 1048576 with cat /proc/sys/vm/max_map_count.

KawaiiDinosaur avatar Feb 08 '23 16:02 KawaiiDinosaur

Thanks. Edited my comment to link to yours

Blisto91 avatar Feb 08 '23 16:02 Blisto91

Changing vm.max_map_count=1048576 seems to have fixed the crashes in my limited testing.

n3wsw3 avatar Feb 08 '23 17:02 n3wsw3

ulimit -Hn

$ ulimit -Hn
16384

michael-hardeman avatar Feb 08 '23 20:02 michael-hardeman

That's generally too low for eventfd-based thread synchronization to be reliable. The link I posted with the question recommends around a million, and systemd sets it to something like half a million.

kisak-valve avatar Feb 08 '23 20:02 kisak-valve

@kisak-valve Is this better?

$ ulimit -Hn
1048576
$ ulimit -Sn
524288

michael-hardeman avatar Feb 08 '23 21:02 michael-hardeman

I recall there being downsides to increasing the soft limit, but not any specific details and the soft limit is not relevant to what esync is doing. Regardless, you should test the game without PROTON_NO_ESYNC and re-evaluate for yourself.

kisak-valve avatar Feb 08 '23 21:02 kisak-valve

@Blisto91 thanks for this tip. vm.max_map_count=1048576 solved issue with a crash during loading/fast travel on my both PC (Fedora 37 on both).

My OS limits looks following: ulimit -Hn: 1048576 ulimit -Sn: 1024

nadrolinux avatar Feb 08 '23 22:02 nadrolinux

Can report that vm.max_map_count=1048576 (thanks https://github.com/ValveSoftware/Proton/issues/6510#issuecomment-1422699309 https://github.com/ValveSoftware/Proton/issues/6510#issuecomment-1422921442) seems to solve the scene-loading crashes. Been playing for several hours today with no issues.

$ ulimit -Hn
524288
$ ulimit -Sn
1024

kzdixon avatar Feb 08 '23 23:02 kzdixon

steam-990080.log

Game crashes at startup right after the very first screen with "Warning: Read before playing". This is on kernel 6.2.0-060200rc4-generic with mesa 23.1.0-devel (git-3e2c768), running on Arc 770m.

lfelipe avatar Feb 09 '23 00:02 lfelipe

Replying to https://github.com/ValveSoftware/Proton/issues/6510#issuecomment-1421916724

System: CachyOS 6.2.0-rc6-1-cachyos-rc CPU: AMD Ryzen 7 4650G GPU: AMD Radeon RX 6700 XT DRIVER: Mesa 23.1.0_devel.166376.c6ebd2de71d RAM: 32 GB PROTON: ProtonGE-47

I have a 6700 XT and have discovered that if I change any of the graphics settings then the game is prone to crashing and even freezing. Eventually it happens during gameplay and then on subsequent game loads. What I found was that deleting the the game's shader folder steamapps/shadercache/990080, the three .ushaderprecache files at steamapps/compatdata/990080/pfx/drive_c/ProgramData/Hogwarts Legacy/, and the vkd3d shader cache at steamapps/common/Hogwarts Legacy/Phoenix/Binaries/Win64/ after changing any in-game settings or after editing GameUserSettings.ini. Once I did that I was able to play at 2K60 medium with RT Ambient Occlusion enabled for a couple hours when it froze during an Accio.

I also disabled VKD3D shader caching with VKD3D_CONFIG=pipeline_library_app_cache,dxr11.

rialpa84 avatar Feb 09 '23 00:02 rialpa84