Shuzhengz / TPFanCtrl2

ThinkPad Fan Control 2 (Dual Fan) for Windows 10 and 11
The Unlicense
264 stars 23 forks source link

Thinkbook 13s Gen2 not working #20

Open vtainc opened 2 years ago

vtainc commented 2 years ago

HI,

I understandt, that this is not a clear ThinkPad, but original tpfancontrol 0.62e works without problems, but controls only one fan ( 255 min, 0 - max )

TPFanCtrl2 is not working - writes to log, that it is not possible to read from EC register.

Shuzhengz commented 2 years ago

Hi,

Can you check if TVicPort is installed correctly on your laprop? EC read errors usually have something to do with it. The program also needs administration permission to run so maybe run it as admin.

It would also be great if you can specify your computer's specification (Model, specific CPU info, BIOS version, OS and build number, and the TPFC version) and include info in the log.

vtainc commented 2 years ago

Yes, tvciport is installed and working, because i'm using tpfancontrol 0.62e

Shuzhengz commented 2 years ago

yeah, but v.0.62e is "special version for Edge E520 only" (info from thinkwiki), so it doesn't confirm that everything is installed correctly

vtainc commented 2 years ago

yeah, but v.0.62e is "special version for Edge E520 only" (info from thinkwiki), so it doesn't confirm that everything is installed correctly

I know, that it is special version. But the difference is only that on almost all thinkpads fan can be controlled using speeds from 0 to 7, but in 0.62e speeds are controlled from 255 to 0.

I have tried to test tpfanctrl2 from the beginning, what I have done:

  1. Reset win11 :D
  2. Installed latest free tvicport.
  3. downloaded tpfanctrl2, but anyway - same error message.
  4. after this removed tvicport
  5. installed tpfc_v062e - , reboot and it works :( , but tpfanctrl does't
Shuzhengz commented 2 years ago

Oh there's actually a 0-80 controll mode in TPFC2, so maybe you can try that. If you have Lenovo's Vantage software installed, make sure to disable the "inteligent" control mode as it messes with the EC in some situations.

I think the 0.62e version has different CPU sensors, but I'm not very sure (I can't find the source code for tha release). I'm happy to make a special release version, but I don't really have a way to test it since I don't have any machine that runs Windows 11 (that's why I put windows 11 as theoretically working but unsupported in the readme).

It would also help if you can specify your computer's specification (Model, specific CPU info, BIOS version, OS build number) and include info from the log.

Shuzhengz commented 2 years ago
3. downloaded tpfanctrl2, but anyway - same error message.

Can you inlude the error message (a screenshot and description would be fine)? I need to know where and what went wrong in order to debug it.

vtainc commented 2 years ago

image

After analyzing EC controller data I have found that:

147,150 - fan mode selection 14 - manual control 04 - bios

148 - fan speed 1 set ; 149 - unknown, seems to be, that this is raw fan speed, but i'm unable to guess how to decode it - it is only byte, but fan speed can be up to 9000 rpm. 151 - fan speed 2 set ; 152- unknown, seems to be, that this is raw fan speed, but i'm unable to guess how to decode it - it is only byte, but fan speed can be up to 9000 rpm.

168 - cpu temp 169 - aps temp 170 - crd temp 174 - bat temp 175 - x7f temp

vtainc commented 2 years ago

I think the 0.62e version has different CPU sensors, but I'm not very sure (I can't find the source code for tha release). I'm happy to make a special release version, but I don't really have a way to test it since I don't have any machine that runs Windows 11 (that's why I put windows 11 as theoretically working but unsupported in the readme).

don't worry, 0.62e works like a charm on windows 10 and 11, tested. I also have Thinkbook 14, that runs Windows 10, but there I use another version of tpfancontrol - 0.63, because on that Thinkbook the fan i controlled from 0 to 7.

It would also help if you can specify your computer's specification (Model, specific CPU info, BIOS version, OS build number) and include info from the log.

