My Solution for Dell XPS M1530 DPC Latency

DPC latency is an extremely well documented problem in the Dell XPS line of laptops. The problem is characterized by occasional CPU spikes that cause a brief stutter or crackle in the audio stream. In my case, it only occurred every 30 seconds or so, and only for an instant. But I use the laptop for making music, and the noise is just enough to make any sort of real-time performance impossible.

Here are the specs of the system:

  • Intel Core 2 Duo T7500
  • Behringer UCA222 USB Audio
  • Broadcom 1395 WiFi
  • NVIDIA 8400M GS 128MB Video
  • Windows 7 Enterprise

The posts I link to above have several solutions that have worked with varying degrees of success for different people, but nothing seemed to quite work for me. After spending most of a Saturday tinkering with this, I was able to find a solution.  Here's what I did:

Download DPC Latency Checker. This little utility shows a scrolling bar graph that indicates the DPC (Deferred Procedure Call) performance of your computer. The glitches in the audio stream are very clearly indicated by the big red sky scrapers. This is what mine looked like:

Bad latency spikes on my Dell XPS M1530

The Broadcom 1395 WIFI adapter seems to be a recurring theme when it comes to DPC problems with this laptop, and unfortunately that's the one I have installed. The first thing I did was download and install this hacked driver for the Broadcom adapter.

You need to choose 'Browse my computer for driver software' and then choose 'Let me pick from a list of device drivers on my computer' to get to the 'Have Disk'  button that allows you to manually install the drivers. Searching for the driver or allowing Windows to pick the best driver for your hardware won't work.

After updating the driver, the audio glitches seemed to occur a little less frequently, but they were still there. Time to break out the analysis tools and find out what was actually going on:

Download and  install the Windows Performance Toolkit. I have Windows 7, and this is part of the Windows 7 SDK. After installing the SDK, the WPT installer is located here: C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\wpt_x64.msi. You will have to navigate to that folder and double click the msi file to install it.

After everything is installed, open an Administrator command prompt by clicking Start -> All Programs -> Accessories, right clicking on Command Prompt and choosing Run as administrator. In the console window, start xperf with this command:

xperf -on DiagEasy

The performance monitor starts running in the background, logging data about all the running processes on your system.

The next step is to start DPC Latency Checker, and watch the pretty scrolling bars until you see a latency spike. You should let it run for at least 20 seconds or so. After you see a spike, go back over to the console window and stop the performance monitor with this command:

xperf -d trace.etl

This will stop the monitor from logging data, and write the results into the file trace.etl. At this point, you've got all the data you need to diagnose your DPC latency problem.

Start the Performance Analyzer to view the results with this command:

xperf trace.etl

You'll see your trace data in a pretty line graph:

Performance Analyzer results

Scroll down to the DPC CPU Usage line chart, right click on it, and choose Summary Table. You'll see a summary of the processes that were captured in your xperf trace.  Click on the Max Actual Duration [ms] column heading to sort the processes by descending maximum duration. The process at the top (with a ridiculously high number) will be your culprit. (This screenshot is just an example, no offending processes here...)

DPC usage summary

In my case, it was dxgkrnl.sys with a max actual duration of something like 32 milliseconds, which is way out of line. It turns out that this process belongs to my NVIDIA 8400M GS laptop video card.

After some more research, I learned that Powermizer is the culprit. This is an NVIDIA service that toggles the speed of the graphics adapter based on need, so when you aren't doing anything graphics intensive the clock speed drops. A great idea in theory, but in practice you get a massive DPC latency spike when the switch is flipped.

My solution was to turn of Powermizer. Apparently there is a utility to do this, but it's nowhere to be found on my system after installing the latest NVIDIA driver package. There are also some registry keys you can modify, but once again I don't have those keys in my registry. The easiest way to add the Powermizer registry keys and set them to the correct values is to use the Powermizer Switch utility by xsmile.

I ran the utility, rebooted, and fired up DPC Latency Checker. No spikes!