Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ITE IT8792E/IT8795E - values are ignored #251

Open
Shasoosh opened this issue May 20, 2020 · 148 comments · Fixed by #1020
Open

Problem with ITE IT8792E/IT8795E - values are ignored #251

Shasoosh opened this issue May 20, 2020 · 148 comments · Fixed by #1020

Comments

@Shasoosh
Copy link

Release: 1.0.191
Motherboard: Gigabyte Z390 Aorus Ultra

Problem with IT8792E/8795E:

Any value set with fan control seems to be ignored and does not affect the fan speed.

I see that a similar issue was addressed in 235 but unfortunately I'm still experiencing it.

@CSchuetz7
Copy link

CSchuetz7 commented Jun 4, 2020

Same Problem for me as well.

Release: 1.0.201
Mainboard: Gigabyte Z390 Pro Wifi

image

@PhyxionNL
Copy link
Collaborator

Please check the latest build, this might be fixed now.

@Shasoosh
Copy link
Author

Shasoosh commented Jun 5, 2020

Still not fixed for me.

@CSchuetz7
Copy link

Problem still exists with the latest version.

@PhyxionNL
Copy link
Collaborator

Does latest OHM work for you?

@CSchuetz7
Copy link

I have the same problem with latest OHM.

@Shasoosh
Copy link
Author

Shasoosh commented Aug 1, 2020

Any updates on this?
Still not working on 1.0.206

@PhyxionNL
Copy link
Collaborator

We'd need a developer with this hardware first.

@CreeT6
Copy link

CreeT6 commented Jan 24, 2021

is adding support for this chip easy? can one learn how to do it?

@PhyxionNL
Copy link
Collaborator

If you know how to code, have a motherboard with it to test, and preferably get the documentation for this chip, then yes.

@NineBallo
Copy link

@PhyxionNL (sorry for the ping didnt know who else to ask)
Short and sweet

  • Are there any risks if I do something wrong?
  • Where should I look for documentation if google has none?

Ramble
I have a mobo with the ITE IT8792E/IT8795E and although this stuff is is out of my normal comfort zone I have an excess of free time to learn. I would be willing to bang my head into a keyboard for a few hours but I cant find any documentation on the chip at all, what I have found is a really old linux driver I might be able to make use of. This might be a noobie question but I have little experiance/Questionable documentation, is there a risk of frying my superio/fans if I mapped the wrong values?

@PhyxionNL
Copy link
Collaborator

@NineBallAYAYA I don't think so. The best source of documentation is the Linux driver at the moment, https://github.com/torvalds/linux/blob/master/drivers/hwmon/it87.c
But it remains a bit of trial and error.

@NineBallo
Copy link

@PhyxionNL Thanks a lot, was quite worried i would slip up and brick something. Ill give it a shot tommorow and hopefully i can get something working somewhat soon.

@PhyxionNL
Copy link
Collaborator

PhyxionNL commented Feb 23, 2021

It's probably a small thing that needs changing, like a different registry or that it uses ext reg. You can experiment a bit with the possibilities here and base it off the Linux driver where possible (you can compare the features with other IT sensors).

@jeffdamp-wave
Copy link
Contributor

has anyone made any progress on the IT8792E chip? I just cloned the enlistment and added the controls in but need to figure out the correct reg values.

I'm on an Auros Master X570. I'm able to control on fans on the IT8688E chip.

@jeffdamp-wave
Copy link
Contributor