LENOVO ThinkBook 13s G2 ITL Microsoft Windows 11 Professional (x64) Build 22000.434 Intel Core i7-1165G7 Bios version: F9CN46WW

Shuzhengz commented 2 years ago

Cool, I'll look into it later today

Shuzhengz commented 2 years ago

@vtainc Try this and see if this works (i can't test it because it breaks on my computer now, but it should work based on the data) tb13s.zip

vtainc commented 2 years ago

@vtainc Try this and see if this works (i can't test it because it breaks on my computer now, but it should work based on the data) tb13s.zip

Hi,

Thank you for your time, but - no, it doesn't work. Same behavior as last time.

Maybe you need some additional data?

Shuzhengz commented 2 years ago

Yeah that'd be great

Can you enable the Log2File flag in the ini file for V0.62e, let it run for a few minutes, then send the TPFanControl.log file?

Thanks!

vtainc commented 2 years ago

There is no helpable information there ;) But here it is:

[17.01.2022 8:36:13] Current Config: [17.01.2022 8:36:13] Active= 1, Cycle= 10, FanBeep= 0 0, MaxReadErrors= 10 [17.01.2022 8:36:13] IconLevels= 60 70 80 [17.01.2022 8:36:13] Log2File= 1, Log2csv= 0, ShowAll= 0, IconColorFan= 1 [17.01.2022 8:36:13] Levels= 50°C -> 255, 60°C -> 0x80, 67°C -> 169, 80°C -> 140, 85°C -> 126, 90°C -> 0 [17.01.2022 8:36:13] SensorOffset1-12= 0 0 0 0 0 0 0 0 0 0 0 0 °C [17.01.2022 8:36:13] IgnoreSensors= x7f, ProcessPriority= 2, IconCycle= 10 [17.01.2022 8:36:13] BluetoothEDR= 0, NoWaitMessage= 1, ShowBiasedTemps= 1 [17.01.2022 8:36:13] ManModeExit= 80, SecWinUptime= 0, SecStartDelay= 0

[17.01.2022 8:36:13] Windows uptime since boot 80011 sec., SecWinUptime= 0 sec. [17.01.2022 9:10:59] Fan: 0xff / Switch: 54°C (54; 43; 45; 0; 0; 0; 31; 15; 0; 0; 0; 0;) [17.01.2022 9:10:59] On close: Set BIOS control to 0x04, Result: OK [17.01.2022 9:10:59] Exiting ProcessDialog [17.01.2022 9:26:39] Current Config: [17.01.2022 9:26:39] Active= 1, Cycle= 10, FanBeep= 0 0, MaxReadErrors= 10 [17.01.2022 9:26:39] IconLevels= 60 70 80 [17.01.2022 9:26:39] Log2File= 1, Log2csv= 0, ShowAll= 0, IconColorFan= 1 [17.01.2022 9:26:39] Levels= 50°C -> 255, 60°C -> 0x80, 67°C -> 169, 80°C -> 140, 85°C -> 126, 90°C -> 0 [17.01.2022 9:26:39] SensorOffset1-12= 0 0 0 0 0 0 0 0 0 0 0 0 °C [17.01.2022 9:26:39] IgnoreSensors= x7f, ProcessPriority= 2, IconCycle= 10 [17.01.2022 9:26:39] BluetoothEDR= 0, NoWaitMessage= 1, ShowBiasedTemps= 1 [17.01.2022 9:26:39] ManModeExit= 80, SecWinUptime= 0, SecStartDelay= 0

[17.01.2022 9:26:39] Windows uptime since boot 889 sec., SecWinUptime= 0 sec. [17.01.2022 9:26:50] Change Mode from BIOS->Smart, recalculate fan speed [17.01.2022 9:26:50] Fan: 0x6d / Switch: 51°C (51; 46; 48; 0; 0; 0; 34; 14; 0; 0; 0; 0;) [17.01.2022 9:26:50] BIOS off: Set BIOS control to 0x14, Result: OK [17.01.2022 9:26:51] Fan: 0x6d / Switch: 51°C (51; 46; 48; 0; 0; 0; 34; 14; 0; 0; 0; 0;) [17.01.2022 9:26:51] Smart: Set fan control to 0xff, Result: OK [17.01.2022 9:26:55] Change Mode from Smart->Manual, setting fan speed [17.01.2022 9:27:05] Fan: 0xff / Switch: 50°C (50; 45; 47; 0; 0; 0; 34; 17; 0; 0; 0; 0;) [17.01.2022 9:27:05] BIOS off: Set BIOS control to 0x14, Result: OK [17.01.2022 9:27:05] Fan: 0xff / Switch: 50°C (50; 45; 47; 0; 0; 0; 34; 17; 0; 0; 0; 0;) [17.01.2022 9:27:05] Manual: Set fan control to 0x64, Result: OK [17.01.2022 9:27:13] Fan: 0x64 / Switch: 52°C (52; 45; 47; 0; 0; 0; 34; 18; 0; 0; 0; 0;) [17.01.2022 9:27:13] BIOS off: Set BIOS control to 0x14, Result: OK [17.01.2022 9:27:13] Fan: 0x64 / Switch: 52°C (52; 45; 47; 0; 0; 0; 34; 18; 0; 0; 0; 0;) [17.01.2022 9:27:13] Manual: Set fan control to 0x19, Result: OK [17.01.2022 9:27:14] Fan: 0x19 / Switch: 52°C (52; 45; 47; 0; 0; 0; 34; 16; 0; 0; 0; 0;) [17.01.2022 9:27:14] BIOS off: Set BIOS control to 0x14, Result: OK [17.01.2022 9:27:15] Fan: 0x19 / Switch: 52°C (52; 45; 47; 0; 0; 0; 34; 16; 0; 0; 0; 0;) [17.01.2022 9:27:15] Manual: Set fan control to 0xff, Result: OK [17.01.2022 9:27:18] Change Mode from Manual->Smart, recalculate fan speed [17.01.2022 9:50:30] Fan: 0xff / Switch: 69°C (69; 45; 47; 0; 0; 0; 34; 44; 0; 0; 0; 0;) [17.01.2022 9:50:30] BIOS off: Set BIOS control to 0x14, Result: OK [17.01.2022 9:50:30] Fan: 0xff / Switch: 69°C (69; 45; 47; 0; 0; 0; 34; 44; 0; 0; 0; 0;) [17.01.2022 9:50:30] Smart: Set fan control to 0xa9, Result: OK [17.01.2022 9:51:10] Fan: 0xa9 / Switch: 50°C (50; 44; 46; 0; 0; 0; 34; 14; 0; 0; 0; 0;) [17.01.2022 9:51:10] BIOS off: Set BIOS control to 0x14, Result: OK [17.01.2022 9:51:10] Fan: 0xa9 / Switch: 50°C (50; 44; 46; 0; 0; 0; 34; 14; 0; 0; 0; 0;) [17.01.2022 9:51:10] Smart: Set fan control to 0xff, Result: OK [17.01.2022 10:02:30] Fan: 0xff / Switch: 52°C (52; 45; 47; 0; 0; 0; 34; 14; 0; 0; 0; 0;) [17.01.2022 10:02:30] On close: Set BIOS control to 0x04, Result: OK [17.01.2022 10:02:30] Exiting ProcessDialog

Shuzhengz commented 2 years ago

cool, thanks

Shuzhengz commented 2 years ago

I did some moe digging on the internet, but can't find the source code for 0.63e, so it's kinda hard to know exactly how to fix it :/

I think the problem is the EC registry being different on some systems. But the problem is I don't know where yours is, so I can't fix it (because I can't test it on my system).

But I did build antoher build to test tho, and see if it works (the registry is used for older generation ThinkPads). If it doesn't then I think you'll have to compile code on your machine and try to fix it (by changing the registry numbers in portio.cpp)

Thanks!

Attached: tb13.zip

vtainc commented 2 years ago

Tested. No, it doesn't work. Ok, I will try to compile the source code and see what is wrong. It was a very long time ago when I was programming something :). I hope that I succeed

Shuzhengz commented 2 years ago

Cool, good luck :)

(also you might have to add in the .ini file manually to the debug folder when debugging it using visual studio)

vtainc commented 2 years ago

After some time of playing I was impossible to get your version to work - seems to be, that there are some modifications used, that prevent your version to work on my laptop.

Bet I have good news - I found version on github, that works, I have made some modifications in the code and now it displays all temperatures correctly and I can control both fans ( with some problems :D ), but it doesn't display fan speeds correctly. - I really forgotten what is programming and I didn't know C++; Some time ago I had some experience with Delphi + asm, but this is long story. I will try to make this version for my laptop, but I think, that it will cost me more time, that I have :D + learning C++ from almost beginning.

Here is the unmodified code: https://github.com/Ede123/TPFanControl

in my version I have changed variables in fanstuff.cpp, because I have different offsets for temperature sensors:

define TP_ECOFFSET_FANSPEED (char)0x84 // 16 bit word, lo/hi byte

define TP_ECOFFSET_TEMP0 (char)0xA8 // 8 temp sensor bytes from here

define TP_ECOFFSET_TEMP1 (char)0xB9 // 4 temp sensor bytes from here

and changed setfan function - implemented dual fan control. But yes, I' m only playing, without normal knowledge with C++.

Maybe, if you can see where is the difference, then you may try to fix your code, but if no, then I will try to fix my code when I will have free time.

vtainc commented 2 years ago

Also I think, you may include in your code tvicport.lib, because it is not included and I have found it in another repository ( included tvicport.lib, that comes with tvicport installer does not work, with vs 2022 )

Shuzhengz commented 2 years ago

Oh cool thanks! I'll look into it this weekend

Shuzhengz commented 2 years ago

i built another one from the one fan version, try see if this works tpfc.zip

vtainc commented 2 years ago

i built another one from the one fan version, try see if this works tpfc.zip

Hi!

Tested - no good news - doesn't work. Same behavior as always.

Shuzhengz commented 2 years ago

sad I wonder if it's a problem w the second fan config in lenovos drivers the p50 in the other issue has a similar problem (except the p50 just shuts off straight away, even when using lenovo's own diagnostic tools)

