none
AMD Turion X2 - amdk8.sys causing audio stutters

    Question

  • I have this very annoying issue with my AMD based laptop, a HP DV9750ed (Turion X2 2GHz, Tyler core), running a clean install of Windows 7 RTM. It has none of HP's bloatware installed, and i have developed some little apps of my own to replace HP's, such as a program to remap the QuickPlay launch keys to launch other applications, and modifications to the Conexant sound driver to enable microphone boost and a few other features. I didn't even think of going to HP for support as they were never really helpful.

    The issue i am facing is that the audio stutters about every 30 seconds. What intrigued me is that the DPC Latency Checker graph came out clean, but after messing around with the sound driver for a couple days i was convinced it was a DPC latency issue so i decided to dig deeper. I confirmed with Process Explorer that indeed DPCs were causing the stutter, then downloaded the Windows Performance Toolkit and analyzed the drivers that produced them. I narrowed it down to amdk8.sys, which will spike to over 60% CPU when the audio stutters. I do have some knowledge about drivers, as i said above i have modified the sound driver to enable extra features, but i really have no idea how to write a processor driver nor do i want to spend the rest of my month reading AMD technical docs.

    I am a music producer/DJ so audio is of paramount importance for me. I have another HP laptop (DV5-1120eh) running Windows 7 that does not have this issue, but its AMD CPU is based on the Griffin core.

    I am willing to install just about anything that might help you. I thought that CPU speed switching could be causing the stutters, but i have unloaded RMClock and set the power profile to High Performance with no luck. This pic clearly shows that the AMD CPU driver is responsible for the stutters. The DPC CPU usage sits at 0-1%, when it jumps to 3% stutters occur. Actually, it jumps to over 60% but it occurs so briefly that Process Explorer cannot detect it. The trace however shows a different story, a large spike can clearly be seen.

    http://img142.imageshack.us/img142/1883/amddpc.png

    Thursday, August 13, 2009 2:27 PM

Answers

  • Well, i will take some of that back since you DID help - you convinced me to dig even deeper. And i found it. It was the nVidia driver - when i switched to the Windows Classic theme there was no sound stutter, also, in resource-demanding games the sound was flawless.

    It ended up being the nVidia PowerMizer downclocking the GPU. With the Aero interface enabled it would keep toggling between low power 3D and performance 3D. When too many toggles would occur in a short amount of time = audio stutter. For now i have forced PowerMizer to disabled on AC power and had ZERO stutters since, and DPC CPU usage doesn't exceed 2% anymore, there are no more spikes. When i'm traveling with my laptop i only surf the web or game a bit, and i use my Meizu M6SL player for music. I'll be hacking around for a better solution, and i'll probably contact nVidia about it.

    Anyway i wonder if you people ever bother to read whole posts - i mentioned that i had modified my sound driver in the first post. And that ended up having nothing to do with the stutters.
    • Marked as answer by Th3_uN1Qu3 Monday, August 24, 2009 6:14 PM
    Monday, August 24, 2009 5:31 PM

