Skip to content

About

PowerShell scripts for mitigating AMD fTPM-related input and audio freezes on affected Ryzen 5000 laptops running Windows (PA-410).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ryzen fTPM Stutter Mitigation on Windows

English | 简体中文

Latest release MIT license

PowerShell scripts for mitigating intermittent one- to two-second input and audio freezes associated with AMD fTPM on Ryzen 5000 laptops with BIOS versions before AGESA 1.2.0.7 (AMD advisory PA-410). The scripts apply Windows-side workarounds. The case study documents the behavior observed on Windows 11.

Mitigation options

flowchart LR
    A["Record a freeze with ETW"] --> B["Check for fTPM involvement"]
    B -->|Trace suggests fTPM| C["Apply and verify the WebView2 policy"]
    B -->|Cause unclear| G["Investigate other possible causes"]
    C --> D{"Kernel-triggered freezes persist?"}
    D -->|Yes| E["Review the requirements for disabling the TPM driver"]
    D -->|No| F["Continue monitoring"]
Loading
Option Effect Trade-off
1. Edge and WebView2 policy Changes Windows policies to reduce application-triggered fTPM activity. Periodic TPM calls from the Windows kernel can still trigger freezes. Keeps the TPM enabled and leaves TPM-backed features available. Use this option first.
2. Disable the Windows TPM driver Stops Windows from accessing the TPM while the driver is disabled, including the periodic kernel calls observed in the case study. Requires BitLocker and Device Encryption to be off. TPM-backed passkeys and software that requires TPM 2.0 are unavailable while the driver is disabled.

Use Windows ETW Flight Recorder to collect a trace if the cause of the freeze is unclear.

Quick start

Download the ZIP from the latest release and extract it. Applying and reverting changes requires administrator privileges.

Option 1. Apply the Edge and WebView2 policy

  1. Run 1-Apply-Mitigation.cmd and select Standard for the Edge and WebView2 policies. Full also changes Windows cloud search, cloud content, and Store policies.
  2. Restart the affected applications or restart Windows. Run 2-Verify-Mitigation.cmd to check for oneauth.dll and aadWamExtension.dll in running WebView2 processes.
  3. Run 3-Revert-Mitigation.cmd to remove the policies applied by the scripts.

Option 2. Disable the Windows TPM driver

Warning

Confirm that all drives are fully decrypted and that you can unlock Windows using your account password. TPM-backed passkeys and software requiring TPM 2.0, including some anti-cheat systems, are unavailable while the Windows TPM driver is disabled.

  1. In Settings → Accounts → Sign-in options → Additional settings, turn off For improved security, only allow Windows Hello sign-in for Microsoft accounts on this device. Press Win + L and verify that password sign-in works.
  2. Run 4-Toggle-TPM-Driver-Advanced.cmd. Select [1] to check the system and [2] to disable the driver. The script refuses to continue if it detects BitLocker or Device Encryption.
  3. Restart Windows. If Windows Hello is unavailable, sign in with your password. The test system allowed PIN and fingerprint enrollment again in software-protection mode.
  4. To restore the driver, select [3] and restart Windows.

Case study

The Windows 11 traces showed two paths associated with freezes on the test laptop. One involved Edge or WebView2 authentication components reaching tbs.dll. The other involved periodic kernel calls from cng.sys to tpm.sys, observed about every eight to nine minutes. The case study includes the trace timeline, the WebView2 policy settings, and the results observed on that device. Read the case study.

PowerShell commands

# Apply, verify, and revert the policy
# Add -IncludeSystemPolicies to Apply-WebView2Mitigation.ps1 for Full mode.
.\scripts\Apply-WebView2Mitigation.ps1
.\scripts\Verify-Mitigation.ps1
.\scripts\Revert-WebView2Mitigation.ps1 -IncludeSystemPolicies

# Inspect, disable, and restore the Windows TPM driver
.\scripts\Set-TpmDriverState.ps1 -Action Status
.\scripts\Set-TpmDriverState.ps1 -Action Disable
.\scripts\Set-TpmDriverState.ps1 -Action Enable

License

MIT

About

PowerShell scripts for mitigating AMD fTPM-related input and audio freezes on affected Ryzen 5000 laptops running Windows (PA-410).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages