Macbook Pro Retina 15-inch stuttering sound when high CPU usage

0

I have Boot Camp on my rMBP 15-inch, running Windows 8.1. I usually have Spotify running in the background when I work. Recently, I notice whenever my CPU usage is high (>80%), the music is stuttering and distorted. Not just Spotify but any sound or music player got affected.

I have Boot Camp 5.1 installed for almost a year and never experience this problem before. Recently I upgraded to Boot Camp 6 (with Windows 8.1). I suspect it must be some soundcard drivers problem, but even after reinstalling the Boot Camp Driver, the problem remain.

Is there anything I can do to diagnose the root cause of this behavior ?

Dio Phung

Posted 2016-03-08T04:26:04.513

Reputation: 739

Install the WPT (http://social.technet.microsoft.com/wiki/contents/articles/4847.install-the-windows-performance-toolkit-wpt.aspx also), run WPRUI.exe, load and check this profile inside WPRUI.exe (Add Profiles) (https://www.dropbox.com/s/8rl4r784kvnhypf/Multimedia_WPRP.WPRP?dl=1) click on Start. Now capture 1 minute of the high CPU usage and audio glitches. After 1 minute click on Save. Zip the large ETL file (+ NGENPDB fodler) into 1 zip, upload the zip (OneDrive, dropbox, google drive) and post the share link here.

– magicandre1981 – 2016-03-08T05:42:04.210

Great. Thanks, I'll be measuring and share the PDB soon. – Dio Phung – 2016-03-08T07:33:22.060

were you able to capture the trace? – magicandre1981 – 2016-03-12T07:36:13.223

Yes I can. Can you provide a way to connect with you ? I'd like to share the Google Drive link with you only for your reference. – Dio Phung – 2016-03-12T23:48:49.170

the trace is corrupted. Uninstall the 8.1 WPT and try the Windows 10 version from the Win10 SDK: https://dev.windows.com/en-us/downloads/windows-10-sdk This version also works on Win8

– magicandre1981 – 2016-03-13T20:14:57.320

it could be due to my 7z. Hold on, I'll be capture new trace – Dio Phung – 2016-03-13T20:36:19.070

no, the ETL itself misses data, thi has nothing to do with 7z. Use this time the Win10 SDK/WPT – magicandre1981 – 2016-03-13T20:49:56.307

Answers

1

I used the following xperf command to get an overview of the DPC activity on your system:

"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\xperf.exe" -I DIOMBPWS03-07-2016.23-45-01.etl -a dpcisr > dpc.txt

In the DPC.txt I see you have some large spikes (over 1024µs execution time), that cause such audio glitches:

Total = 7394 for module USBXHCI.SYS
Elapsed Time, >     2048 usecs AND <=     4096 usecs,      0, or   0.00%
Elapsed Time, >     4096 usecs AND <=     8192 usecs,      1, or   0.01%
Elapsed Time, >     8192 usecs AND <=    16384 usecs,      2, or   0.03%
Elapsed Time, >    16384 usecs AND <=    32768 usecs,      0, or   0.00%
Elapsed Time, >    32768 usecs AND <=    65536 usecs,      1, or   0.01%
Total,                                                  7394

Total = 10028 for module afd.sys
Elapsed Time, >     1024 usecs AND <=     2048 usecs,      0, or   0.00%
Elapsed Time, >     2048 usecs AND <=     4096 usecs,      0, or   0.00%
Elapsed Time, >     4096 usecs AND <=     8192 usecs,      4, or   0.04%
Total,                                                 10028

Total = 7092 for module ndis.sys
Elapsed Time, >      512 usecs AND <=     1024 usecs,      1, or   0.01%
Elapsed Time, >     1024 usecs AND <=     2048 usecs,      0, or   0.00%
Elapsed Time, >     2048 usecs AND <=     4096 usecs,      1, or   0.01%
Elapsed Time, >     4096 usecs AND <=     8192 usecs,      1, or   0.01%
Total,                                                  7092

Total = 28123 for module ntoskrnl.exe
Elapsed Time, >     1024 usecs AND <=     2048 usecs,      0, or   0.00%
Elapsed Time, >     2048 usecs AND <=     4096 usecs,      1, or   0.00%
Elapsed Time, >     4096 usecs AND <=     8192 usecs,      6, or   0.02%
Total,                                                 28123


Total = 36449 for module storport.sys
Elapsed Time, >     1024 usecs AND <=     2048 usecs,      0, or   0.00%
Elapsed Time, >     2048 usecs AND <=     4096 usecs,      0, or   0.00%
Elapsed Time, >     4096 usecs AND <=     8192 usecs,      4, or   0.01%
Total,                                                 36449

Total = 29689 for module nvlddmkm.sys
Elapsed Time, >     1024 usecs AND <=     2048 usecs,      1, or   0.00%
Elapsed Time, >     2048 usecs AND <=     4096 usecs,      3, or   0.01%
Elapsed Time, >     4096 usecs AND <=     8192 usecs,      1, or   0.00%
Total,                                                 29689

The largest issues come from the USB 3.0 driver (USBXHCI.SYS) of Windows 8.1 which has a spike of 0,032768s, which is terrible.

I looked at the callstack and see that the USB driver does some IO transfer (USBXHCI.SYS!UsbDevice_TransferEventHandler). So disable some of the USB devices that you use until you find the device that causes the usage.

magicandre1981

Posted 2016-03-08T04:26:04.513

Reputation: 86 560

Thanks for the insights. I'll verify it and update the results here. – Dio Phung – 2016-03-14T23:24:25.157