This is a wrapper for the Kernel Debugger to count SMI interrupts in Windows 10.
SMIs are special interrupts issued to the BIOS to perform special low-level operations.
These events lock the whole computer - including all cores and the whole Operating System.
SMIs can happen at any time and are completely invisible to the OS except for a special CPU register.
Because they are hidden, this confuses tools like LatencyMon/DPClatency which will put the blame in random drivers instead.
In linux the special register can be read with "sudo turbostat --msr 0x34".
In windows 10 you will have to install the microsoft debugging SDK and enable the debug boot flag.
more info: https://en.wikipedia.org/wiki/System_Management_Mode
You can run this tool with or without WSL.
The WSL version is recommended because it offers much more features.
The non-WSL version is very simple for manual use.
- WSL version: windows_count_smi.sh
- non-WSL version: windows_count_smi.cmd
- Windows 10
- Install the microsoft "windows kernel debugger" program:
- install windows SDK, select ONLY 'Debugging Tools for Windows'
- https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/
- Disable secure boot in BIOS
- Enable debug in windows kernel (bcdedit.exe -debug on)
- Reboot
- start a regular CMD window in Administrator mode
- run "windows_count_smi.cmd"
- Install WSL (guide)[https://docs.microsoft.com/en-us/windows/wsl/install-win10]
- start WSL window in administrator mode
- run "windows_count_smi.sh"
- To measure SMI LATENCY impact:
- Run IDTL (In Depth Latency Tests) with HIGH_LEVEL IRQL
- https://www.resplendence.com/latencymon_idlt
- https://www.resplendence.com/latencymon_cpustalls
Note1: run "windows_count_smi.sh -H" for more help text, tutorials and links. link
Note2: some advanced analysis requires WPR/WPA/ETW. This is the best tutorial I've seen, including A LOT of examples
here: example_audio_glitch.mp3 / alternative link
- Previously I recommended to disable the services.
- This is not enough. Something reactivated the services some week(s) later.
- New recommendation: Un-Install all Dell sofware with has "support" in the title.
The service "Dell SupportAssist" causes SECONDS of latency every 30 minutes (XPS 15-9560/BIOS 1.18.0)
Issue:
- the Dell SupportAssist service does a deep PIC scan for inventory purposes every 30 minutes.
- This causes 192x ring-2 SMI interrupts that lock the laptop for whole seconds. SMIs run below the kernel and a possible hypervisor.
- This Dell service was already preinstalled in my XPS 15-9560 laptop
Environment:
- Dell XPS 15-9560
- BIOS: 1.18.0, 1.16.0 and 1.12.1 were tested
- SupportAssist: 3.4.1 + 5.0.1.10874
- Windows 10 home: 18363
- All latest drivers and services from Dell (link)
Fixes:
Services: Disabling this service in services.msc avoids the issue completely.- Something re-enables the service after some weeks. Instead, uninstall the software completely.
- Lower Priority: no effect at all (see "ring -2" concept, below)
windows_count_smi log:
- 2020-02-22 13:19:28,504033800+00:00 1582377568.504033800 SMI 192
- 2020-02-22 13:49:29,709938000+00:00 1582379369.709938000 SMI 192
- 2020-02-22 14:19:31,464194900+00:00 1582381171.464194900 SMI 192
- 2020-02-22 14:49:32,292745300+00:00 1582382972.292745300 SMI 192
C:\ProgramData\Dell\SARemediation\log\DellSupportAssistRemedationService.log
- 20-02-22 13:19:26,938 [4] [ERROR] Failed to detect audio playing. #StackInfo#
- 20-02-22 13:49:28,208 [4] [ERROR] Failed to detect audio playing. #StackInfo#
- 20-02-22 14:19:29,470 [4] [ERROR] Failed to detect audio playing. #StackInfo#
- 20-02-22 14:49:30,732 [4] [ERROR] Failed to detect audio playing. #StackInfo#
- Some other of the Dell services causes 42x SMIs every 15 minutes
- Recommendation: disable all Dell services to avoid SMIs
- If you install the DellSupportAssist GUI, you can configure a weekly hardware scan
- However I haven't seen any difference on the 192x and 42x SMI problems
windows_count_smi log:
- 2020-02-27 10:38:44,527207400+01:00 1582796324.527207400 SMI 42
- 2020-02-27 10:53:44,372286700+01:00 1582797224.372286700 SMI 42
- 2020-02-27 11:08:45,207355200+01:00 1582798125.207355200 SMI 42
- 2020-02-27 11:23:44,360058300+01:00 1582799024.360058300 SMI 42
- 2020-02-27 11:38:44,490156400+01:00 1582799924.490156400 SMI 42