Getting the "Memory couldn't be written" error on Windows 11 is a real pain, especially when you're in the middle of something. This usually happens because a program is trying to access a part of memory it shouldn't. Here are some ways to fix it and get back to what you were doing.

Common Causes of the Error

This error can be caused by various factors, including:

  • Corrupted system files or applications.
  • Faulty or mismatched RAM modules.
  • Outdated or incompatible device drivers.
  • Conflicting Windows updates.
  • Incorrect virtual memory settings.

Methods to Fix "The Memory Could Not Be Written" Error

1. Run Windows Memory Diagnostic Tool

This built-in tool checks your system's memory for errors and helps identify faulty RAM modules.

  1. Press Win + R to open the Run dialog.
  2. Type mdsched.exe and click OK.
Windows Memory Diagnostic Tool
  1. Select Restart now and check for problems (recommended).
  1. Your computer will restart, and the diagnostic tool will run automatically.
  2. Wait for the scan to complete and check the results for any memory errors.

2. Update or Reinstall Problematic Drivers

Outdated or corrupt device drivers can cause memory errors. Updating them may resolve the issue.

  1. Press Win + X and select Device Manager.
  1. Expand each category and look for devices with a yellow exclamation mark.
  2. Right-click the problematic device and choose Update driver.
  1. Select Search automatically for updated driver software.
  1. Follow the on-screen instructions to complete the update.

3. Uninstall Recent Windows Updates

Sometimes, recent Windows updates can cause system instability. Uninstalling them might fix the error.

  1. Open Settings by pressing Win + I.
  1. Go to Windows Update and click on Update history.
  1. Scroll down and click Uninstall updates.
  1. Select the most recent update (e.g., KB5034204) and click Uninstall.
  1. Restart your computer to apply the changes.

4. Run System File Checker and DISM Tools

Corrupted system files can lead to memory errors. Use SFC and DISM tools to repair them.

  1. Type cmd in the Windows search bar and select Run as administrator.
  1. In the command prompt, type sfc /scannow and press Enter.
  1. Wait for the scan to complete and follow any on-screen instructions.
  2. Next, type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
  1. Allow the process to finish, then restart your computer.

5. Reseat or Replace RAM Modules

Faulty or improperly seated RAM can cause memory errors. Reseating or replacing the RAM may help.

  1. Shut down your computer and disconnect all cables.
  2. Open the computer case to access the RAM slots.
  3. Carefully remove the RAM modules from their slots.
  4. Inspect the modules for damage or dust.
  5. Reinsert the RAM modules firmly into their slots.
  6. Close the case, reconnect the cables, and power on your computer.
Note: If the error persists, consider testing each RAM module individually to identify faulty ones.

6. Adjust Virtual Memory Settings

Incorrect virtual memory settings can lead to memory errors. Adjusting them may resolve the issue.

  1. Press Win + R, type sysdm.cpl, and click OK.
  1. In the System Properties window, go to the Advanced tab.
  1. Under the Performance section, click Settings.
  1. Switch to the Advanced tab and click Change under Virtual memory.
  1. Uncheck Automatically manage paging file size for all drives.
  1. Select your system drive (usually C:), choose Custom size, and enter initial and maximum sizes (in MB).
  1. Click Set, then OK to apply the changes.
  1. Restart your computer.
Tip: A general recommendation is to set the virtual memory to 1.5 times your installed RAM.

7. Perform a Clean Boot

A clean boot starts Windows with a minimal set of drivers and startup programs, which can help eliminate software conflicts.

  1. Press Win + R, type msconfig, and click OK.
  1. Go to the Services tab and check Hide all Microsoft services.
  1. Click Disable all.
  1. Switch to the Startup tab and click Open Task Manager.
  1. In Task Manager, disable all startup items.
  1. Close Task Manager and click OK in the System Configuration window.
  2. Restart your computer.
Note: If the error does not occur after a clean boot, gradually enable services and startup items to identify the conflicting software.

8. Update BIOS and Firmware

An outdated BIOS can cause hardware compatibility issues. Updating it may resolve memory errors.

  1. Identify your motherboard model and current BIOS version.
  2. Visit the manufacturer's official website and navigate to the support section.
  3. Download the latest BIOS update compatible with your motherboard.
  4. Follow the manufacturer's instructions carefully to update the BIOS.
  5. Restart your computer after the update is complete.
Warning: Updating the BIOS is a sensitive process. Incorrect steps can render your system unusable. Proceed with caution.

9. Perform a System Restore

Restoring your system to an earlier point in time can undo recent changes that may have caused the error.

  1. Press Win + R, type rstrui.exe, and click OK.
  1. In the System Restore window, click Next.
  1. Select a restore point dated before the issue began.
  1. Click Next and then Finish to start the restoration process.
  1. Your computer will restart to apply the restoration.
Note: System Restore will undo recent system changes without affecting personal files.

By following these methods, you should be able to resolve the "The memory could not be written" error in Windows 11. If the problem persists, it may be necessary to consult a professional technician to diagnose potential hardware issues.