Hogwarts Legacy is a magical game, no matter what platform you play it on. But, if you’re like me and you have a pretty decent gaming PC, with ample grunt to run the game on high or ultra settings (at least on paper), then you may have been surprised and frustrated by the random lag and frame rate drops occurring throughout your gameplay.
For me, lowering the global graphics settings down to ‘medium’ and turning off ‘V-sync’ helped a lot. However, I’d still experience a jarring amount of stuttering shortly after loading up the game, when exploring new areas, and while traversing the world swiftly on a broomstick. I am running the game at 21:9 1440p resolution, so my graphics card is having to spit out a substantial amount of pixels. Though, this is less than 16:9 at 4K and lowering the rendering resolution didn’t help that much.
How to fix lag and stuttering in Hogwarts Legacy PC – Is 16GB RAM enough?
Digging into this a bit further, it looks like my machine’s RAM was the bottleneck. I’ve seen reports of other player’s RAM usage spiking to the high 20GB territory in some cases. And, like a lot of rigs, my PC was running 16GB of RAM (two 8GB sticks working in dual channel). For most modern AAA titles, 16GB is still plenty enough to get the most out of your graphics card. But the dense open-world of Hogwarts Legacy is very memory hungry.
Long story short, as long as your motherboard supports it, adding two additional 8GB sticks—to boost your RAM to 32GB—should unblock this bottleneck and give you a much smoother gameplay experience and stable frame rate in Hogwarts Legacy.
You can see in my video above that we’re running around Hogsmeade and enjoying a stable frame rate in the high 50s. Booting up the task manager reveals that, even when standing still in this area and on medium settings, my PC is utilising over 19GB of RAM!
If your PC only has two RAM slots, then swapping out the existing sticks for two 16GB modules will achieve the same thing. This video from Testing Games shows that there is very little performance difference between running four 8GB and two 16GB RAM modules.
Hogwarts Legacy frame rate test – 16GB vs 32GB RAM
You can see in the above benchmark test (around the 2:20 mark) that memory usage spikes above 16GB, resulting in a significant FPS drop and stuttering on the 16GB RAM system. The key thing on a RAM test is to monitor the 1% low, as opposed to the average frame rate. While the average FPS counts remain similar, the frame rate drops on the lower RAM system result in more stuttering and less smooth gameplay in some areas of the game.
UPDATE: A VRAM memory leak is the root cause of stuttering in Hogwarts Legacy
After further investigation, and from discussions with commenters on our YouTube video, it appears that a VRAM memory leak is the root cause of stuttering in Hogwarts Legacy PC.
I’m running an Intel Core i7 6700K (overclocked to 4GHz) and an Nvidia Geforce GTX 1080 (with 8GB VRAM). However, a viewer explained that they are running Hogwarts Legacy smoothly on a system with only 16GB of RAM, but a graphics card with 12GB VRAM.
In simple terms, the game is failing to release allocated VRAM memory segments once they are no longer needed. This results in VRAM becoming maxed out, particularly on graphics cards will lower amounts of onboard memory. The game then has to look elsewhere to stream shaders and textures, turning to the RAM. CPU utilisation may then become a limiting factor, while the system streams data between the CPU and memory.
This is less of an issue for consoles because of the differences between PC and console system architecture. The PS5, for example, has a CPU and GPU built into the same chipset. This chipset can stream graphics data very quickly to and from the 16GB GDDR6 RAM, utilising some of it as VRAM. However, many PC GPUs have less than 16GB VRAM. And, data transfer to and from DDR4 RAM is much slower than GDDR6.
With that being said, if your PC has 16GB of RAM or less, I would still recommend upgrading to 32GB. It’s much cheaper than purchasing a new graphics card (with more VRAM) and the game can utilise RAM in place of VRAM, as I’ve just explained. So, it will still help reduce lag significantly in Hogwarts Legacy. In my case, I no longer get frame rate drops big enough to result in stuttering.
Adding the right RAM to fix frame rate drops in Hogwarts Legacy
If you’ve never added RAM to your system before and don’t want to mess about with the RAM frequency and timing settings in the BIOS, I’d recommend that you purchase the exact same sticks that are currently installed in your system. That way, you can be sure that your PC is running efficiently and that all four sticks of RAM are working in dual-channel (i.e. two pairs of 8GB sticks communicating simultaneously on separate channels).
If you don’t know what RAM your system is running and you don’t want to pull out your existing sticks, you can easily find this out by downloading the free program CPU-Z. Once installed, simply head over to the ‘memory’ tab to confirm the total RAM currently installed. Then switch to the ‘SPD’ tab to find out the make and model of each module and how many slots, if any, you have free.
How to fix frame rate drops in Hogwarts Legacy PC – Without upgrading RAM
Hogwarts Legacy is not currently well optimised for wide-ranging PC hardware. This is likely due to a greater focus on console optimisation at launch. While this is a common occurrence in cross-platform games, the high memory usage is more unusual. So upgrading your RAM to 32GB will probably help reduce the stuttering issue.
However, if you are unable to upgrade your system RAM or you already have 32GB of RAM installed and are still experiencing significant frame rate drops in Hogwarts Legacy, there are a few things you can try. The below fixes work to reduce the VRAM requirement of the game and free up the RAM currently installed in your system.
1. Optimise graphics settings for your system
As I previously mentioned, lowering the global graphics settings down to ‘medium’ and turning off ‘V-sync’ will help. If you have a ray-tracing capable graphics card, turn off all RTX options. Lowering the rendering resolution will take additional strain off of your GPU. Pay particular attention to the ‘texture quality’ setting, as this significantly impacts VRAM use. As a general rule of thumb, I’d recommend using the ‘medium’ setting for 6GB, ‘high’ setting for 8GB, and ‘ultra’ setting for 10GB and above. For more optimisation tips, TroubleChute has a great video that dives deeper into each graphics setting.
2. Disable the Steam overlay
Disabling the Steam Overlay can provide a huge FPS boost, as KyoKat shows in this video. To do this, simply click on ‘Steam’ in the top-left corner of the Steam client, select ‘Settings’, navigate to the ‘In-Game’ tab, uncheck ‘Enable the Steam Overlay while in-game’, and click ‘OK’.
3. Clear the Steam cache
From your Steam client, click on ‘Steam’ in the top-left corner, select ‘Settings’, navigate to the ‘Downloads’ tab, click on the ‘Clear Download Cache’ button at the bottom, and select ‘OK’ to confirm and acknowledge that you’ll need to login to Steam again.
4. Clear RAM with Smart RAM Optimizer
Download, install and run the free program Smart RAM Optimizer. This will reduce the RAM usage of your PC by intelligently managing system resources, automatically detecting and disabling inactive processes and programs at a fixed frequency.
4. Turn off write caching on your PC drives
Write caching is a feature used to improve performance by using RAM to collect write commands before they are written to a drive. Disabling this feature will therefore free up some RAM to be used by Hogwarts Legacy if needed.
Simply head over the ‘Device Manager’ and right click on a drive, select ‘Properties’, navigate to the ‘Policies’ tab, uncheck ‘Enable write caching on the device’, and click ‘OK’.
5. Turn off Windows Exploit protection Control flow guard (CFG)
Other users have reported that overriding this Windows feature fixes the lag and stutter issue in Hogwarts Legacy on PC. This video from YouTuber CapnCrunch goes into more detail and explains how to do so.
6. Edit Hogwarts Legacy engine.ini config file to fix VRAM memory leak
In Windows Explorer, navigate to the Hogwarts Legacy Engine.ini config file. This can normally be found in the following folder:
C:\Users\’USERNAME’\AppData\Local\Hogwarts Legacy\Saved\Config\WindowsNoEditor
Create a copy of the ‘Engine.ini’ file as a backup to revert to. Then right click on the original file and select ‘Edit’ to open up your text editor. Scroll to the bottom of the file and paste the following code:
[SystemSettings]
r.Streaming.PoolSize=2048
r.Streaming.FramesForFullUpdate=10
r.Streaming.LimitPoolSizeToVRAM=1
r.TargetPrecompileFrameTime=30
r.PredrawBatchTime=30
r.TextureStreaming=1
r.Streaming.UseFixedPoolSize=1
r.VirtualTexture=1
The first parameter in this code (r.Streaming.PoolSize), sets the amount of VRAM (in MB) that the game can use to stream shaders and textures. It’s recommended to set this value at half the VRAM limit of your graphics card. So, if you have an 8GB VRAM GPU, then set this to ‘4096’ (4GB). You can then lower the value to ‘2048’ (2GB), or even ‘1024’ (1GB), if needed. However, the lower you set this value, the more compressed textures become and the worse the game looks.
The second parameter (r.Streaming.FramesForFullUpdate) is really where the magic happens. This value determines the speed at which textures are streamed. Lower values correspond to faster rates. By default, this is set very low so that textures are streamed instantly. However, this often results in the small stuttering issue that many Hogwarts Legacy PC players are experiencing. Setting this value between 1-20 should slow the texture streaming speed enough to reduce stuttering. If you set the value too high, however, then some textures may not load at all.
YouTuber Indie1Up, goes into more details about this in his video.
7. Install the Ascendio mod
One of the advantage for us Hogwarts Legacy PC players is that we can easily install mods. And there have been some amazing creations from the modding community so far. Ascendio is an unofficial FPS hotfix and performance boost mod for Hogwarts Legacy. It applies Unreal Engine parameters to help address some of the game’s performance issues.
I hope this article’s been useful and fixes any lag and frame rate drops you’ve been experiencing in Hogwarts Legacy on PC. If you know of any addition fixes for this issue, please comment them below.
Comments