Friday, 13 February 2026

AI Queries Causing System to Hang

 

AI Queries Causing System to Hang: How I Tamed My Workstation's Audio Pops

If you're like me, running a beloved, powerful, but aging workstation – in my case, an HP xw8400 with dual Intel Xeon E5345 CPUs and dual NVIDIA NVS 300 graphics cards on Windows 7 – you know the struggle. This machine is a beast for certain tasks, but it has its quirks, especially when it comes to real-time audio.

Recently, I hit a wall: every time I performed an AI query in my browser (Supermium, in this case), my audio would suffer from frustrating clicks and pops. It felt like the system was "hanging" for a split second, causing those dreaded buffer underruns. This wasn't just annoying; it was crippling my ability to work efficiently.

The Problem: LatencyMon Revealed the Culprit

My first step was to fire up LatencyMon, the go-to tool for diagnosing audio dropouts. The results were stark:

  • Massive DPC Latency Spikes: nvlddmkm.sys (the NVIDIA Windows Kernel Mode Driver) was consistently hitting peaks of 30,000 microseconds (µs) during AI queries. Anything over 1,000-2,000 µs is problematic for audio, so 30,000 µs was a red flag the size of a billboard.

  • Hard Pagefaults: My system was also drowning in 22,000 hard pagefaults, indicating that the system was constantly scrambling for data on the slow hard drive. This was primarily caused by psanhost.exe (Panda Antivirus), which I quickly realised was simply too heavy for my setup.

The Journey: Initial Tweaks (and Why They Didn't Fully Work)

I started with the usual suspects, guided by some excellent advice:

  1. NVIDIA Control Panel - Usage Mode: Graphics Only: This was a good first step, preventing the GPUs from trying to act as compute devices. It helped, but the massive spikes remained.

  2. Disabled Hardware Acceleration in Browser: Ensured Supermium wasn't trying to offload too much to the GPU. Again, helpful, but not the silver bullet.

  3. Power Options: High Performance: Kept my Xeons running at full speed.

  4. Task Scheduler & Services Cleanup: Removed any lurking NVIDIA background tasks.

  5. Disabled NVIDIA HD Audio: Prevented audio conflicts.

  6. Texture Filtering - Negative LOD Bias: Clamp: Reduced unnecessary GPU sharpening.

  7. Multi-display/mixed-GPU acceleration: Single Display Performance Mode: Simplified how the driver handled my four monitors.

  8. Threaded Optimisation: Off: Stopped the driver from scattering work across my 8 CPU cores.

While these steps collectively improved the system's responsiveness and reduced some background noise, the crucial nvlddmkm.sys DPC spikes during those AI queries persisted. The 30,000 µs monster was still there.

The Breakthrough: Maximum Pre-rendered Frames to "1"

After all those tweaks, the final, most impactful change came down to a single setting in the NVIDIA Control Panel:

Maximum Pre-rendered Frames: Set to 1

This seemingly small adjustment was the key to unlocking real-time performance on my vintage workstation.

Why "Maximum Pre-rendered Frames = 1" Fixed It:

  • Stopping the CPU from "Looking Ahead": By default, the NVIDIA driver tries to prepare multiple frames (often 3 or more) in advance to ensure smooth visuals. On a modern system, this is fine. On my xw8400, feeding two NVS 300 cards from a Front Side Bus (FSB), this "pre-rendering" was causing the CPU to get utterly swamped with graphics tasks. It was constantly buffering frames, delaying critical audio data.

  • Clearing the System Bus: When an AI query rapidly streams text and updates the screen, it demands a continuous flow of new frames. With a buffer of 3, the CPU was frantically trying to keep up, creating a massive traffic jam on the system bus. Setting it to 1 forces the CPU to prepare just one frame at a time, send it, and immediately move on. This dramatically reduces the amount of time nvlddmkm.sys holds onto the CPU, allowing the audio stream to flow uninterrupted.

  • The AI Query Trigger: The dynamic, text-streaming nature of AI interfaces specifically exposed this bottleneck. Each word appearing on screen triggered the intensive frame pre-rendering, leading directly to the clicks.

The Result: Silence at Last

After applying this change, the difference was immediate and profound. AI queries now run smoothly, the text streams without a hitch, and most importantly, the audio clicks and pops are gone! LatencyMon now shows nvlddmkm.sys behaving itself, with peak DPC times well within acceptable limits.

It turns out, for legacy hardware like the HP xw8400, the less "smart" your graphics driver tries to be with buffering and multi-threading, the better for real-time audio. Sometimes, the simplest solution is the most effective.

If you're battling similar audio latency issues on your older workstation, especially with NVIDIA cards, give that Maximum Pre-rendered Frames = 1 setting a try. It might just save your sanity!

Flood Risk Reports

No comments:

Post a Comment

If you leave question they will get answered! But no spam please I will delete it. :-(