nikolasgd / TPFanControl-dual-fan

A dual-fan version of TPFanControl for Windows 10. Tested and working on a Thinkpad P1 Gen 3.
55 stars 10 forks source link

Crashes on Gen2 P1 #1

Open mattharrison opened 3 years ago

mattharrison commented 3 years ago

This doesn't look to be able to read my Gen2 sensors.

Here's the output from the log file.

[12/23/2020 8:34:56 AM] Current Config:
[12/23/2020 8:34:56 AM]   Active= 2, Cycle= 3, FanBeep= 0 0, MaxReadErrors= 10
[12/23/2020 8:34:56 AM]   IconLevels= 65 75 80, NoExtSensor= 0, Lev64Norm= 1
[12/23/2020 8:34:56 AM]   Log2File= 1, Log2csv= 1, ShowAll= 0, IconColorFan= 1
[12/23/2020 8:34:56 AM]   Levels= 50°C -> 0,  60°C -> 1,  70°C -> 2,  80°C -> 4,  90°C -> 7
[12/23/2020 8:34:56 AM]   Levels2= 58°C -> 0,  68°C -> 1,  80°C -> 3,  85°C -> 4,  90°C -> 7
[12/23/2020 8:34:56 AM]   SensorOffset1-12= 0 0 0 0 0 0 0 0 0 0 0 0 °C
[12/23/2020 8:34:56 AM]   IgnoreSensors= , ProcessPriority= 2, IconCycle= 1
[12/23/2020 8:34:56 AM]   BluetoothEDR= 0, NoWaitMessage= 1, ShowBiasedTemps= 1
[12/23/2020 8:34:56 AM]   ManModeExit= 75, SecWinUptime= 0, SecStartDelay= 0

[12/23/2020 8:34:56 AM] Windows uptime since boot 462 sec., SecWinUptime= 0 sec.
[12/23/2020 8:34:57 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:34:58 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:34:58 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:34:59 AM] Warning: can't read Status, read error count = 0
[12/23/2020 8:34:59 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:00 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:01 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:01 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:01 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:02 AM] Warning: can't read Status, read error count = 1
[12/23/2020 8:35:02 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:03 AM] failed to read FanSpeedLowByte 2 from EC
[12/23/2020 8:35:03 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:03 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:04 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:05 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:05 AM] Warning: can't read Status, read error count = 2
[12/23/2020 8:35:05 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:06 AM] failed to read FanSpeedLowByte 2 from EC
[12/23/2020 8:35:06 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:06 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:07 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:08 AM] failed to read TEMP1 byte from EC
[12/23/2020 8:35:08 AM] Warning: can't read Status, read error count = 3
[12/23/2020 8:35:08 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:42 AM] Current Config:
[12/23/2020 8:35:42 AM]   Active= 2, Cycle= 3, FanBeep= 0 0, MaxReadErrors= 10
[12/23/2020 8:35:42 AM]   IconLevels= 65 75 80, NoExtSensor= 0, Lev64Norm= 1
[12/23/2020 8:35:42 AM]   Log2File= 1, Log2csv= 1, ShowAll= 0, IconColorFan= 1
[12/23/2020 8:35:42 AM]   Levels= 50°C -> 0,  60°C -> 1,  70°C -> 2,  80°C -> 4,  90°C -> 7
[12/23/2020 8:35:42 AM]   Levels2= 58°C -> 0,  68°C -> 1,  80°C -> 3,  85°C -> 4,  90°C -> 7
[12/23/2020 8:35:42 AM]   SensorOffset1-12= 0 0 0 0 0 0 0 0 0 0 0 0 °C
[12/23/2020 8:35:42 AM]   IgnoreSensors= , ProcessPriority= 2, IconCycle= 1
[12/23/2020 8:35:42 AM]   BluetoothEDR= 0, NoWaitMessage= 1, ShowBiasedTemps= 1
[12/23/2020 8:35:42 AM]   ManModeExit= 75, SecWinUptime= 0, SecStartDelay= 0

