trulyspinach / SMCAMDProcessor

Power management, monitoring and VirtualSMC plugin for AMD processors
BSD 3-Clause "New" or "Revised" License
1.04k stars 90 forks source link

No Frequency graph data #4

Closed RTHPJM closed 4 years ago

RTHPJM commented 4 years ago

Hi trulyspinach,

Thanks for your work. It looks to be really promising.

I have installed v0.2 on my build (3900X with ASUS TUF Gaming X570-Plus (WiFi), OpenCore 0.5.5)

I'm not getting any Frequency graph data.

Screenshot 2020-02-26 at 16 46 06

trulyspinach commented 4 years ago

Which OS version you are running?

RTHPJM commented 4 years ago

Hello trulyspinach,

I am running 10.15.3 Catalina.

It might be BIOS related. I’ve used the built in over clocking tuner, everything on auto but target cpu frequency raised to 4.2GHz. During one of the reboots, I saw the frequency graph, but only once (and I forgot to record which settings were in use!).

The kernel log (dmesg) appears to be reporting the client is sending NAN to the graph. I will add the actual log entry here in a shorttime...

RTHPJM commented 4 years ago

error 09:49:28.341320+0000 AMD Power Gadget CGPathCloseSubpath: no current point.

error 09:49:28.341332+0000 AMD Power Gadget Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.

error 09:49:28.341345+0000 AMD Power Gadget If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable.

RTHPJM commented 4 years ago

I am happy to help debug. Jus let me know if there is any information you need.

trulyspinach commented 4 years ago

Hi! Those warnings should be fine. It is some minor bugs that appears on my end as well. Only in the first frame, tho. As you have mentioned, it is likely cause by that your frequency are maintained constant.

RTHPJM commented 4 years ago

Also default 08:56:39.166779+0000 kernel AMDCPUSupportUserClient::externalMethod selector:4

yurkins commented 4 years ago

I fixed this on my overclocked ryzentosh 3950x :) On overclocked CPUs with a constant frequency the "let dataDiff = dataMax - dataMin" is 0 and later are division by 0 and NaN as result. Small fix "let dataDiff = max(dataMax - dataMin, 1)" @trulyspinach please add this small fix in GraphView.swift(3 places) https://i.imgur.com/SL1U1GU.png

RTHPJM commented 4 years ago

Confirmed.

Setting the BIOS Tweaker target clk to AUTO gives varying frequency data, correctly plotted by APG

200228110455

Screenshot 2020-02-28 at 11 02 46

Setting to a fixed target speed results in NaN

200228110547

Thanks @yurkins, your suggested mods look good. I guess the output becomes a flat line at the max clock speed. Useful visual information too!

trulyspinach commented 4 years ago

@yurkins @RTHPJM Many thanks 🥇 I will add this into the source code!