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
- Find the driverAfter the next restart, look in
C:\Windows\Minidump. Loading the latest .dmp file in WinDbg and running!analyze -voften names the guilty driver; BlueScreenView is a simpler alternative. - Update or roll backUse Device Manager to roll back recent driver changes, or install the latest driver from the manufacturer.
- 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.
- Test RAMRun
mdsched.exeand disable memory overclocks while testing. - 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.
Prevent it from coming back
Keep drivers updated from official sources and remove utilities you don't need.
