2 * Mother board: [ASUS ROG CROSSHAIR VIII HERO] Registering RGB controller
3 * Corsair: [Corsair Lighting Node Pro] Registering RGB controller
5 6319 |Info: Registering I2C interface: Nuvoton NCT6798D SMBus at 200 Device 0000:0000 Subsystem: 0000:0000
6 6325 |Info: Registering I2C interface: NVidia NvAPI I2C on GPU 0 Device 10DE:2208 Subsystem: 1458:4087
7 7280 |Info: Registering I2C interface: AMD SMBus at 0x0B00 Device 1022:790B Subsystem: 1043:87C0
8 7280 |Info: Registering I2C interface: AMD SMBus at 0x0B20 Device 1022:790B Subsystem: 1043:87C0
12 [ok] Add the support for A770 RGB
13 [ok] Add parameters "--install-service" and "--uninstall-service", see: https://github.com/mullvad/windows-service-rs/blob/main/examples/install_service.rs
14 [ok] Add a parameter (using clap) "--no-service" to run it without the service system
15 [ok] Create the service and test it
16 [ok] * Implement RGB for RAM:
17 * Use the same approach of OpenRGB by using https://github.com/GermanAizek/WinRing0
18 [ok] How to read temperature of GPU + CPU ? : https://github.com/GermanAizek/WinRing0 (Replace managing a ring0 driver and calling 'DeviceIoControl' manually)
21 * MB: "ASUS ROG STRIX B650E-I GAMING WIFI", Location:
24 * RAM : "Corsair Dominator Platinum"?
25 [ok] Define how GPU + CPU temperature are combined
26 [ok] Define update/polling rate (1s ?)
27 [ok] Define filtering function (moving average) 10s kernel size?
28 [ok] Set the exe as service or start it at startup
31 Temp = (CPU + GPU) / 2
33 Cold: [0, 255, 40]: (55 + 44) / 2 = 50°C
34 Hot: [255, 0, 0]: (75 + 85) / 2 = 80°C
37 Get-WmiObject -query "SELECT * FROM Win32_PnPSignedDriver" > output_PnPSignedDriver.txt
38 Get-WmiObject -query "SELECT * FROM Win32_PnPAllocatedResource" > output_PnPAllocatedResource.txt
41 Intel(R) NF I2C Host Controller
44 \\?\C:\Users\gburri\Projects\temp2RGB\target\debug\WinRing0x64.sys
47 "\\\\?\\PCI#VEN_8086&DEV_56A0&SUBSYS_38881025&REV_08#6&1cb01252&0&00080009#{1ca05180-a699-450a-9a0c-de4fbe3ddd89}"
50 [return: MarshalAs(UnmanagedType.U1)]
51 internal static unsafe bool CVGAAdaptor\u002ESetLEDColor(
52 [In] CVGAAdaptor* obj0,
58 \u0024ArrayType\u0024\u0024\u0024BY08E arrayTypeBy08E;
59 // ISSUE: cast to a reference type
60 // ISSUE: explicit reference operation
61 ^(sbyte&) ref arrayTypeBy08E = (sbyte) 7;
62 // ISSUE: cast to a reference type
63 // ISSUE: explicit reference operation
64 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 1) = (sbyte) 7;
65 // ISSUE: cast to a reference type
66 // ISSUE: explicit reference operation
67 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 2) = (sbyte) nArea;
68 // ISSUE: cast to a reference type
69 // ISSUE: explicit reference operation
70 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 3) = (sbyte) r;
71 // ISSUE: cast to a reference type
72 // ISSUE: explicit reference operation
73 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 4) = (sbyte) g;
74 // ISSUE: cast to a reference type
75 // ISSUE: explicit reference operation
76 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 5) = (sbyte) b;
77 // ISSUE: cast to a reference type
78 // ISSUE: explicit reference operation
79 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 6) = (sbyte) 0;
80 // ISSUE: cast to a reference type
81 // ISSUE: explicit reference operation
82 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 7) = (sbyte) 0;
83 // ISSUE: cast to a reference type
84 // ISSUE: explicit reference operation
85 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 8) = (sbyte) 0;
87 \u0024ArrayType\u0024\u0024\u0024BY08E* arrayTypeBy08EPtr1 = &\u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA;
88 \u0024ArrayType\u0024\u0024\u0024BY08E* arrayTypeBy08EPtr2 = &arrayTypeBy08E;
90 // ISSUE: cast to a reference type
91 // ISSUE: explicit reference operation
92 byte num3 = ^(byte&) ref \u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA;
93 // ISSUE: cast to a reference type
94 // ISSUE: explicit reference operation
95 if ((byte) 7 >= ^(byte&) ref \u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA)
97 while ((uint) num2 <= (uint) num3)
102 ++arrayTypeBy08EPtr2;
103 ++arrayTypeBy08EPtr1;
104 num2 = *(byte*) arrayTypeBy08EPtr2;
105 num3 = *(byte*) arrayTypeBy08EPtr1;
106 if ((uint) num2 < (uint) num3)
110 \u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA = arrayTypeBy08E;
111 \u003CModule\u003E.CVGAAdaptor\u002ELogData(obj0, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0BB\u0040MOBGKECJ\u0040Fake\u003F5I2C_Write\u003F3\u003F5\u0040, (byte*) &arrayTypeBy08E, 9);
115 [return: MarshalAs(UnmanagedType.U1)]
116 internal static unsafe bool CVGAAdaptorIntel\u002EI2C_Write(
117 [In] CVGAAdaptorIntel* obj0,
121 [MarshalAs(UnmanagedType.U1)] bool bOutputDebug)
123 if (*(long*) ((IntPtr) obj0 + 1256L) == -1L && !\u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_OpenDevice(obj0))
125 \u0024ArrayType\u0024\u0024\u0024BY0IA\u0040D arrayTypeBy0IaD;
126 if (!\u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_OpenTarget(obj0))
128 \u003CModule\u003E.sprintf_s((sbyte*) &arrayTypeBy0IaD, 128UL, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0CO\u0040GJJFMHGA\u0040DeviceIoControl\u003F\u0024CI\u003F\u0024CJ\u003F5to\u003F5devcie\u003F5FAI\u0040, __arglist ((int) \u003CModule\u003E.GetLastError()));
129 \u003CModule\u003E.OutputDebugStringA((sbyte*) &arrayTypeBy0IaD);
132 \u003CModule\u003E.CVGAAdaptor\u002ELogData((CVGAAdaptor*) obj0, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0M\u0040DGLNBELN\u0040I2C_Write\u003F3\u003F5\u0040, pData, nDataSize);
133 int num = \u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_WriteTarget(obj0, pData, nDataSize) ? 1 : 0;
136 \u003CModule\u003E.sprintf_s((sbyte*) &arrayTypeBy0IaD, 128UL, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0CI\u0040FFLBFBLK\u0040WriteFile\u003F\u0024CI\u003F\u0024CJ\u003F5to\u003F5devcie\u003F5FAILED\u003F4\u003F5h\u0040, __arglist ((int) \u003CModule\u003E.GetLastError()));
137 \u003CModule\u003E.OutputDebugStringA((sbyte*) &arrayTypeBy0IaD);
139 \u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_CloseTarget(obj0);
146 __CLASS : Win32_PnPSignedDriver
147 __SUPERCLASS : CIM_Service
148 __DYNASTY : CIM_ManagedSystemElement
150 __PROPERTY_COUNT : 28
151 __DERIVATION : {CIM_Service, CIM_LogicalElement, CIM_ManagedSystemElement}
152 __SERVER : SMOL-WHITE
153 __NAMESPACE : root\cimv2
156 ClassGuid : {4d36e97d-e325-11ce-bfc1-08002be10318}
159 Description : Intel(R) NF I2C Host Controller
161 DeviceID : DISPLAY\INTC_I2C\7&3255D98A&0&UID26040
162 DeviceName : Intel(R) NF I2C Host Controller
164 DriverDate : 20220203000000.******+***
166 DriverProviderName : Intel Corporation
167 DriverVersion : 31.100.2210.1
169 HardWareID : VIDEO\VEN_8086&DEV_56A0&SUBSYS_38881025&REV_08&INTC_I2C
174 Manufacturer : Intel Corporation
176 PDO : \Device\00000078
177 Signer : Microsoft Windows Hardware Compatibility Publisher
181 SystemCreationClassName :
183 PSComputerName : SMOL-WHITE