Shuzhengz commented 2 years ago

or it could be just we haven't found the correct ec address yet

vtainc commented 2 years ago

Yeah, but I have build, that is working correctly, but without your modifications. So, it seems to be, that the problem is not with ec address and there is some other problem.

Shuzhengz commented 2 years ago

sorry, i mean the ec address for the second fan (the first one should work because the code for that is pretty much from the version you sent) actually, do you mind if I take a look at the code for the modifications you put on so i can try fixing the fan speed? Thanks!

vtainc commented 2 years ago

No problems. The code is broken, but it works :D

Here is the link: https://disk.yandex.ru/d/b3Q06C34OtcGxg

Shuzhengz commented 2 years ago

thanks!

Shuzhengz commented 2 years ago

Okay i changed ur code a bit and it works and detects fan speed on my machine, see if it works tpfc.zip

vtainc commented 2 years ago

Okay i changed ur code a bit and it works and detects fan speed on my machine, see if it works tpfc.zip

Yes, this one works. But it seems to be, that the app always changes the fan speed to $20 and fan works at almost maximum speed in bios mode :)

image
Shuzhengz commented 2 years ago

nice lemme add some more features and build again

Shuzhengz commented 2 years ago

But it seems to be, that the app always changes the fan speed to $20

hmm maybe it has something to do with the config?

