Jump to content

Winbond/Nuvoton monitor


Slice
 Share

170 posts in this topic

Recommended Posts

20 minutes ago, vector sigma said:

probably is wrong. Your chip is actually treat as a nct676d. Slice said nct679bd but I found nothing about him other then this, where the guy is explaining that this is a nct676d is one of the developers of openhardwaremonitor which all those kexts (koxlek and vit9696 ones are based on).... so your doubt is founded, let see with a different association. 

 

The one thing I can say for certain is that the NCT9696D was already in the code and I only got a reading after you added the 2 devices IDs so it's certainly one of the ones you added.  I also saw that NCT9796D, NCT9798D, and NCT979BD each have 7 inputs according to your code.  Again I have been accused of having the IQ of an intelligent dog so I could be wrong.

 

The one thing I know for sure is that my board has 3X Fan connectors (one can be used for AIO) 2X LED connectors, and 1 Temperature probe that I would dearly love to use for water temperature readings.

 

By the way, where are the fan register addresses specified?  Are they specific to each board or the chip itself?

 

Thanks!

Link to comment
Share on other sites

1 hour ago, Modmike said:

The one thing I can say for certain is that the NCT9696D was already in the code and I only got a reading after you added the 2 devices IDs so it's certainly one of the ones you added.  I also saw that NCT9796D, NCT9798D, and NCT979BD each have 7 inputs according to your code.

Sorry but Nuvoton6XXXX.kext has nothing to do with W836x.kext and support more ids like the NCT610X series and NCT6797D.

1 hour ago, Modmike said:

 Again I have been accused of having the IQ of an intelligent dog so I could be wrong.

By who? I hope not by me. I think you just miss that you never see my code... just as anyone else --> see

And about your id in my code match this way:

case 0xD4:
      switch (revision & 0xF0) {
        case 0x23:
        case 0x2B:
          model = NCT6796D;
          break;

0xD423 and 0xD42B both breaks at NCT6796D, while NCT6798D break always at id 0xD4 but with different revision:

      case 0x28:
          model = NCT6798D;
          break;
      }

Mine is NCT5538D that is just a rebrand of NCT6791D made by Nuvoton for Asus, so what you think is a NCT679BD can be as well a rebrand of a NCT679x chip, which one appear not clear. So when I told you that is an nct6796d.. it's just because one of the masters of the original project wrote this. Thinking that this guy wrote once this in a PR on GitHub open the possibility that also him was wrong due to the fact the discussion was stopped and actually openhardwaremonitor doesn't still support your chip. Simply that.

 

P.S. having a greater id (looks logic) or name (total inaffidabile) but doesn't grant the chip is newer meant as technology used, for this we need the datasheet but google can't find a reference to that NCT679BD.

Edited by vector sigma
Link to comment
Share on other sites

