Quick Answer
Open tpm.msc, click "Clear TPM", reboot, then reinitialize in BIOS.
Why This Happens
The TPM stores cryptographic keys in a "context blob" – think of it as a session token. Error 0x8028005A pops up when that blob gets corrupted. I've seen this most often after a BIOS update that resets TPM firmware tables, or after a hard crash during encryption (like a power loss while BitLocker was running). A common real-world trigger: putting a laptop to sleep with BitLocker active, then waking it after a BIOS update.
The culprit here is almost always a mismatch between what the TPM hardware expects and what Windows sent it. You can't repair the blob – it's like trying to fix a shredded PDF. You clear the TPM and start fresh.
Fix Steps
- Back up BitLocker keys. If you use BitLocker, get your recovery key first. Press Windows+R, type
manage-bde -protectors -get C:, save the 48-digit key. Without this, you'll lose the drive if you clear TPM. - Open TPM Management. Press Windows+R, type
tpm.msc, hit Enter. Look at the status. If it says "The TPM is ready for use", good. If it shows any error, skip to step 4. - Clear the TPM. In tpm.msc, click "Clear TPM" in the right Actions pane. Check "I have the TPM owner password" – you don't need it unless you set one. Click OK. Reboot when prompted. During POST, you'll see a prompt to press F12 or Delete to confirm the clear. Do it.
- If tpm.msc fails – sometimes the UI just errors out. Use PowerShell as Admin:
Clear-Tpm. If that returns "The TPM is not ready", you need to initialize it in BIOS. - Initialize TPM in BIOS. Reboot, mash F2/Del/F10 (varies by brand). Find Security or TPM settings. Set TPM to "Enabled" or "Available". Save and exit. Boot to Windows.
- Reinitialize TPM. Open PowerShell (Admin):
Initialize-Tpm -AllowClear. This provisions the TPM. Then runGet-Tpm– status should show "$true" for all fields. - Restore BitLocker. If you use BitLocker, run
manage-bde -on C:and enter your recovery key when prompted. It'll re-encrypt using the new TPM.
Alternative Fixes if the Main One Fails
If clearing the TPM doesn't work or the error persists, try these:
- Disable TPM in BIOS, reboot, then re-enable. I've seen this kickstart a stuck TPM. Boot to BIOS, set TPM to "Disabled", save, reboot. Then go back and set to "Enabled".
- Reset the TPM via motherboard jumper. On some desktops (Dell Optiplex, HP EliteDesk), there's a TPM reset jumper on the board. Unplug, move the jumper, wait 10 seconds, move it back. This is hardware-level – it clears the TPM regardless of OS.
- Update TPM firmware. If you're on a Lenovo ThinkPad or Dell Latitude, the manufacturer sometimes releases a TPM firmware update. Check the vendor's support site. I've seen this fix the "bad context" error on TPM 1.2 chips after Windows 11 upgrades.
- If BitLocker won't recover – boot from a recovery drive and run
manage-bde -unlock C: -RecoveryPassword [your-48-digit-key]. If that fails, you may need to reinstall Windows. Always keep a backup of that key offline.
Prevention Tip
Before any BIOS update, suspend BitLocker temporarily. Run manage-bde -protectors -disable C: in Admin PowerShell. Re-enable it after the update with manage-bde -protectors -enable C:. This prevents the TPM from getting confused by the firmware changes. Also, avoid force-shutting down during encryption – let it finish.
If you're on Windows 11 22H2 or later, you might notice this error more often with AMD processors. Microsoft and AMD acknowledged a bug with TPM context handling in fTPM (firmware TPM). The fix is the same – clear and reinitialize. On Ryzen systems, you can also disable fTPM and switch to a discrete TPM module if the error keeps coming back.