Shuzhengz commented 2 years ago

maybe check the fan curve in smart mode

DerKatzenkoenig commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

vtainc commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

Hi, my second laptop is also thinkbook 14g2. The working version for it is 0.62 - https://thinkwiki.de/tpfancontrol/tpfc_v062.zip

DerKatzenkoenig commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

Hi, my second laptop is also thinkbook 14g2. The working version for it is 0.62 - https://thinkwiki.de/tpfancontrol/tpfc_v062.zip

Thanks for the reply! Already tried that - with all versions I've got the same issue, that no cpu temp gets captured.

vtainc commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

Hi, my second laptop is also thinkbook 14g2. The working version for it is 0.62 - https://thinkwiki.de/tpfancontrol/tpfc_v062.zip

Thanks for the reply! Already tried that - with all versions I've got the same issue, that no cpu temp gets captured.

Strange. You may try https://www.argusmonitor.com/

DerKatzenkoenig commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

Hi, my second laptop is also thinkbook 14g2. The working version for it is 0.62 - https://thinkwiki.de/tpfancontrol/tpfc_v062.zip

Thanks for the reply! Already tried that - with all versions I've got the same issue, that no cpu temp gets captured.

All core temps get captured correctly by HWiNFO and throttlestop btw

DerKatzenkoenig commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