All replies

  • Hi Th3_uN1Qu3,

    Perhaps, run the following from an elevated CMD prompt, and reboot:
      reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" -v DisablePagingExecutive -d 0x1 -t REG_DWORD -f

    Then, if you're not using a version of WPT later than 4.1.1, download and mount the Windows 7 RC1 SDK  ISO (or later) which contains xperf 4.5 (or later). The MSI for the Windows Performance Toolkit appears to be in the \Setup\WinSDKTools_amd64\cab1.cab file.  Install the the Windows Performance Toolkit from there, and then, from an elevated CMD prompt change to the folder containing xperf.exe and execute:
     xperf -on DiagEasy+PROFILE  -stackwalk Profile

    Then, just after reproducing the problem, run:
     xperf –d merged.etl  

    Then, ZIP merged.etl and password protect it.  Upload the ZIP file somewhere, and share the location either publicly or privately.  Share the password privately.  (My email address is in my profile.)

    Thursday, August 13, 2009 2:55 PM
  • My xperf version is 4.1.something so i think i have to update it. Hang on, i am downloading the SDK right now, it'll take about 20 minutes. I'll be back then with the info requested.
    Thursday, August 13, 2009 3:20 PM
  • Excuse my absence, i've been out for a drink (or two or three or five, thus excuse my incoherence if i start talking ____).

    I've installed the new version of the perf toolkit, ran the commands as you requested (i think i captured about three spikes) and threw a quick eye over the file myself. Now the spikes seem to blame another file, dxgkrnl.sys... Anyway i'll let you experts take care of it. Strangely it only appears on CPU 1, but even if i set the affinity of my audio apps on CPU 0 they will still stutter.

    File uploaded here: http://www.mediafire.com/download.php?dinmmtg2ycm and the pass has been emailed to you. I'll be leaving tomorrow for about 3 days and i won't have my laptop with me, thus if there's anything happen in the process i won't be able to answer it. Cya then.
    Thursday, August 13, 2009 11:04 PM
  • Do you have Alcohol / Daemon Tools installed?
    Monday, August 17, 2009 1:45 PM
  • Yes i do, i have Alcohol 120%. Should i try removing it?
    Tuesday, August 18, 2009 12:08 AM
  • Yes.  Remove it, and after uninstallation ensure STPD.SYS is not loading.  (Rename it, perhaps from Safe Mode if necessary.)

    I've seen this behavior attributable to DT before...
    Tuesday, August 18, 2009 12:55 AM
  • Alright, i will. What's interesting is that my other laptop also has Alcohol 120% installed and it has no audio troubles. In any case i'll be back home tomorrow, i'll disable the SPTD driver and will be back with the results.
    Wednesday, August 19, 2009 3:26 PM
  • Not sure what specifically it is that triggers the behavior on a particular system, but in a couple of cases removing DT has caused the described behavior to cease.
    Wednesday, August 19, 2009 4:36 PM
  • Unfortunately not in my case... I'm still getting the exact same issue. Alcohol has been uninstalled and SPTD.SYS is not present in any system folders. Any other ideas?

    Friday, August 21, 2009 6:40 PM
  • With sptd.sys removed, can you procure and provide another xperf trace?
    Friday, August 21, 2009 7:04 PM
  • There you go: http://www.mediafire.com/download.php?5ceyzmg0day

    It's interesting that uninstallation of SPTD (i used the uninstaller on the company's page) caused Process Explorer's DPC window to be even less accurate. Also, now i've noticed a spike on the other core as well, which didn't happen before. Btw, only the three larger spikes caused audible stutters, the other ones did not.

    Still, the trace still points to dxgkrnl.sys.

    Saturday, August 22, 2009 12:25 PM
  • What's the MD5 of dxgkrnl.sys?  Where did you get the RTM build from?  Does e.g. sigcheck indicate the file is signed?
    Monday, August 24, 2009 12:47 AM
  • I won't lie - i got the RTM from a private torrent tracker. I'm waiting for the retail version to come out so i can buy a disc. Again, i have the same version installed on another laptop and it doesn't exhibit any of those issues. But its hardware is a bit different (newer CPU core, ATi instead of nVidia and IDT audio instead of Conexant).

    Sigcheck says that dxgkrnl.sys is signed, and its md5 is 57810db6308702ddd8424d71fd3ed3dd .
    Monday, August 24, 2009 11:21 AM
  • FWIW, the binaries you're running are not the same as the "official" RTM.

    This explains why public symbols are not available for the xperf traces you provided; that makes it difficult to interpret the results.  Ultimately, it's (obviously) a hardware or driver issue, likely related to audio or video drivers or hardware, or firmware.
    • Proposed as answer by No.Compromise Monday, August 24, 2009 12:46 PM
    Monday, August 24, 2009 11:44 AM
  • I have the official Win 7 symbols downloaded from Microsoft's site and they work fine here. If i don't check "Load Symbols" in the Performance Analyzer i get only "function name" and some hex codes for every function, after i check "Load Symbols" i get the file names. Or are you talking about a different symbol set?

    You don't have to tell me it's a driver issue, i already knew that. I just need to know how to fix it. Before you ask, yes, all my drivers are up to date, BIOS too. Now, when Win 7 comes out retail and i go buy a disc and experience the same issues with it, will you be more helpful?

    Monday, August 24, 2009 3:34 PM
  • Are you telling me I've not been helpful? I've at least tried.  I tried for a rather substantial amount of time to get symbols to resolve for your traces, and scratched my head quite a bit only to find you're using a build for which public symbols are not available. x_X

    The file identifiers the symbol engine was looking for do not exist on the public symbol server.

    xperf on your system has access to the binaries on your system, a luxury I do not have since I'm running the official RTM.  Presumably, this contributes to the reason you are able to see function names - export symbols from the involved modules may be being used. 

    I can't say that having access to public symbols for the modules involved will be the magical component.  But given that dxgkrnl.sys is the module where the CPU time is being spent, it points at the drivers OR the hardware.  Not necessarily the hardware components / models in general, but perhaps the specific pieces of hardware on the affected system.  Or, maybe it's a BIOS issue or a firmware issue.  Less likely, but still possible, is a DirectX bug.

    BTW - did you modify the audio drivers at all?
    Monday, August 24, 2009 3:48 PM
  • Well, i will take some of that back since you DID help - you convinced me to dig even deeper. And i found it. It was the nVidia driver - when i switched to the Windows Classic theme there was no sound stutter, also, in resource-demanding games the sound was flawless.

    It ended up being the nVidia PowerMizer downclocking the GPU. With the Aero interface enabled it would keep toggling between low power 3D and performance 3D. When too many toggles would occur in a short amount of time = audio stutter. For now i have forced PowerMizer to disabled on AC power and had ZERO stutters since, and DPC CPU usage doesn't exceed 2% anymore, there are no more spikes. When i'm traveling with my laptop i only surf the web or game a bit, and i use my Meizu M6SL player for music. I'll be hacking around for a better solution, and i'll probably contact nVidia about it.

    Anyway i wonder if you people ever bother to read whole posts - i mentioned that i had modified my sound driver in the first post. And that ended up having nothing to do with the stutters.
    • Marked as answer by Th3_uN1Qu3 Monday, August 24, 2009 6:14 PM
    Monday, August 24, 2009 5:31 PM
  • Who are "you people"?  x_X

    OK, so "modify" is perhaps an ambiguous term, as in your first post you indicated "and modifications to the Conexant sound driver to enable microphone boost and a few other features. "  When I read this 1.5+ weeks ago, I interpreted your statement as being "I changed some settings in the configuration applet provided by the manufacturer of the drivers".

    And by "BTW - did you modify the audio drivers at all? " I was essentially trying to ask "did you patch the driver binaries in some fashion, such as by direct or indirect editing of the executable code in the image ?"  An unfortunate collision of interpretable meanings of the term "modify".  And I would hope that with that clarification it would seem reasonable for one to attempt to make some connection between the act of patching the audio driver code, and the referenced stuttering, regardless of the ultimate finding.


    In the end, you have identified what was causing the problem and have a workaround for it, and I suppose that is all that matters.  Thank you for sharing your findings.
    Monday, August 24, 2009 6:35 PM