ERROR_NOT_LOCKED 158 (0x9E) [Solved]
Fixing the system files and RAM will get rid of the error
4 min. read
Updated on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
The ERROR_NOT_LOCKED Windows system error appears when a process tries unlocking an already unlocked segment of the memory. The error code is 158 (0x9E), and the message reads, The segment is already unlocked.
The 158 (0x9E) system error is caused by incompatible applications, malware infection, corrupted system files, misconfigured Registry settings, or malfunctioning RAM.
Before you proceed to the solutions, restart the PC, update the affected app, and install all pending Windows updates. For most of you, this alone will fix the 158 (0x9E) The segment is already unlocked error!
How do I fix ERROR_NOT_LOCKED system error?
1. Repair the corrupt system files
- Press Windows + R to open Run, type cmd, and hit Ctrl + Shift + Enter.
- Click Yes in the UAC prompt.
- Paste the following DISM commands one at a time and hit Enter after each:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
- Now, execute this command to run the SFC scan:
sfc /scannow
- Finally, reboot the PC and check for improvements.
If the corrupted system files are triggering 158 (0x9E) ERROR_NOT_LOCKED in Windows, running the DISM (Deployment Image Servicing and Management) and SFC (System File Checker) scan will replace all such files with their cached copy stored on the PC.
2. Scan the PC for malware
- Press Windows + S to open Search, type Windows Security in the text field, and click on the relevant result.
- Click on Virus & threat protection.
- Now, click on Scan options.
- Select the Full scan entry and then click the Scan now button.
- Wait for the malware scan to complete. It typically takes 15-30 minutes.
3. Check for issues with the RAM
- Press Windows + S to open Search, type Windows Memory Diagnostic in the text field, and click on the relevant result.
- Click on Restart now and check for problems.
- Once the scan is done running, view the mdsched logs, and look for any problems.
When Windows Memory Diagnostic can’t find any issues, I recommend using MemTest86+, an open-source RAM testing tool, to run a wide array of advanced scans on individual modules and detect even the smallest of problems.
If any of the RAM sticks are indeed malfunctioning, it’s best that you replace them with a new one, and this will fix ERROR_NOT_LOCKED in Windows.
4. Uninstall conflicting applications
- Press Windows + R to open Run, type appwiz.cpl in the text field, and hit Enter.
- Individually select any apps that were downloaded or updated around the same time the system error first appeared, and click on Uninstall.
- Follow the on-screen instructions to complete the process.
- Once done, restart the computer and check for improvements.
If a quick removal doesn’t fix the ERROR_NOT_LOCKED 158 (0x9E) Windows system error, it’s best to use a top-rated software uninstaller to clear any leftover files, app cache, and Registry entries that might still be conflicting with the OS.
5. Perform a system restore
- Press Windows + S to open Search, type Create a restore point, and click on the relevant result.
- Click the System Restore button.
- Select the Choose a different restore point option, and click on Next.
- Pick the oldest restore point from the list and click Next.
- Verify the restore details, click on Finish to start the process, and confirm the change.
- Wait for the system restore to complete. It typically takes 10-30 minutes.
A system restore will revert all recent changes on the PC, taking it to a point of stability. Remember, it’s critical to choose a restore point created before ERROR_NOT_LOCKED first appeared.
And if this, too, fails, the last option is to reinstall Windows. Make sure to move critical files to external storage before you proceed with a reinstall in order to avoid data loss.
Before you leave, discover the expert-recommended settings for Windows 11 for a streamlined and error-free experience!
Our latest guide covers Error_Lock_Failed so we encourage you to check it out for more solutions.
For any queries or to share which fix worked for you, drop a comment below.
User forum
0 messages