Hi, my second laptop is also thinkbook 14g2. The working version for it is 0.62 - https://thinkwiki.de/tpfancontrol/tpfc_v062.zip

Thanks for the reply! Already tried that - with all versions I've got the same issue, that no cpu temp gets captured.

Strange. You may try https://www.argusmonitor.com/

Thanks! Will do

DerKatzenkoenig commented 2 years ago

(Hey, sorry for being in the wrong place for that, but I can't help myself) I've got a Thinkbook 14 G2 Intel and can't find anything about fan control for exactly my device (which is bad, bc the fan curve is way to aggressive). I've tried plenty of software, but nothing worked so far. TPFC doesn't even shows any right temperatures. Hope you guys got some ideas :)

Hi, my second laptop is also thinkbook 14g2. The working version for it is 0.62 - https://thinkwiki.de/tpfancontrol/tpfc_v062.zip

Thanks for the reply! Already tried that - with all versions I've got the same issue, that no cpu temp gets captured.

Strange. You may try https://www.argusmonitor.com/

And sorry for the dumb question, but do I need to give access to EC somehow?

vtainc commented 2 years ago

No, all must be working out of the box.

DerKatzenkoenig commented 2 years ago

No, all must be working out of the box.

Argus works for monitoring CPU temp, but not for fan speeds (monitor and control). Your TPFC only gets "xc3" temp at 16°C and nothing else. Damn, I just want this laptop to be quiet haha

DerKatzenkoenig commented 2 years ago

Screenshot 2022-04-07 184946

this is what I get in tpfc. (FYI: I'm on BIOS F8CN43WW and win11 22H2 beta)

vtainc commented 2 years ago

hmm. strange. Seems to be, that offsets for the sensors are incorrect. See my post on the top of the thread . Download RW everything , open ec controller and search for your sensors. Then, if you can you must compile your own build using visual studio )

vtainc commented 2 years ago

Have you really tested all versions? :

image

DerKatzenkoenig commented 2 years ago

hmm. strange. Seems to be, that offsets for the sensors are incorrect. See my post on the top of the thread . Download RW everything , open ec controller and search for your sensors. Then, if you can you must compile your own build using visual studio )

I wish that i could haha Is it possible, that the intelligent thermal solutions driver by lenovo and vantage are disturbing tpfc?

DerKatzenkoenig commented 2 years ago

matter of fact: can't even launch rweverything. And yes, tested most of them. I can try to test all haha

vtainc commented 2 years ago

matter of fact: can't even launch rweverything. And yes, tested most of them. I can try to test all haha

Theoretically yes, they can disturb.

And yeah after win11 latest update rweverything doesn't work anymore. I think, that you must downgrade to w10 :) . I have also done this today and i'm happy :D

DerKatzenkoenig commented 2 years ago

Aw man. I really adapted to win11 by now :( funfact: uninstalled all power management things that I could find und got the pwr sensor haha

DerKatzenkoenig commented 2 years ago

byte, but fan speed can be up to 9000 rpm.

edit: nevermind, I'm giving up for now. Im hoping for some movement from lenovo (probably won't happen). It's so sad, because despite that I really like the thinkbook

can you tell me the ec controller data for cpu temp?