[12/23/2020 8:35:42 AM] Windows uptime since boot 508 sec., SecWinUptime= 0 sec.
[12/23/2020 8:35:42 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:43 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:43 AM] failed to read TEMP1 byte from EC
[12/23/2020 8:35:44 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:44 AM] failed to read FanSpeedLowByte 1 from EC
[12/23/2020 8:35:44 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:35:44 AM] Warning: can't read Status, read error count = 0
[12/23/2020 8:35:44 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:45 AM] failed to read FanSpeedLowByte 1 from EC
[12/23/2020 8:35:45 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:35:46 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:47 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:47 AM] Warning: can't read Status, read error count = 1
[12/23/2020 8:35:47 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:48 AM] failed to read FanSpeedLowByte 2 from EC
[12/23/2020 8:35:48 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:48 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:49 AM] failed to read FanSpeedLowByte 1 from EC
[12/23/2020 8:35:49 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:35:49 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:50 AM] failed to read TEMP1 byte from EC
[12/23/2020 8:35:50 AM] Warning: can't read Status, read error count = 2
[12/23/2020 8:35:50 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:51 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:51 AM] failed to read FanSpeedLowByte 1 from EC
[12/23/2020 8:35:51 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:35:52 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:35:53 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:53 AM] Warning: can't read Status, read error count = 3
[12/23/2020 8:35:53 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:54 AM] failed to read FanSpeedLowByte 1 from EC
[12/23/2020 8:35:54 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:35:55 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:55 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:56 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:56 AM] Warning: can't read Status, read error count = 4
[12/23/2020 8:35:56 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:35:57 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:58 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:35:58 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:59 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:35:59 AM] Warning: can't read Status, read error count = 5
[12/23/2020 8:35:59 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:36:00 AM] failed to read FanSpeedLowByte 2 from EC
[12/23/2020 8:36:00 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:36:01 AM] failed to read TEMP1 byte from EC
[12/23/2020 8:36:01 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:36:01 AM] failed to read FanSpeedLowByte 1 from EC
[12/23/2020 8:36:01 AM] failed to read FanSpeedHighByte 1 from EC
[12/23/2020 8:36:02 AM] failed to read FanSpeedHighByte 2 from EC
[12/23/2020 8:36:02 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:36:02 AM] Warning: can't read Status, read error count = 6
[12/23/2020 8:36:02 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:36:03 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:36:04 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:36:05 AM] failed to read TEMP0 byte from EC
[12/23/2020 8:36:05 AM] Warning: can't read Status, read error count = 7
[12/23/2020 8:36:05 AM] We will close to BIOS-Mode after 10 consecutive read errors
[12/23/2020 8:36:06 AM] failed to read TEMP0 byte from EC
nikolasgd commented 3 years ago
mattharrison commented 3 years ago
nikolasgd commented 3 years ago

At first glance I don't see the @stenri version using other EC registers or memory addresses. Could be the Gen 2 just needs longer delays between setting and reading registers. I can not fix this since I don't own the Gen 2 model for testing.

Just out of interest: did you find another version that works reliably?

stenri commented 3 years ago

@nikolasgd, take a loot at fanstuff.cpp, FANCONTROL::SetFan() implementation in my version. I use two separate code loops to set FAN1 and FAN2 levels. This was a critical change to make TPFanControl work correctly with both fans on Lenovo P53:

https://github.com/stenri/TPFanControl/blob/master/TPFanControl/fanstuff.cpp

        //
        // Set FAN1 level.
        //
        for (int i = 0; i < 5; ++i)
        {
            ...
        }
        //
        // Set FAN2 level.
        //
        for (int i = 0; i < 5; ++i)
        {
            ...
        }

You may want to implement something similar as well. And yes, delays in my version of FANCONTROL::SetFan() seems to be higher.

nikolasgd commented 3 years ago

@stenri Interesting. My approach was to use only one loop but to check the output from write operations for both fans and keep looping until both return success. Works for my model (P1 Gen 3).

@mattharrison have you found a version that works for the Gen 2?

BrainSlayer commented 2 years ago

same issue on P52 model

array3 commented 3 days ago

This version of TPFanControl-dual-fan based on @nikolasgd should work on Thinkpads P52 and probably other Thinkpad dual fan models.