You do understand that CPU-Z should be showing 4000mhz, regardless of what is running on the PC, when High Performance Mode is enabled, correct?
It's still important to actually load the CPU 100% (ideally all cores) with Prime or an x264 encode when testing load CPU freqs as there are other factors that kick in when idle such as C3/C6 states / cores "parking" / gating down (in addition to SpeedStep). It's also good practice when experiencing problems to test in several measuring apps (TMonitor / HWInfo, etc) just to rule out any compatibility issues / obscure version specific bugs with any one single monitoring software. There's also no real measurable performance advantage of "High Perf" over "Balanced" (it won't run games, etc, measurably faster). There used to be a case for disabling Speedstep (and AMD's "Cool & Quiet") years ago when it was in its infancy and the frequency switching latency was high (the mobile P3 / P4 era), but these days on modern chips it's pointless.
Just a quick question - have you tried creating your own custom power profile (Control Panel -> Power Options -> Create a Power Plan) based on the default Balanced mode and make sure Max Processor State is 100% then run Prime in the background and simultaneously see what the freq is (ideally in 2 or 3 monitoring apps, eg, Coretemp, TMonitor, HWInfo, etc)? Just to rule out corrupted powercfg registry presets?
Likewise have you tested CPU freq outside of your current Windows environment (eg, booting a Live diagnostic CD or installing Win 7 on a spare HDD with minimal chipset & GFX drivers)? If it shows the same problem outside of your current Windows environment / on a reinstalled Windows, then it sounds more like a recently developed hardware issue than software.
My computer just made a weird straining sound when I turned it on, and then it powered itself off, and then powered back on again and started normally.
Edit : How often does that happen? That sounds like a PSU / motherboard issue. May well be hardware related.