Jump to content

Winbond/Nuvoton monitor


Slice
 Share

170 posts in this topic

Recommended Posts

On 3/13/2019 at 1:34 PM, vector sigma said:

Hi and good day to you too!

Sir, to tell you the truth I don't even understand if modified kext is working or not for you. Anyway your Nuvoton chip NCT6798D is so similar to the NCT6796D already supported by the W836x.kext. In fact is the same chip with id 0xD4 but with revision 0x28 instead of 0x23:

 


	NCT6796D   = 0xD423,
  	NCT6798D   = 0xD428

..so should be easy to make the kext give at least sign of life... 

 

I also have an Asus Z390-I with the NCT6798D.  I used the following kexts:

 

FakeSMC.kext

W836x.kext

IntelCPUMonitor.kext

 

The fan RPM is always 16,383 which is obviously wrong.  I checked the dump and saw this:

 

key: F0Ac, size: 02, type: fpe2, attr: 00, value: <fffc>

key: F1Ac, size: 02, type: fpe2, attr: 00, value: <fffc>

key: F2Ac, size: 02, type: fpe2, attr: 00, value: <fffc>

 

So all the keys are wrong.  What do I need to do?

 

 

dump.zip

Edited by Modmike
Link to comment
Share on other sites

19 minutes ago, Modmike said:

 

I also have an Asus Z390-I with the NCT6798D.  I used the following kexts:

 

FakeSMC.kext

W836x.kext

IntelCPUMonitor.kext

IntelCPUMonitor.kext

 

The fan RPM is always 16,383 which is obviously wrong.  What do I need to do?

 

Same, unfortunately no solution yet :(

Link to comment
Share on other sites

On 3/10/2019 at 5:22 AM, vector sigma said:

:), this explain why nothing happened. Could you please try, anyway, FakeSMC.kext + IntelCPUMonitor.kext + W836x.kext attached just for testing purpose as I working on it :D?

FakeSMC.kext.zip

IntelCPUMonitor.kext.zip

W836x.kext.zip

 

To do that you have to take away temporarily VirtualSMC.kext, SMCSuperIO.kext and SMCProcessor.kext.

 

P.S. using a USB pen drive

Thanks

 

Tried this and no fans at all.  Please find dump attached.

 

 

 

Edited by Modmike
Link to comment
Share on other sites

@slice Looks like the line went dead in this thread which is a crying shame.  I believe you were involved with the develelopment., correct?  Or wrong Slice?

 

If you can help can you check the post above?  I edited the HWMontiorSMC2 info.plist but that only changes names it seems.   I also took a crack at the w83x.kext info.plist but still no fan.

 

Are those even valid approaches?  Don't the memory registers have to be properly mapped for the NCT6798D?  If so how can I do this, a custom SSDT?

 

So close yet so far.....

 

Thanks!

Edited by Modmike
Link to comment
Share on other sites

On 3/21/2019 at 11:13 AM, Slice said:

Did you test a kext from my previous post at December 14, 2017?

What do you see in kernel.log?

 

Your kext didn't work FYI

Link to comment
Share on other sites

9 hours ago, unixb0y said:

 

Your kext didn't work FYI

Add boot arguments msgbuf=1048576

and after system started do command in terminal

sudo dmesg > ~/Desktop/dmesg.txt 

Link to comment
Share on other sites

On 3/31/2019 at 2:18 AM, Modmike said:

 

File attached but noticed this:

 

W836x: [Warning] found unsupported chip ID=0xd4 REVISION=0x2b

 

dmesg.txt

OK, this is the answer.

Currently kext supported

NCT6796D   = 0xD423,
NCT6798D   = 0xD428

You have to add one more chip definition

NCT679bD = 0xD42b

I can do this today evening if nodody will do this before me.

 

Link to comment
Share on other sites

1 hour ago, Slice said:

Test, please v1.3.1

W836x.kext.zip

 

 

dmesg.txt

 

I think you are close because I am getting much more info than before, like CPU core frequencies and Board info.  Unfortunately,the fans are stuck at a crazy static RPM:

 

168749055_ScreenShot2019-04-01at1_00_00PM.png.5ec27130d08651aabbff2a43f0c142fc.png

 

Does this Linux NCT6798D support patch and comment help at all?

 

NCT6798D is, with the exception of fan and pwm channel configuration registers, similar to other chips of the series. One interesting difference is the chip ID, which is now extended to 13 bit (the 12-bit chip ID value overlaps with the chip ID of NCT6797D).

 

@@ -44,8 +44,8 @@
  * nct6796d    14      7       7       2+6    0xd420 0xc1    0x5ca3
  * nct6797d    14      7       7       2+6    0xd450 0xc1    0x5ca3
  *                                           (0xd451)
- * nct6798d    14      7       7       2+6    0xd458 0xc1    0x5ca3
- *                                           (0xd459)
+ * nct6798d    14      7       7       2+6    0xd428 0xc1    0x5ca3
+ *                                           (0xd429)
  *
  * #temp lists the number of monitored temperature sources (first value) plus
  * the number of directly connectable temperature sensors (second value).
