FIX · SECURITY AND GAMING
Memory integrity and gaming: should you turn it off?
Memory integrity, also called hypervisor-protected code integrity (HVCI), is the switch under Core isolation in Windows Security. It checks kernel-mode code inside an isolated virtual environment, which makes it hard for malicious programs to use low-level drivers to take over the PC. Turning it off can free processor time, and Microsoft names older processors as the ones where its performance impact is bigger. But it removes that protection for everything you run, not only for games. Measure before you decide, and keep it on if you see no difference.
Updated .
TECHNICAL SUMMARY
| Where it lives | Windows Security, Device security, Core isolation details |
|---|---|
| Registry value PC Tweaker writes | HKLM\...\HypervisorEnforcedCodeIntegrity Enabled = 0 |
| Needs | Administrator rights, then a restart |
| What you give up | A kernel protection against malicious drivers |
| PC Tweaker plan | Pro, only from its own switch (Windows Security is free) |
What memory integrity protects
Microsoft describes memory integrity as a feature that makes it difficult for malicious programs to use low-level drivers to hijack your PC. It runs Windows' kernel-mode code integrity checks inside an environment isolated by hardware virtualization, where an attacker cannot easily tamper with them, and it restricts kernel memory allocations that could be used to compromise the system. It needs hardware virtualization switched on in the UEFI or BIOS. Microsoft also notes that the vulnerable driver blocklist is on whenever memory integrity, Smart App Control or Windows S mode is on.
What it costs in games
Microsoft does not publish a figure for games, and neither do we. What it does document is where the cost is higher: memory integrity works better on Intel Kaby Lake and later processors with Mode-Based Execution Control and on AMD Zen 2 and later processors with Guest Mode Execute Trap, while older processors emulate those features and see a bigger impact on performance. So test it on your own PC the same way as any other setting: one game, one repeatable scene, three runs with it on, restart, three runs with it off, and judge frame times rather than a single average.
- Same game, scene, settings and capture tool
- Restart after every change of the switch
- Keep it on if the difference is within run-to-run noise
- Turn it back on when you stop needing it off
When turning it off is the documented answer
Microsoft's own case for turning memory integrity off is a driver you need that it prevents from loading. Its advice is to look for an updated driver first, and only if that does not work to turn memory integrity off and restart. It adds a warning: on a Secured-core PC, turning memory integrity off takes the device out of a Secured-core state. If a driver blocks memory integrity from turning on, Microsoft's advice is the reverse: ask the device maker for a compatible driver, or remove the device or app that uses the incompatible one.
If the switch is greyed out or will not stay off
If the switch is greyed out with "This setting is managed by your administrator", memory integrity is managed outside Windows Security: Microsoft documents that it can be turned on through Group Policy, Intune or App Control, and that an administrator can grey out the switch. Change it where it was set, or ask whoever manages the PC. If it was turned on with UEFI lock, Microsoft notes that you need access to the UEFI menu to turn off Secure Boot before memory integrity can be turned off. From Windows 11 version 22H2, Windows Security also shows a warning while memory integrity is off; that is expected, not a fault.
Do it by hand
Check whether it is running (read-only, PowerShell as administrator)
Microsoft documents that 2 in this list means memory integrity is running. On the PC this guide was checked on (Ryzen 7 7800X3D, Windows 11 build 26300) the list included 2.
PowerShell(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard).SecurityServicesRunningTurn it off in Windows Security
Open Windows Security, select Device security, then Core isolation details, and switch Memory integrity off. Restart the PC: the change only takes effect after a restart.
Read the registry value (read-only)
In Microsoft's documented registry commands, 1 turns memory integrity on and 0 turns it off, followed by a restart.
cmdreg query "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v EnabledTurn it back on
Switch Memory integrity on again in the same place and restart. If Windows reports an incompatible driver, check with the device maker for an updated one.
With PC Tweaker
The Disable Memory Integrity (VBS) control in the Gaming category is Pro and needs administrator rights. It writes Enabled = 0 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity, shows that change under Technical details before it runs, and records the previous value so Restore puts it back. It is never applied as part of a profile, a batch or a re-apply after an update, only from its own switch. A policy or a UEFI lock can still keep memory integrity on, so restart and check Windows Security afterwards.
Rather not edit the registry by hand?
PC Tweaker shows the exact change before it runs, records the value it replaces and puts it back with Restore. The Free plan needs no account. If a payment fails or a plan ends, Pro tools lock; changes already applied stay as they are and Restore still undoes them.
Common questions
Does turning off memory integrity improve gaming performance?
It can on some PCs, but Microsoft publishes no figure for games. Its documentation says memory integrity works better on Intel Kaby Lake and newer and AMD Zen 2 and newer processors, while older processors emulate the features it needs and see a bigger impact on performance. Measure one repeatable scene with it on and off, restarting in between, before you give up the protection.
Is it safe to turn off memory integrity?
It is a security trade-off, not a free speed-up. Microsoft describes memory integrity as making it difficult for malicious programs to use low-level drivers to hijack your PC, and turning it off removes that layer for everything you run. Microsoft's own case for turning it off is a driver you need that cannot load: look for an updated driver first, and turn memory integrity back on when you no longer need it off.
Why can't I turn memory integrity on?
Microsoft documents two common causes: an incompatible driver, and hardware virtualization switched off in the UEFI or BIOS. For a driver, its advice is to ask the device maker for a compatible version, or remove the device or app that uses the incompatible one. For virtualization, turn it on in the firmware settings and try again.
Why is the memory integrity switch greyed out?
Because memory integrity is being managed outside Windows Security. Microsoft documents that it can be turned on through Group Policy, Intune or App Control, and that an administrator can grey out the switch, which then shows "This setting is managed by your administrator". Change it where it was set, or ask whoever manages the PC.
Try PC Tweaker
Free download for Windows 10 and Windows 11.