2 hours ago, Slice said:

      switch (revision & 0xF0) {
        case 0x23:
        case 0x2B:
          model = NCT6796D;
          break;

revision & 0xF0 => 0x20

will never be 0x23, 0x28, 0x2B

You're right. I'm working to merge changes from Nuvoton6XXXX.kext to W836x.kext in a new fresh copy of the repository and I really mistakenly wrote the above just by hand. In the Nuvoton6XXXX.kext posted here is the following:

case 0xD4:
      switch (revision & 0xFF) {
        case 0x23:
        case 0x2B:
          model = NCT6796D;
          break;
        case 0x50:
          model = NCT6797D;
          break;
        case 0x28:
          model = NCT6798D;
          break;
      } break;

also because otherwise will not work also form me:

case 0xC8:
      switch (revision & 0xFF) {
        case 0x03:
          model = NCT6791D;
          break;
      } break;

thanks for the correction.

Edited by vector sigma
Link to comment
Share on other sites

@Slice @vector sigma  I added 4 sensors to VirtualSMC and they work perfectly.  Code was even merged.  Below is data for sensors that need to be added to FMC Sensors:

 

Nuvoton:                  Registers                                                            

NCT6795D 0xD352    0x4C0, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA

NCT6796D 0xD423    0x4C0, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CE

NCT6797D 0xD451    0x4C0, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CE

NCT6798D 0xD428    0x4C0, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CE

NCT679BD 0xD42B    0x4C0, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CE

 

ITE:

IT8668E 0x8688  Registers are already in your code

IT8795E 0x8795

 

A whole bunch of Z370, Z390, and X299 boards are working now. Do you guys want to add them? I can take a shot but I am more of a cut and paste guy, not a programmer.

Edited by Modmike
  • Like 1
Link to comment
Share on other sites

Thanks for the continuing hard work. It seems this is committed to the repository already. I'd like to know when the binaries would be available.

Link to comment
Share on other sites

6 hours ago, vector sigma said:

Guys try these for fans reading: 

FakeSMC.kext.zip

W836x.kext.zip

 

Nuvoton chips has fan control through NVRAM. To make it work you have to set a variable:


sudo nvram Fan1Ctrl='%41'

where Fan1Ctrl is for example my chassis fan and 41 is a hex value that means 65%. Cpu fan doesn't appear to change but others do.

 

 

I tried it, why only show the chassis fans, not the CPU fans

QQ20190415-115208@2x.png

Link to comment
Share on other sites

7 hours ago, fryysyd said:

I tried it, why only show the chassis fans, not the CPU fans

Who knows? Did you ever edited a valid confuguration for your motherboard? ... the default configuration can be not good for you, and has only 3 fans set (FANLIMIT = 3), and what if the CPU Fan is not at index 0?

Please post a ioreg dump made with IORegistryExplorer.app.

Edited by vector sigma
Link to comment
Share on other sites

1 hour ago, vector sigma said:

Who knows? Did you ever edited a valid confuguration for your motherboard? ... the default configuration can be not good for you, and has only 3 fans set (FANLIMIT = 3), and what if the CPU Fan is not at index 0?

Please post a ioreg dump made with IORegistryExplorer.app.

Please check it!

iMac 19,1.ioreg.zip

Link to comment
Share on other sites

3 hours ago, fryysyd said:

Sorry, I changed it, please check it again.

iMac 19,1.zip

Now is the right kext and I can see you have an NTC6793D. Looks like you have two working fans:

00 00 04 1f 00 00 00 00 06 86 00 00 ff ff ff ff

one at index 1 (1055 rpm) and one at index 4 (1670 rpm).

fans.png.e8e7a0b806de4b4cfbf4209676955169.png

You have to set FANINLIMIT = 5 to see the second fan, and give a name to FANIN4. 

 

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, vector sigma said:

Now is the right kext and I can see you have an NTC6793D. Looks like you have two working fans:


00 00 04 1f 00 00 00 00 06 86 00 00 ff ff ff ff

one at index 1 (1055 rpm) and one at index 4 (1670 rpm).

fans.png.e8e7a0b806de4b4cfbf4209676955169.png

You have to set FANINLIMIT = 5 to see the second fan, and give a name to FANIN4. 

 

In fact, there are a total of five fans. a CPU fan, a water pump fan, and three chassis fans, but currently only two are shown, can it be show all?

001.png

Edited by fryysyd
write wrong
Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
3 hours ago, losinka said:

@vector sigmahi! what is the difference between your Nuvoton6XXXX.kext and HWSensors by slice with integrated "nuvoTon NCT6796D"? Thank you.

Hi. Some differences as I ported latest changes from openhardwaremonitor but as I remembar kext you mentioned was just a try and in fact I created a "development" branch with latest changes.. and the most important one was how the IO space get unlocked at start up (or after wake) otherwise in some motherboard this prevent any read/write operation (like on mine and who knows how many others). Plus I've added some new chips and I made fans speed adjustable through nvram (PWM). This last may like or not...

PWM apart that require further changes to FakeSMC (so for this also any other plugin needs changes as well), the io-space-lock function can be ported easily directly into the W836xx.kext (trunk version) by registering him with the power management notifications... with out the need to modify the super class, i.e FakeSMC.

Unfortunately I have no time to work on, and as far I remembar was also difficult to have testers for the different chips, so time apart I've almost give up Lol.

Edited by vector sigma
  • Thanks 1
Link to comment
Share on other sites

@vector sigma what's the "latest and greatest"? :D

This: https://github.com/CloverHackyColor/FakeSMC3_with_plugins

Or this: 

 

EDIT: I installed everything using the second link and it's amazing that we can now set the fan speeds! I was actually finally able to localize which fan "ID" (FANIN0, FANIN1, ...) is which physical fan header on my motherboard:

 

FANIN0 = Front Fan Header

FANIN1 = CPU Fan Header

FANIN2-4 don't show up in HWMonitorSMC so I'm not sure. I'll update once I know more.

 

Other than that: you posted the Terminal command that you use to set a specific fan speed, but is there any easy way to observe the CPU (probably package) temperature in code? If so, I'd maybe try to work on a little application that lets you set custom fan curves within macOS :)

 

Dave

Edited by unixb0y
Link to comment
Share on other sites

  • 1 year later...

@vector sigma What's the status on the project? My fan readings are broken for some months now, not sure when it happened since I don't check fan speeds every day :D
 

log dump:

Spoiler

2020-12-09 13:45:31.245251+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: Dump Nuvoton registers:
2020-12-09 13:45:31.245729+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: - 100: ff
2020-12-09 13:45:31.246068+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: - 200: ff
2020-12-09 13:45:31.263260+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: - 300: ff
2020-12-09 13:45:31.263429+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  73: ff
2020-12-09 13:45:31.280307+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  75: ff
2020-12-09 13:45:31.280475+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  77: ff
2020-12-09 13:45:31.280645+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  79: ff
2020-12-09 13:45:31.332175+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  150: ff
2020-12-09 13:45:31.332197+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  670: ff
2020-12-09 13:45:31.332220+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  27: ff
2020-12-09 13:45:31.332249+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  20: ff
2020-12-09 13:45:31.332285+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  21: ff
2020-12-09 13:45:31.332322+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  23: ff
2020-12-09 13:45:31.332357+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: -  22: ff
2020-12-09 13:45:31.339504+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: found NCT6793D
2020-12-09 13:45:31.339508+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: [Warning] no OEMVendor
2020-12-09 13:45:31.339509+0100 0x73       Default     0x0                  0      0    kernel: (W836x) W836x: [Warning] set default configuration

 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...