@@ -138,7 +138,7 @@ MODULE_PARM_DESC(fan_debounce, "Enable debouncing for fan RPM signal");
 #define SIO_NCT6795_ID        0xd350
 #define SIO_NCT6796_ID        0xd420
 #define SIO_NCT6797_ID        0xd450
-#define SIO_NCT6798_ID        0xd458
+#define SIO_NCT6798_ID        0xd428
 #define SIO_ID_MASK        0xFFF8
 

Code came from here.

 

Edited by Modmike
Link to comment
Share on other sites

2 hours ago, Modmike said:

I was just playing with Virtual SMC and deleted everything.  What other files do I need in Kexts and drivers?  Will test immediately.

You need to delete VirtualSMC and use FakeSMC v3.5.1 instead.

 

@Modmike

Look carefully about info.plist of the kext.

  • Like 1
Link to comment
Share on other sites

@Slice I've found some days ago,finally, a motherboard with a NCT6791D, but there's a problem in those chips due to the IO mapping not enabled and voltages and Fans cannot be read if not enabled. Found the solution just taking a look at nct6775.c (linux) and openhardwaremonitor. At the and of the probePort() add the code of this function I use successfully:
 

void Nuvoton::disableIOSpaceLock()
{
  
  switch (model) {
    case NCT6791D:
    case NCT6792D:
    case NCT6793D:
    case NCT6795D:
    case NCT6796D:
    case NCT6797D:
    case NCT6798D: break;
    default:       return;
  }
  
  UInt8 val = listenPortByte(REG_ENABLE);
  if (!(val & 0x01)) {
    InfoLog("Activating device");
    outb(registerPort, REG_ENABLE);
    outb(registerPort + 1, val | 0x01);
  } else {
    InfoLog("Device is activated already");
  }
  
  
  val = listenPortByte(IO_SPACE_LOCK);
  // if the i/o space lock is enabled
  if ((val & 0x10) > 0) {
    InfoLog("Disabling IO space lock");
    // disable the i/o space lock
    outb(registerPort, IO_SPACE_LOCK);
    outb(registerPort + 1, val & ~0x10);
  } else {
    InfoLog("IO space unlocked already");
  }
  logAddresses();
}

where REG_ENABLE = 0x30 and IO_SPACE_LOCK = 0x28 :-)

 

Link to comment
Share on other sites

@unixb0y, @Modmike or anyone interested in, try this new test kext:

Nuvoton6XXXX.kext.zip

 

use only with this: FakeSMC.kext.zip

 

optional: IntelCPUMonitor.kext.zip

 

 

please use only with the FakeSMC.kext attached otherwise will not load. IntelCPUMonitor.kext has small changes, but it also require this FakeSMC to work and is only for my testing purpose since Nuvoton6XXXX.kext is not just as W836x.kext.

WARNING: to do this test remove any other FakeSMC.kext's plugins otherwise an easy kp will appear during the boot. Recommended to use clover in a USB stick to boot with these kexts inject by him. 

NEW:

Nuvoton6XXXX.kext dump all the registers in the ioreg, so don't esitate to post it.

  • Like 1
Link to comment
Share on other sites

Well guys:

 

tenor-171908022.gif.9d16823fa779a6098455d989236e67a2.gif

 

1753592574_ScreenShot2019-04-01at6_04_06PM.png.5b4d5027158d4c2a5ed63395a9d09b8d.png

 

My board has:

 

1 x CPU Fan connector(s) 
1 x Chassis Fan connector(s) 
1 x AIO_PUMP connector 

1 x Thermal sensor connector(s)

 

I only see the 2 fans, is there a way to configure that?

 

Thank you all so much for your diligence!!!!

 

  • Like 1
Link to comment
Share on other sites

1 minute ago, Modmike said:

Well guys:

 

tenor-171908022.gif.9d16823fa779a6098455d989236e67a2.gif

 

Thanks :thumbsup_anim:

2 minutes ago, Modmike said:

My board has:

 

1 x CPU Fan connector(s) 
1 x Chassis Fan connector(s) 
1 x AIO_PUMP connector 

1 x Thermal sensor connector(s)

 

I only see the 2 fans, is there a way to configure that?

 

Thank you all so much for your diligence!!!!

You have to take a look at the Info.plist of the kext and make your custom configuration. Almost everything is configurable. 

P.S. you only see two fans because you are using my configuration where only two fans are set. And voltages are adjustable ... but this require a work from you, firstly please post a ioreg..I'm impatient to see the dump of the registers ..just like opehardwaremonitor do in windows :D

Link to comment
Share on other sites

4 minutes ago, Modmike said:

Which info.plist do I need to edit?

Nuvoton6XXXX.kext/Contents/Info.plist -> IOKitPersonalities -> Nuvoton 6XXX Monitor Plugin -> Sensors Configuration -> Default or add your. That's why I ask for a ioreg.

See you here is 00:50 AM ...need to sleep..

Link to comment
Share on other sites

6 minutes ago, Modmike said:

 Something broke sleep, it no longer works.

Not sure but there is the sleep notification function where I can add a simple exit(); ...let see when I have time.

1 minute ago, Modmike said:

Thank you for the effort, I attached a dump in the previous post, is that what you need?  Sleep well!

no, a ioreg dump made with IORegistryExplorer.app. See you

Link to comment
Share on other sites

 Share

×
×
  • Create New...