Fix Attempted Write to Readonly Memory Windows 11
In this article
Yes, you can fix the 'attempted write to readonly memory' error in Windows 11 by identifying and resolving memory access conflicts, typically caused by faulty drivers, corrupted system files, or malfunctioning software. This error usually appears as a blue screen (BSOD) and stops system operation to prevent data corruption. Fixing it involves checking hardware compatibility, updating or rolling back drivers, scanning system files, and ensuring memory integrity.
What You'll Need
- A Windows 11 PC with administrator access
- Stable internet connection (for downloading updates or drivers)
- External storage (optional, for backing up drivers or system files)
- Physical access to your PC (to check RAM modules if needed)
Step-by-Step
- Restart your PC and note when the error occurs. If it happens during startup, boot into Safe Mode by holding Shift while clicking Restart from the login screen. Then go to Troubleshoot > Advanced Options > Startup Settings > Restart, and press F4.
- Check for recent software or driver installations. If you installed a new driver, especially for GPU, audio, or storage devices, that may be the cause. Open Settings > Apps > Installed apps, locate the software, and uninstall it if suspicious.
- Update Windows. Go to Settings > Windows Update and click Check for updates. Install all available updates, including optional ones, as they may contain critical driver or security fixes.
- Update or roll back drivers. Press Win + X and select Device Manager. Look for devices with a yellow warning icon. Right-click each and select Update driver. If the issue started after a driver update, choose 'Roll back driver' if the option is available.
- Focus on critical drivers: display adapters, storage controllers, and system devices. Right-click each category in Device Manager and update drivers individually.
- Run System File Checker. Open Command Prompt as administrator (search for cmd, right-click, and choose Run as administrator). Type
sfc /scannowand press Enter. Wait for the scan to complete and note if any corrupted files were repaired. - Run DISM to repair the system image. In the same admin Command Prompt, run:
DISM /Online /Cleanup-Image /RestoreHealth
This may take 10–20 minutes. It fixes underlying image corruption that SFC cannot resolve. - Check memory health. Press Win + R, type
mdsched.exe, and press Enter. Choose 'Restart now and check for problems'. After reboot, Windows Memory Diagnostic will scan RAM. Wait for the result—any errors indicate faulty RAM. - If memory errors are found, reseat RAM modules (power off and unplug first). If you have multiple sticks, test one at a time to isolate the faulty one.
- Check disk health. Open Command Prompt as admin and run:
chkdsk C: /f /r
Approve the schedule for next restart. Reboot and let the scan complete. This checks for bad sectors or file system errors on the system drive. - Disable overclocking. If your CPU, RAM, or GPU is overclocked via BIOS or third-party tools, reset to default settings. Overclocking can cause memory instability and trigger write protection errors.
- Scan for malware. Run a full system scan using Windows Security: go to Settings > Privacy & Security > Windows Security > Virus & threat protection > Scan options, then choose Full scan and run it.
- Check Event Viewer for clues. Open Event Viewer (search in Start), go to Windows Logs > System, and look for critical errors around the time of the crash. Filter by 'BugCheck' or 'Kernel-Power' events to find relevant entries.
- Reset or reinstall Windows if all else fails. Go to Settings > System > Recovery > Reset PC. Choose 'Keep my files' to reinstall Windows while preserving personal data. This replaces system files without deleting documents.
Common Mistakes
- Ignoring recent driver updates: rolling back a problematic driver is often the fastest fix, but users often skip this step.
- Running SFC without DISM: if the system image is corrupted, SFC alone may not fix the issue. Always run DISM afterward.
- Overlooking hardware: assuming the issue is purely software when faulty RAM or SSDs are common causes.
- Not testing RAM individually: if one stick is failing, testing all together may miss the problem.
- Skipping Safe Mode: attempting fixes while the error recurs prevents diagnosis.
Tips
- Keep a record of recent changes: software, drivers, or BIOS updates can help pinpoint the cause.
- Use Windows built-in tools first: avoid third-party memory or disk utilities unless necessary.
- Check manufacturer websites: download drivers directly from Intel, AMD, NVIDIA, or your PC maker instead of using generic ones.
- Enable automatic updates: this reduces the chance of outdated drivers causing instability.
- Regularly back up system state: use System Restore to create restore points before major changes.
Troubleshooting
If the error persists after completing all steps, consider hardware failure. Faulty RAM is the most common cause of memory-related BSODs. Replace suspect modules with known-good ones. If the drive is failing, back up data immediately and replace the SSD or HDD. If the issue occurs only with specific apps, check their compatibility settings—right-click the app, select Properties > Compatibility, and try running in compatibility mode for Windows 10. If the PC overheats frequently, clean internal dust and check fan operation, as heat can destabilize memory. If you're using a virtual machine, ensure it has enough allocated memory and that host drivers are up to date.
Frequently Asked Questions
What causes attempted write to readonly memory?
This error occurs when a program or driver tries to modify memory marked as read-only, often due to driver bugs, hardware faults, or system file corruption.
Is this a virus?
Not usually. While malware can cause memory access violations, this error is more commonly tied to drivers or hardware issues.
Can bad RAM cause this error?
Yes. Faulty or improperly seated RAM modules are a leading cause of memory-related BSODs, including this one.
Should I replace my SSD if I see this error?
Only if disk checks reveal errors. Run chkdsk and monitor S.M.A.R.T. status via your SSD manufacturer's tool.
Does updating BIOS help?
Sometimes. BIOS updates can improve memory compatibility, but only update if your manufacturer recommends it for stability fixes.
Can I ignore this error if it only happens once?
No. Even a single occurrence can indicate an underlying issue that may worsen. Investigate and resolve it promptly.