Windows 10 offers a lot of great features that improve the Windows experience. The system is made up of smaller systems working together to provide you with an intuitive platform for all your computer needs.
However, several users have recently reported getting the event error 1020 & 1008 Microsoft-Windows-Perflib error on Windows 10, preventing them from running the affected application and affecting their computer’s performance.
According to the complaints, the error appears for no apparent reason. There is no indication that there is something wrong before the error pops up, like the computer freezing up or the apps crashing. The error just appears suddenly.
More importantly, there is not much online resource to turn to on how to fix the Event Error 1020 & 1008 Microsoft-Windows-Perflib error on Windows 10. This error has left a lot of affected Windows users frustrated and confused, not knowing how to deal with this error.
So if you encounter this error all of a sudden and you don’t know what to do, this guide should be a great help.
What is Event Error 1020 & 1008 Microsoft-Windows-Perflib Error
Don’t be confused. These are two different errors: event error 1020 and event error 1008. But they usually happen at the same time and the circumstances surrounding these errors are basically the same.
Here is the error message you might encounter for event error 1008:
Event ID: 1008
The open procedure for the service “.NETFramework” in the DLL “C: WINDOWS system32 mscoree.dll” failed with the error code. The system can not find the stated file. Performance data for this service is not available.
Here is the error message you might encounter for event error 1020:
Event ID: 1008
The required buffer size is larger than the buffer size transferred to the collect function of the expandable counter DLL “C: Windows System32 perfts.dll” for the service “LSM”. The reported buffer size was 34184 and the required size was 43160.
These errors can happen with any other file, not just mscoree.dll. It can also happen when the error is encountered when running a performance check on other DLL files.
In the above message, it means that the system can’t find the mscoree.dll. When the user tried to find the file using the odctr /r in Powershell (as admin), a message appears saying that mscoree.dll was replaced from a backup. When running the lodctr /q command to list repairs, mscoree.dll was even listed. However, the error still appears after doing the above troubleshooting.
The affected users noted that apart from these errors appearing in the Event Viewer, they didn’t notice anything strange with the computer; Everything was working like it should, so users had no idea what this could be causing them and what wasn’t working as they should.
However, when you get any of these errors, you don’t have to worry because this error itself isn’t a big deal. It is just Windows’ way of saying that it can’t collect performance data. That is the easy part. Getting rid of the errors is a whole different story.
What Causes Event Error 1020 & 1008 Microsoft-Windows-Perflib Error?
As mentioned earlier, these event errors may occur for various applications. When the performance monitor reads all counters for the first time, the extension’s Open Procedure is called.
A typical task for the Open procedure is to read what range of object indexes it supports from the registry. These index values are stored in the First Counter, First Help, Last Counter, and Last Help registry values under the application’s performance key.
If this Open procedure fails to read the data (i.e. those entries don’t exist or have been deleted by an uninstall procedure) the 1008 or 1020 event is recorded in the event log.
Error event 1020 and 1008 usually occurs because a list of counters is corrupted and a required DLL has been disabled. When the performance counter fails to unload the strings for the specified service, the registry might get corrupted and show these perflib errors.
How to Fix Event Error 1020 & 1008 Microsoft-Windows-Perflib Error
Although this error might not be critical to your Windows system, it can be annoying getting the notifications so you might want to deal with it using the solutions below.
Fix #1: Restart your computer.
The first step to fixing any error is to reboot the system. It is usually effective in resolving temporary glitches on your computer. Press the Power button, then wait for a few minutes before starting it again. You can also try booting into Safe Mode to see if the error is related to third-party software.
Fix #2: Remove corrupted files.
Another basic troubleshooting step involves running the SFC command in Command Prompt to check for corrupted files on your computer. This tool automatically fixes or replaces corrupted files to resolve any error you might be experiencing. It is also recommended to clean up your system using Outbyte PC Repair to prevent further errors from popping up.
Fix #3: Edit the Registry.
In order to remove such orphaned entries typically one has to follow these steps:
- Start Registry Editor (Regedt32.exe or Regedit.exe)and go to the following subkey:
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<service name>:\Performance
- Delete the value ” Open.”
- Restart your computer for this change to take effect.
Fix #4: Rebuild Performance Counters.
To fix this issue, rebuild the list of performance counters.
- Click Start.
- Type CMD in the search bar.
- Right-click Command Prompt.
- Choose Run as administrator.
- Enter the following command and hit Enter key– CD %SYSTEMROOT%\System32
- At the command prompt, type lodctr /r.
- Press Enter.
- Similarly, for error 1008, type lodctr /e:<DLL name> and then press Enter.
Please note that the Membership in the local Administrators group is required to complete this procedure. To rebuild the list of counters in the registry do the following.
- Click on the Windows 10 Start button.
- In the Search box that appears, type CMD or Command Prompt.
- When the option is seen, right-click it and select Run as administrator option.
- Now, in the Command Prompt window that appears on your screen, enter the following command and hit Enter key – cd %SYSTEMROOT%\System32.
- Again enter the following command and hit Enter key – lodctr /r.
Fix #5: Re-enable the DLL.
Similarly, 1008 Microsoft-Windows-Perflib error occurs when the required DLL is disabled. To resolve the issue, type lodctr /e:</<DLL name> and then press ENTER (replace <DLL name> with the file name of the library).
To disable one or more extensible counter DLL(s):
- Start the Registry Editor (RegEdt32.exe).
- Navigate to the following registry subtree:
- Click Find Key on the View menu.
- Type Performance as the search string, then search down from there.
- At each Performance entry you find, select the Library value and modify the library name by prefixing it with two x”s: for example, change OrigLib.dll to xxOrigLib.dll
- When you have done each Performance entry under the CurrentControlSet \Services key, restart Perfmon to see whether it works. If it does, then repeat the above two steps, only restoring the original library name and trying Perfmon after each change to see which library causes the fault.
Getting the Event Error 1020 & 1008 Microsoft-Windows-Perflib error on Windows 10 is annoying but it is not a critical error. If you do not need the performance counters for the service mentioned in the event you can disable them using the exctrlst.exe tool (Extensible Performance Counter List). However, this is only a workaround so that you won’t get these notifications. If you really want to resolve these errors, refer to our troubleshooting guide above.