Update or roll back the driver named on the blue screen (or found in the minidump), uninstall recently added software with drivers, run Windows Memory Diagnostic, and run DISM and sfc /scannow.

What ATTEMPTED_WRITE_TO_READONLY_MEMORY actually means

Windows protects some memory, such as code and certain kernel structures, as read-only. ATTEMPTED_WRITE_TO_READONLY_MEMORY means a driver ignored that protection. It’s a classic sign of a driver bug, so finding the driver is the key step.

Recently installed hardware, older drivers carried over after an upgrade, and low-level utilities (antivirus, overclocking, RGB control) are frequent offenders.

Signs of the problem

  • Blue screen: “Stop code: ATTEMPTED_WRITE_TO_READONLY_MEMORY”.
  • Crashes after installing new hardware or software.
  • A .sys driver named under “What failed”.

Common causes

  • Faulty or incompatible device driver.
  • Low-level software (antivirus, RGB, overclocking utilities).
  • Faulty RAM.
  • Corrupted system files.

Fixes to try, in order

  1. Find the driverAfter the next restart, look in C:\Windows\Minidump. Loading the latest .dmp file in WinDbg and running !analyze -v often names the guilty driver; BlueScreenView is a simpler alternative.
  2. Update or roll backUse Device Manager to roll back recent driver changes, or install the latest driver from the manufacturer.
  3. Uninstall recent softwareRemove utilities installed before the crashes started. If the PC crashes before you can do anything, start Safe Mode: Shift + Restart → Troubleshoot → Advanced options → Startup Settings → Restart → 4. Three failed boots in a row also bring up these menus.
  4. Test RAMRun mdsched.exe and disable memory overclocks while testing.
  5. Repair WindowsRun DISM and SFC (commands below).

Command

DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Run in an elevated Command Prompt (Run as administrator). DISM can take 10–20 minutes; run sfc after it finishes, then restart.

How to confirm the fix: No recurrence over several days of normal use and no new minidumps.

Prevent it from coming back

Keep drivers updated from official sources and remove utilities you don't need.