I took a look at the it87.c file above and the code in the lib. They seem to be in sync with each other (other than the linux file using 6 byte arrays which I added to the lib. No luck making those changes either. I wonder if fan control 5 by gigabytes has the values and could be decompiled.

@NineBallo
Copy link

has anyone made any progress on the IT8792E chip? I just cloned the enlistment and added the controls in but need to figure out the correct reg values.

I'm on an Auros Master X570. I'm able to control on fans on the IT8688E chip.

Not much on my attempts.. Most ive figured out is that someone partially implemented the codepath for it under the name "IT879XE (DEVID = 0x8733)" this explains why it can read values. I poked around a lot and most ive figured is its probably just writing wrong reg values / addresses. So I basically came to the same conclusion as you but I havent figured out a solution yet so keep me posted if you figure something out.

@CreeT6
Copy link

CreeT6 commented Mar 3, 2021

I took a look at the it87.c file above and the code in the lib. They seem to be in sync with each other (other than the linux file using 6 byte arrays which I added to the lib. No luck making those changes either. I wonder if fan control 5 by gigabytes has the values and could be decompiled.

can you use fancontrol5 to control those fans while checking which reg values change?

@jeffdamp-wave
Copy link
Contributor

can you use fancontrol5 to control those fans while checking which reg values change?
I don't know how you would see this since these are the addressable ports sent to the driver.

@NineBallo
Copy link

I took a look at the it87.c file above and the code in the lib. They seem to be in sync with each other (other than the linux file using 6 byte arrays which I added to the lib. No luck making those changes either. I wonder if fan control 5 by gigabytes has the values and could be decompiled.

can you use fancontrol5 to control those fans while checking which reg values change?

This was my original plan but as jeff said, i dont think it would be possible unless you manged to get between fancontrol and the chip and i dont know how you would do that on windows.

However it might be possible to modify the linux driver so it logs the values sent to the chip and that should* be fairly easy. As a last resort just opening control 5 in cutter/ida/ghidra might work but will probably take forever to find anything of use.

@jeffdamp-wave
Copy link
Contributor

I took a second look at the issue on my Gigabyte X570 this morning. The register values are correctly addressing the fan speeds. The problem is that the BIOS is maintaining control over the fans. By spinning in a loop on the call to SetControl I could see the fans actually spinning up and down but only for the length of time I was constantly setting the value.
image.

I wonder if there is a secondary command that needs to get sent to let the BIOS know the fan is controlled in software.

@CreeT6
Copy link

CreeT6 commented Mar 4, 2021

I took a second look at the issue on my Gigabyte X570 this morning. The register values are correctly addressing the fan speeds. The problem is that the BIOS is maintaining control over the fans. By spinning in a loop on the call to SetControl I could see the fans actually spinning up and down but only for the length of time I was constantly setting the value.
image.

I wonder if there is a secondary command that needs to get sent to let the BIOS know the fan is controlled in software.

Now that i know someone else is also having the same strange issues, I can also confirm this on my x570 pro. On my AIO pump, bios is set to 50%. When I set the speed to 0%, the pump dips for a second then back to 50%. 1350rpm steady, then dips to 1200 rpm then back to 1350rpm, very audible for my pump.

I guess, whatever the code is doing to the IT8688E (other chip on MB that respond correctly to fan control) is not working for IT8792E

@PhyxionNL
Copy link
Collaborator

Probably the values written in SetControl are incorrect, one of them should specify manual control. It might be related to the old_peci value in it87 driver.

@Shasoosh
Copy link
Author

Shasoosh commented Aug 4, 2021

Adding some info to this:

Found a pdf with the IT8792E addresses here: https://github.com/richard378/it87-eol

I've also found this commit which indicates that there is some kind of problem leaving the configuration mode of the chip. Not sure how much it's relevant but I'll add it here for future reference:

richard378/it87-eol@485178c

I hope this helps.

@Dschogo
Copy link

Dschogo commented Sep 21, 2021

Hey there, is this issue still investigated? seems like Shasoosh found the missing piece (as far as i can see with my limited knowledge of driver stuff)

Would be nice, cause the shitty stuff from Gigabyte it self causes stuttering when setting fans below 10% (Easyautotune service is pretty trash and i want to abandon it)

I found the open source software FanControl which uses ur awesome library and works pretty good except that three of the 8 fans arent controlable because they are adressed by the mentioned chip

Same test results as CreeT6 (values getting applied but instantly overriden from bios loop again)

I can try to help, not sure how except for testing / sending dumps

Got the GIgabyte X470 AORUS ULTRA GAMING (rev. 1.0)

Kind regards

@palvarad
Copy link

palvarad commented Oct 5, 2021

Hello and thank you for creating such a cool tool,

I have a Z370 Aorus Gaming 7 with the ITE IT8792E chip and recently started using FanControl to replace Gigabyte's SIV.
I really like FanControl, but I am running into the same issue that I can only control half my fans.

Based on issue 69 in the FanControl Git and this one it seems the issue has been narrowed down to having to set the fan to manual control.
I have a little programming experience and would like to help. I was able to download and compile LibreHardwareMonitor.
However, I need a little guidance on how/what to test.

For testing, should I update the line below by replacing 0x7F with other values?

WriteByte(FAN_PWM_CTRL_REG[index], (byte)(_initialFanPwmControl[index] & 0x7F));

Thanks again

Update 10/6/2021:
I tried a few different things, but I was not able to get it to work.
The most I found was that if I add the line below before the line I mentioned above then the fan speed is to 50%.
WriteByte(0x14, (byte)(value ^ (1 << index)));

If I use the below instead the fan speed is set to 100%.
WriteByte(FAN_MAIN_CTRL_REG, (byte)(value ^ (1 << index)));

@maker-DJTodd
Copy link

Experiencing same issue with a system on gigabyte board. Z270x gaming 7.

@pwnedgod
Copy link
Contributor

@Shasoosh I'll be taking a look at how Gigabyte Intel board is handled in EasyTune but I won't be able to test it since I don't have the hardware to do it. Hail mary code so to say. Glancing at it quickly, it seems to be the ISA bridge using the address found in SMFI LD.

@mrehkopf Interesting. Might be a USB through the second chip I assume.
If I can make it appear on LHM, I'll let you guys know.

@Shasoosh
Copy link
Author

No problem @pwnedgod. Let me know if you want me to test it.

@javs
Copy link
Contributor

javs commented Apr 16, 2024

@pwnedgod Interesting find on those chips using SuperIO for disabling the EC custom code. I wonder if it also works on older AMD boards like mine, where we had to do the change via the isa bridge and mmio. I may give it a try.

For intel stuff, it may be useful to check out this branch I had started: javs@ac3b569 . I also don't have an Intel board so I stopped there, but some pieces are in. There was a report the way I was getting the address via SMFI was wrong, so that may be a bit off.

@mrehkopf
Copy link
Contributor

@pwnedgod

Looking into EasyTune's .dll, it was a giant mess, but I managed to discover a way to connect to the Gigabyte EC using "ECIO" through SuperIO and disable it to allow fan control for IT8792E.

This is a very interesting approach since it might help on X570S AORUS Master as well without having to manipulate the PCI-LPC bridge registers. I wonder if this is also how HWiNFO manages to read out the EC RAM without touching the LPC bridge and LPC mapped MMIO.

@axel-lebourhis
Copy link

@pwnedgod
I tested your last build on an Aorus X570 Ultra, the controls are showing up but the values are still forced.

@pwnedgod
Copy link
Contributor

pwnedgod commented Apr 17, 2024

Interesting find on those chips using SuperIO for disabling the EC custom code. I wonder if it also works on older AMD boards like mine, where we had to do the change via the isa bridge and mmio. I may give it a try.

This is a very interesting approach since it might help on X570S AORUS Master as well without having to manipulate the PCI-LPC bridge registers. I wonder if this is also how HWiNFO manages to read out the EC RAM without touching the LPC bridge and LPC mapped MMIO.

I tested your last build on an Aorus X570 Ultra, the controls are showing up but the values are still forced.

@javs @mrehkopf @axel-lebourhis It's also worth pointing out that if your board is a Gigabyte AMD board and SMFI LD is enabled on the IT8792E, then it would still use the ISA bridge implementation, same with EasyTune. The ECIO thing might be an AM5 Gigabyte board thing, so I am not sure whether it will work on the older boards.
I will take a look at EasyTune's ISA bridge implementation in how it gets the address etc. There's one particular class in EasyTune where it uses 0xF6 instead of 0xF5 to get the SMFI address which is very confusing at first glance but there are also other implementations in EasyTune that uses 0xF5.

If you guys are interested in checking out the EasyTuneService's dll, the code is located in the assembly Gigabyte.EnvironmentControl.LowPinCount.
The significant logic to find the chip is in Gigabyte.EnvironmentControl.LowPinCount.ITE.IT8XXXFinder on the method RetrieveConfigurationRegistrer4SecondaryEnvironmentController (yes that's not a typo).

@pwnedgod
Copy link
Contributor

Okay, so I changed the SMFI address processing to match the EasyTune's one. When comparing the output of the current host address manipulation against EasyTune's function (copy paste mock) with input address:[0...65535] and addressHi:[0...255], it has some differences. Since I can't test this, could someone try this on their system?

Again, this does not fix Intel just yet
Commit: pwnedgod@62ff46d
LHM.zip

@antt0n
Copy link

antt0n commented Apr 17, 2024

Good evening,

I've already taken part in this discussion and I must admit that I was beginning to lose hope.
I also own a Gigabyte X670E AORUS MASTER.
Unfortunately, none of your builds work on my system @pwnedgod

image

@pwnedgod
Copy link
Contributor

pwnedgod commented Apr 17, 2024

@antt0n Hello, have you tried restarting the system before running my build? This usually happens if you have run a prior version, FanControl, or any LibreHardwareMonitor based program without restarting. Please also make sure to disable start up with windows for those two programs.

Also, if the problem persists even after you restarted without any traces of previous version, please provide me the report by File -> Save Report....

@antt0n
Copy link

antt0n commented Apr 17, 2024

Re,
Indeed, even after a reboot, impossible to get these sensors.
I have no other program that is supposed to control my system.
Attached is the log file.

LibreHardwareMonitor.Report.txt

@pwnedgod
Copy link
Contributor

@antt0n Thanks for the report. Your report shows that the chip was reporting 0x8883, which means something must have caused it to enter that state. I am not sure what thing would have caused this other than LHM or FanControl at the moment. I'll take a look on how to fix the chip's state through LHM so it can be properly identified.

@antt0n
Copy link

antt0n commented Apr 17, 2024

image

I think I've managed to detect the software that's causing the problem.
It seems to be the SignalRGB software.
In the meantime, it seems to me that my fan speed feedback is not correct.
But in any case, I do have the controller displayed now.

@pwnedgod
Copy link
Contributor

pwnedgod commented Apr 17, 2024

@antt0n Amazing. I'm glad that it worked out for you and found the software. I tried SignalRGB myself and it messed up the IT8792E state. I can't determine what it does exactly, but it might have the incorrect method.
In regard to fan speed, may I know what fans are connected to where and what range of RPM that it has? I'll try the other headers once I get a chance to get my extra fans out of the box and correct any bugs if there are any. My fan connected at SYS_FAN4 reports correct RPM (Corsair ML120 Elite max. 2000 RPM).

Just extra info:
Fan #1 -> SYS_FAN6_PUMP SYS_FAN5_PUMP
Fan #2 -> SYS_FAN5_PUMP SYS_FAN6_PUMP
Fan #3 -> SYS_FAN4

Edit: Adjusted based on @antt0n's info

@antt0n
Copy link

antt0n commented Apr 17, 2024

@antt0n Amazing. I'm glad that it worked out for you and found the software. I tried SignalRGB myself and it messed up the IT8792E state. I can't determine what it does exactly, but it might have the incorrect method. In regard to fan speed, may I know what fans are connected to where and what range of RPM that it has? I'll try the other headers once I get a chance to get my extra fans out of the box and correct any bugs if there are any. My fan connected at SYS_FAN4 reports correct RPM (Corsair ML120 Elite max. 2000 RPM).

Just extra info: Fan #1 -> SYS_FAN6_PUMP Fan #2 -> SYS_FAN5_PUMP Fan #3 -> SYS_FAN4

Here are the details of how my fans are connected to the MB.

SYS_FAN8_PUMP - CPU Pump (WC) - be quiet! silent loop 2 360mm
SYS_FAN7_PUMP - Top Extraction - Fractal Aspect 12 RGB (x2)
SYS_FAN6_PUMP - Pull in (WC) - Fractal Aspect 12 RGB
CPU - Pull out (WC) - SILENT WINGS 3 (x3)

I've reported the problem to the SignalRGB teams, and they'll be working on a fix in the future. It has to do with the fact that they do an ITE Enter.

@Heal-Bot
Copy link

@pwnedgod SignalRGB App dev here. We use the same ITE Enter function that Libre does at the moment. So any issues main branch Libre has we will too.

I'll keep a close eye on this and make sure all of our stuff is compatible in the future as I'm in the middle of adding ITE support. If there's anything we can help with from our end don't hesitate to ping me.

@axel-lebourhis
Copy link

@pwnedgod I tried your last build on my Aorus X570 Ultra. I also had SignalRGB and FanControl running, so I disabled both and reboot. Controls are showing up, but still unable to set a value.

LibreHardwareMonitor.Report.txt

@pwnedgod
Copy link
Contributor

@axel-lebourhis Could you run this build? I haven't made any logical changes to the controls from the latest one, but I added a field for the report to identify what kind of method it uses for the Gigabyte EC. Could you upload a report from this build?

Branch: https://github.com/pwnedgod/LibreHardwareMonitor/tree/smfi-address-fix
LHM.zip

@digital-pet
Copy link

digital-pet commented Apr 20, 2024

Found this on a lark and just wanted to add that the latest build here works on my Gigabyte X570 Aorus Pro WiFi. Thanks for all the work!

@pwnedgod
Copy link
Contributor

@digital-pet Thanks for testing. I just want to confirm. Are you able to control the fans on the second chip? (IT87xx)

@digital-pet
Copy link

@digital-pet Thanks for testing. I just want to confirm. Are you able to control the fans on the second chip? (IT87xx)

Yes, I now have full control over the fans on the second chip with the build you posted.

@pwnedgod
Copy link
Contributor

@digital-pet Very nice. Could you post the report of LibreHardwareMonitor (File -> Save Report)? I want to cross check with others' reports.

@pwnedgod
Copy link
Contributor

pwnedgod commented Apr 21, 2024

I managed to make LHM display the last two fans. It involves reading the EC around 0xC00. I am not sure about controls and no implementation for the ISA bridge version yet.

Also, I increased the timeout of disabling the Gigabyte EC to 400ms. I suspect some machines fail to set because of insufficient timeout. This is just a big assumption though. Please test as needed and attach your report.

https://github.com/pwnedgod/LibreHardwareMonitor/tree/extra-controls
LHM.zip

image

@antt0n
Copy link

antt0n commented Apr 21, 2024

@pwnedgod
Copy link
Contributor

I managed to update the control value for the extra controls, but it seems that we might need more than just writing a byte as the value for control. The value is reflected into LHM but not the actual fans.
The last build also has some problems updating control values because of slow mutex handover. As usual please upload a report if you have tested.

Branch: https://github.com/pwnedgod/LibreHardwareMonitor/tree/extra-controls
LHM.zip

@axel-lebourhis
Copy link

axel-lebourhis commented Apr 21, 2024

@axel-lebourhis Could you run this build? I haven't made any logical changes to the controls from the latest one, but I added a field for the report to identify what kind of method it uses for the Gigabyte EC. Could you upload a report from this build?

Branch: https://github.com/pwnedgod/LibreHardwareMonitor/tree/smfi-address-fix LHM.zip

LibreHardwareMonitor.Report.txt

I managed to update the control value for the extra controls, but it seems that we might need more than just writing a byte as the value for control. The value is reflected into LHM but not the actual fans. The last build also has some problems updating control values because of slow mutex handover. As usual please upload a report if you have tested.

Branch: https://github.com/pwnedgod/LibreHardwareMonitor/tree/extra-controls LHM.zip

LibreHardwareMonitor.Report.txt

No control with those 2 builds on my board.

@pwnedgod
Copy link
Contributor

Apparently, disabling the controller also disables monitoring for the IT57xx chip (the RPM values freeze, possibly temperatures as well), which is very unfortunate. Unless there is a direct way to control the IT57xx, then it would be kind of impossible to control without the Gigabyte EC.

@javs
Copy link
Contributor

javs commented Apr 22, 2024

Apparently, disabling the controller also disables monitoring for the IT57xx chip (the RPM values freeze, possibly temperatures as well), which is very unfortunate. Unless there is a direct way to control the IT57xx, then it would be kind of impossible to control without the Gigabyte EC.

Unfortunate, but not surprising.

The idea of disabling their custom controller code was because, in our motherboards, the ITE chip is still drivable via SuperIO like any other one. By disabling their custom code, it would stop overriding the registers we set via SuperIO and everyone is happy. We use the plain ITE registers for that model family same as every other motherboard.

In your case, since that doesn't appear to be an option any more, what you may want to consider doing is writing a driver for their custom EC instead. I did some research earlier and this should be entirely possible. In the EC scratch RAM area where we turn off their custom code, there are other offsets that allow you to read and control the fans using Gigabyte's scheme (which is what the Easy Tune service / SIV uses). These may vary in your newer board, but the idea should be the same.

Understandably this is much more effort as you cant reuse much of what we have for SuperIO rpm and thermal, but achievable.

@pwnedgod
Copy link
Contributor

In your case, since that doesn't appear to be an option any more, what you may want to consider doing is writing a driver for their custom EC instead. I did some research earlier and this should be entirely possible. In the EC scratch RAM area where we turn off their custom code, there are other offsets that allow you to read and control the fans using Gigabyte's scheme (which is what the Easy Tune service / SIV uses). These may vary in your newer board, but the idea should be the same.

That is true. However, reading and writing into the Gigabyte EC using Gigabyte's control scheme would be slightly overkill, because it only takes in "Complete" fan control schemes with all the curve settings, etc., if we were to abstract the Gigabyte controls behind the SetControl call. Not sure if that is what you meant, but yes, it is possible just takes a bit more effort. Even more so for a custom class/driver specific for this I suppose.

I also confirmed that the IT5701 is indeed a USB device. You can check this yourself on devmgmt.msc under "Human Interface Devices" as 2 "HID-compliant vendor-defined device". Check under the tab "Details" and select "Device instance path" and it should be something like "HID\VID_048D&PID_5702&COL01..." and "HID\VID_048D&PID_5702&COL02...". Regarding on how to connect to it, I don't know yet, but OpenRGB might have code pointers that might give a hint on how write data into it, hopefully not just limited to its RGB control capability.

@javs
Copy link
Contributor

javs commented Apr 25, 2024

In your case, since that doesn't appear to be an option any more, what you may want to consider doing is writing a driver for their custom EC instead. I did some research earlier and this should be entirely possible. In the EC scratch RAM area where we turn off their custom code, there are other offsets that allow you to read and control the fans using Gigabyte's scheme (which is what the Easy Tune service / SIV uses). These may vary in your newer board, but the idea should be the same.

That is true. However, reading and writing into the Gigabyte EC using Gigabyte's control scheme would be slightly overkill, because it only takes in "Complete" fan control schemes with all the curve settings, etc., if we were to abstract the Gigabyte controls behind the SetControl call. Not sure if that is what you meant, but yes, it is possible just takes a bit more effort. Even more so for a custom class/driver specific for this I suppose.

My version of SIV has an alternative mode called "RPM Fixed Mode" that looks more like what LibreHardwareMonitor would need, this way you avoid doing all the curve stuff. It internally does like a 1 point curve with slope 0 if I remember correctly.

I also confirmed that the IT5701 is indeed a USB device. You can check this yourself on devmgmt.msc under "Human Interface Devices" as 2 "HID-compliant vendor-defined device". Check under the tab "Details" and select "Device instance path" and it should be something like "HID\VID_048D&PID_5702&COL01..." and "HID\VID_048D&PID_5702&COL02...". Regarding on how to connect to it, I don't know yet, but OpenRGB might have code pointers that might give a hint on how write data into it, hopefully not just limited to its RGB control capability.

Interesting, I have that too it seems, never noticed. There are some google hits for a few MBs on the Gigabyte website for a tool called "GIGABYTE IT5701 RGB lighting controller firmware upgrade package".

@mirh
Copy link

mirh commented Apr 26, 2024

In Gigabyte.EnvironmentControl.Common.CoolingDevice.Fan.FanConfigMode I could find these (where they get set, I couldn't tell)

FanConfigMode
Unknown
SmartFanMode
RpmFixedMode
LiquidMode
TachometerMode
StairStepMode
TachometerClosedLoopMode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.