It is currently Sun Apr 28, 2024 11:32 am


CPU Spikes to Red Causing Intermittent Audio Artifacts

Hauptwerk software technical support only. Please make sure you have read the manual, tutorials and FAQ pages before requesting support.
  • Author
  • Message
Offline

chrisdfrith

Member

  • Posts: 62
  • Joined: Fri May 24, 2013 9:22 pm
  • Location: Mesa, AZ

CPU Spikes to Red Causing Intermittent Audio Artifacts

PostSun Sep 04, 2022 10:35 am

I have been running HW 7 on a Windows PC since shortly after it was released. All was stable. Recently, I made changes to my audio profile:
- changed from six stereo pairs to 12 mono channels
- changed the audio processing engine and tremulant/wind supply, etc. to HIGH

I'm running Windows 10 and have made sure it has all the updates current. Sysmain remains off, etc. I went through most of the glitch free document to confirm nothing had changed on my Windows 10 setup. All good.

Audio buffers are set to 2048 size and 3 buffers. I have not changed this from my previous setting. I did experiment with moving both settings to the max size/number and it had no effect on the CPU spikes in HW7

When I monitor the CPU via Windows, the CPU spikes do not show up there. Only in the HW7. I loaded all of my sample sets, the CPU spikes show up even with one of my sample sets still using the previous configuration with six stereo pairs and medium settings for audio processing engine and tremulant/wind supply, etc.

I need some help to sort this out please.

Thank you!

Chris
Offline

Roglu

Member

  • Posts: 31
  • Joined: Tue Sep 07, 2021 1:01 am

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostSun Sep 04, 2022 11:01 am

Offline
User avatar

mdyde

Moderator

  • Posts: 15481
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostSun Sep 04, 2022 12:10 pm

Hello Chris,

chrisdfrith wrote:- changed from six stereo pairs to 12 mono channels


In itself that shouldn't make a significant difference to performance.

chrisdfrith wrote:- changed the audio processing engine and tremulant/wind supply, etc. to HIGH


Both of those settings will affect performance, especially the former with regard to the polyphony that the CPU can achieve before overloading and an audio glitch resulting.

chrisdfrith wrote:Audio buffers are set to 2048 size and 3 buffers. I have not changed this from my previous setting. I did experiment with moving both settings to the max size/number and it had no effect on the CPU spikes in HW7


I'd suggest:

- Make sure that the latest driver and firmware updates are installed for your audio interface, and for your PC's motherboard/BIOS.
- On the 'General settings | Audio device and channels' screen in Hauptwerk, make sure that the manufacturer-supplied ASIO driver is selected (as opposed to a DirectSound driver, or a third-party driver).
- Set the number of audio buffers to 1. (You shouldn't need more than 1 for a properly-performing ASIO driver, and more than 1 might actually make performance worse in that case.)
- Set the buffer size to 1024 and the sample rate to 48 kHz, which should be a safe values.
- Load St. Anne's.
- On 'Organ settings | Organ preferences' set the audio engine processing quality to 'High', and the tremulant/wind supply model quality setting to 'Medium'. Any reasonably modern PC should be able to handle those values easily for St. Anne's.

Do you then still get the audio glitches? If you do, please also try:

- Make sure that no other applications are running.
- Start Resplendence LatencyMon ( https://resplendence.com/latencymon ) running.
- Launch Hauptwerk and load St. Anne's.
- See whether LatencyMon reports and problems with real-time audio when the glitches occur. If so, it may give a strong clue as to their source.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline

chrisdfrith

Member

  • Posts: 62
  • Joined: Fri May 24, 2013 9:22 pm
  • Location: Mesa, AZ

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 12:16 pm

Hi Martin,

Many thanks for your reply. I followed your instructions. Here is what I did:
- I ensured HW7 is using the MOTU Audio driver; it is latest from MOTU; MOTU device is flashed with current release
- I downloaded and installed LatencyMon
- I flashed the PC BIOS to most current (11/2021)
- I loaded St Anne's with the setting buffer of 1 and 1024 size
- set Audio to HIGH
- set wind, trem, etc. to MEDIUM

With LatencyMon running, that app shows I should be fine. But, now the CPU pegs all the way to the red and stays there. I have a screen capture I can share. Audio is beyond distorted. I also noticed drive light flashing non-stop when organ is loaded which is not usual.

My PC has AMD Ryzen™ Threadripper™ 2920X Processor with 128 GB RAM. I don't believe HW is running out of resources. Something has changed that I cannot identify.
Offline
User avatar

mdyde

Moderator

  • Posts: 15481
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 12:34 pm

Thanks, Chris.

chrisdfrith wrote: I also noticed drive light flashing non-stop when organ is loaded which is not usual.


Presumably Windows (or something else running on your PC apart from Hauptwerk) is currently doing something intensively in the background. I'd suggest:

- Make sure the drive isn't (nearly) full.
- Check for and install any available Windows updates, then reboot after installing them. (Maybe Windows is downloading or installing something in the background.)
- Make sure that Windows drive indexing is disabled for all drives. See the "Performance tuning: Other operating system and computer optimizations and diagnostics" section in the main Hauptwerk user guide (pages 308-310 in the current v7.0 version).
- Also make sure that Sysmain/Superfetch is disabled (also covered in those instructions).
- Reboot after doing any of the above.

If the above don't solve it, look in Windows Task Manager (Ctrl+Alt+Del) to see which process(es) apart from Hauptwerk might be using the drive or CPU significantly.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline

chrisdfrith

Member

  • Posts: 62
  • Joined: Fri May 24, 2013 9:22 pm
  • Location: Mesa, AZ

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 12:51 pm

Many thanks to HW user Roglu!

I followed the instructions in the YouTube posted and there are no more CPU spikes! Any idea if this will get addressed eventually?

Thank you again Roglu!!!

Chris
Offline
User avatar

mdyde

Moderator

  • Posts: 15481
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 1:23 pm

Hello Chris,

There is something very weird going on the PC of the person who posted that video (and presumably also yours, if the same thing seems to resolve it temporarily) -- It certainly isn't normal.

Windows should already have allowed Hauptwerk access to all of the available CPU cores (i.e. launched it with processor affinity set for all cores), and it normally does. Hauptwerk creates audio engine threads for the available CPU cores and tells Windows to put them on distinct cores. My guess is that Windows isn't actually putting them on the requested cores on his/your PC for some reason (probably known only to Microsoft!) whereas simply opening and OKing Windows' processor affinity dialogue box is causing something to get updated within Windows, causing it eventually to put the threads on the cores that Hauptwerk told it to put them on.

In my experience it often takes a small number of seconds for Windows to move threads to the requested cores, but I've never seen it take more than about 10 seconds. "General settings | General preferences | Advanced ... | Extra time to allow when starting audio on Windows if not running at real-time priority" is there for that purpose, so as to avoid any audio glitches being heard whilst Windows moves the threads to their requested cores.

Try ticking the "Try to run Hauptwerk at real-time priority" preference there, the re-launch Hauptwerk "as Administrator" (which allows it to run at real-time priority) by right-click on the Hauptwerk icon. In my experience Windows does appear to put threads on the requested CPU cores immediately in that case. Does that solve it?

Either way, something (apart from Hauptwerk -- probably something in your Windows installation) must have changed on your PC if that work-around is necessary now, but wasn't before.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline
User avatar

mdyde

Moderator

  • Posts: 15481
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 1:33 pm

P.S. Given that you mention that the drive activity indicator LED is showing lots of activity, do also try looking in Task Manager to see what other processes might be doing things in the background. Maybe something else intensive is running, e.g. causing Windows to delay moving Hauptwerk's threads to the correct cores. Check the other things I mentioned too (drive indexing disabled, etc.).
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline

chrisdfrith

Member

  • Posts: 62
  • Joined: Fri May 24, 2013 9:22 pm
  • Location: Mesa, AZ

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 3:42 pm

Hi Martin,

I went into "General settings | General preferences | Advanced ... | Extra time to allow when starting audio on Windows if not running at real-time priority" and ticked the box for "Try to run Hauptwerk at real-time priority." I then exited HW and started by right-clicking the HW icon and selecting Run as Administrator. I then loaded a sample set that uses one of the other audio profiles I've set up as stereo pairs. I then played a pre-recorded MIDI file so I could observe the CPU monitor. While the spikes were lower going into only the yellow, they were still quite frequent. None caused an audio artifact like going into the red does. I then executed the steps in the YouTube posted by user Roglu. Voila! The CPU went back to down to no or one green bar and never raised above that for the reminder of the song.

It seems something between Windows and AMD processors? I'm not sure why it just showed up on my PC recently as it seems HW user Roglu posted his YouTube video this past February. So clearly he'd seen it much earlier than me. I download and install the Windows updates on the PC that runs HW regularly - every couple weeks or so.

Also, once I execute the steps in that video, the drive light activity returns to normal as well. Really weird. Happy to work with you on diagnostics if you like to get to the bottom of the issue so we can get it sorted more permanently. As always Martin, I am so grateful for your stellar support of HW!!! I have no idea what we'd do without you!

Chris
Offline
User avatar

mdyde

Moderator

  • Posts: 15481
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostTue Sep 06, 2022 4:00 pm

Hello Chris,

Have you already disabled all CPU power-saving features in the BIOS and Windows? Roglu's previous problem appeared to be due his CPU speed dropping to a very low value:

viewtopic.php?f=16&t=20523&p=153755#p153748

viewtopic.php?f=4&t=20524#p153705

evertjan wrote:The reported CPU speed in the PDF is 360 MHz. Base speed of the AMD 3700X is 3.6 GHz
That means that the processor runs on a variable speed.

Disable in the BIOS the AMD Precision Boost (X-Boost) and AMD Cool N Quiet, which mostly can be found in the menu Overclocking' or 'Advanced CPU settings'.

In Windows, press the Windows key + R and type powercfg.cpl
Select High Performance


mdyde wrote:If you do still occasionally get audio glitches on your PC, even after changing the settings that Evertjan mentioned, then I'd suggest first making absolutely certain that your CPU speed is indeed staying always constant, irrespective of which sample set you're using (and of how intensively you're using it). E.g. press Ctrl+Alt+Del and open Task Manager, then click on its Performance tab, then watch the 'CPU' speed indicator:

CPUSpeedInTaskManager.jpg


If that changes, and especially if it drops to a low value, then you need to do some further tweaking to prevent that happening, otherwise you're likely to get audio glitches. E.g. in Windows Control Panel's Power Options, make sure that the 'High performance' plan is selected, then click on the 'Change plan settings' button for the 'High performance' plan, then click 'Change advanced settings', expand the 'Processor power management' node, and set both the Minimum and Maximum 'Plugged in' settings to the same value:

WinProcessorSpeedSettings.jpg


... then click Apply/OK. (I find that 70% is the highest I can use reliably on my computer, otherwise it will drop the CPU speed anyway due to temperature, but yours may be different.)


Please try those things, if you haven't already. It's very important that your CPU's speed doesn't drop, otherwise audio/performance problems are very likely.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline

lemmeling

Member

  • Posts: 57
  • Joined: Fri Dec 13, 2019 10:30 am

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostThu Sep 08, 2022 9:51 am

Chris,

Could you check in your bios settings if there is an option called security trusted computing and/or AMD ftpM Switch.

If so try setting both to disabled.

You can check in Windows too if these options are off because Windows 10 will then tell you that your pc does not have the system requirements to run Windows 11.

This you can see in the Windows Update.

Hopefully this helps,

Cheers,

Laurens
Offline

mnailor

Member

  • Posts: 1614
  • Joined: Sat Nov 30, 2013 5:57 pm
  • Location: Atlanta, GA

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostThu Sep 08, 2022 10:08 am

lemmeling wrote:Chris,

Could you check in your bios settings if there is an option called security trusted computing and/or AMD ftpM Switch.

If so try setting both to disabled.

You can check in Windows too if these options are off because Windows 10 will then tell you that your pc does not have the system requirements to run Windows 11.

This you can see in the Windows Update.

Hopefully this helps,

Cheers,

Laurens


In case fTPM is on, if Windows 11, you may have to carefully remove disk encryption before you can disable fTPM safely. That AMD bug does sound like the symptoms, but I thought a BIOS fix was supposed to be available by now.
Offline

lemmeling

Member

  • Posts: 57
  • Joined: Fri Dec 13, 2019 10:30 am

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostThu Sep 08, 2022 10:20 am

Chris somewhere mentioned that he updated to the latest bios, and it dated from 2021...
The bug was only recently fixed in May/June with the latest Agesa version.

So I think the bugfix is not included in his firmware if the latest version dates from 2021.

Cheers,

Laurens
Offline

lemmeling

Member

  • Posts: 57
  • Joined: Fri Dec 13, 2019 10:30 am

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostThu Sep 08, 2022 12:32 pm

Chris,

If everything mentioned before doesn't solve your problems, I would like to ask you to test something if you want.

You mentioned you have 128 GB of RAM, I have the same. I suppose it's 4x32GB.

Try following:

In Windows, click SEARCH, type MEMORY and run the Microsoft Memory Diagnostic Tool.
Your computer needs to restart.
Watch the Status closely.
If somewhere it says HARDWARE PROBLEMS WERE DETECTED, stop the test, take out all the memory and place 1 RAM stick at a time on your motherboard and test each stick with the same tool seperately.

Seperate the sticks that have no errors from the one(s) that have errors and try your Hauptwerk with only those sticks that reported 0 errors to see if the problems persist.

Cheers

Laurens
Offline

chrisdfrith

Member

  • Posts: 62
  • Joined: Fri May 24, 2013 9:22 pm
  • Location: Mesa, AZ

Re: CPU Spikes to Red Causing Intermittent Audio Artifacts

PostThu Sep 08, 2022 4:33 pm

Hi Martin and all assisting here,

Here is what I did so far:
- I disabled the AMD Precision Boost and Cool N Quiet in the BIOS and rebooted and fired-up St Anne's. CPU immediately spikes into the red. CPU monitor from Windows shows CPU moving between 12% and 14% - never dipping below 12%

- I then set the above-noted parameters back to enabled and disabled Trusted Computing and AMD ftpM. I then fired up St Anne's. Same result as above. CPU immediately spikes into the red. CPU monitor from Windows shows moving between 12% and 14% - never dipping below 12%

- I then disabled AMD Precision Boost, Cool N Quiet, Trusted Computing, and AMD ftpM - all four parameters together. I then fired up St Anne's. Same result as above. CPU immediately spikes into the red. CPU monitor from Windows shows moving between 12% and 14% - never dipping below 12%

- I then reset the BIOS parameters back to default and rebooted. I fired up St Anne's and followed the steps in Rogulu's YouTube and CPU goes back to 0 and stays at 0 or first green bar and never moves above until next time I reboot and reload an organ.

I am currently running the Windows memory test. It is taking a long time to work through the 128 GB RAM. I will advise if it shows an error.

Many thanks to all who are assisting here to troubleshoot this odd problem that seemingly came out of no where on what has otherwise been a very stable Windows PC platform for Hauptwerk for the past two years.

Chris
Next

Return to Technical support

Who is online

Users browsing this forum: No registered users and 2 guests