Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message
NHC 2 is out!
I don't see why rewriting the code should be necessary. Plenty of EC Fan levels are identical. Lowest fan level is either 0x01 or 0x02; Medium fan level is any of: 0x03, 0x04, 0x05; High fan level is any of: 0x06, 0x07 ... 0x3f; disengaged mode is: 0x40. Isn't it possible to choose two different numbers which represent the "same" underlying fan level, and so get a simple on-off mode with the existing code?
-
- Posts: 48
- Joined: Mon Oct 09, 2006 7:04 am
- Location: Germany
Hi,
I posted an NHC acpi file for A31 thinkpads that does fan control, after finishing finding out temp sensor meanings that model, posted in this thread in the A-series forum.
I like Carl's fan control setup better (different upward/downward temperatures, offsets, etc), and it has more stuff, so I will try when I get a chance to modify his T43 script instead for A31s and post it.
But I think there are some features of the above script that might still be useful:
@Carl/Spawn: I've tried to make the A31 script general so people can easily extend it to other thinkpad models. The idea was to have only the first few lines of code different for each thinkpad to define temp sensor names, commands that differ, how many temp sensors and etc., and then use the same body for every thinkpad. That way if the main code is fixed up it updates for all thinkpads. I was hoping to use an #include command and dump the redundant code into a separate file, which would just be "#include"-ed in each thinkpad class, but it seems C# doesn't support #include. Do you know how to do this sort of thing? I also tried to make an arbitrary # of temp sensors and save some space using classes but it seems this can't be done (or at least I didn't succeed).
Anyway, I will try to make the A31 work with your class, but I thought I'd ask if you would be interested in trying to merge them into a single class to make it more general and easy for others to extend to other thinkpad models.
What do you think? Have a look at my file under A31 on http://nhc.justred.info/ to see what I mean..
Milos
I posted an NHC acpi file for A31 thinkpads that does fan control, after finishing finding out temp sensor meanings that model, posted in this thread in the A-series forum.
I like Carl's fan control setup better (different upward/downward temperatures, offsets, etc), and it has more stuff, so I will try when I get a chance to modify his T43 script instead for A31s and post it.
But I think there are some features of the above script that might still be useful:
@Carl/Spawn: I've tried to make the A31 script general so people can easily extend it to other thinkpad models. The idea was to have only the first few lines of code different for each thinkpad to define temp sensor names, commands that differ, how many temp sensors and etc., and then use the same body for every thinkpad. That way if the main code is fixed up it updates for all thinkpads. I was hoping to use an #include command and dump the redundant code into a separate file, which would just be "#include"-ed in each thinkpad class, but it seems C# doesn't support #include. Do you know how to do this sort of thing? I also tried to make an arbitrary # of temp sensors and save some space using classes but it seems this can't be done (or at least I didn't succeed).
Anyway, I will try to make the A31 work with your class, but I thought I'd ask if you would be interested in trying to merge them into a single class to make it more general and easy for others to extend to other thinkpad models.
What do you think? Have a look at my file under A31 on http://nhc.justred.info/ to see what I mean..
Milos
Last edited by Milos on Sun Oct 15, 2006 1:13 pm, edited 1 time in total.
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
-
- Posts: 48
- Joined: Mon Oct 09, 2006 7:04 am
- Location: Germany
Hi Milos,
the one class for all thinkpads is a very good idea. And to your class:
Nice work
At first I will change the code, so all variables can be set in the beginning.
To the include method: I don't know. It's my first time programming in C/C#/C++
I will ask the author of NHC.
At least: I don't think that I'll have very much time in the next 2 weeks. University just startet, so there's a lot to do.
the one class for all thinkpads is a very good idea. And to your class:
Nice work
At first I will change the code, so all variables can be set in the beginning.
To the include method: I don't know. It's my first time programming in C/C#/C++
I will ask the author of NHC.
At least: I don't think that I'll have very much time in the next 2 weeks. University just startet, so there's a lot to do.
Carl, great. Let me know if I can help. Note that I had to change the variables that get assigned from the top of the file from const to static. It works, but not sure if this is bending compatibility with NHC since Manfred gave example files with consts in those places.Spawn123456 wrote:Hi Milos,
the one class for all thinkpads is a very good idea. And to your class:
Nice work
At first I will change the code, so all variables can be set in the beginning.
To the include method: I don't know. It's my first time programming in C/C#/C++
I will ask the author of NHC.
Yeah, I'm writing my phd thesis at the moment, so I don't have much time either but I really needed to get that noise down.. I'll send you any edits if I make progress.At least: I don't think that I'll have very much time in the next 2 weeks. University just startet, so there's a lot to do.
By the way, I thought of a potential problem with both the T43 and A31 classes, when fixing a wakeup problem -- when NHC is exitted, if you are in fan off state and NHC control, the fan stays off. It would be needed to put a Write('HFSP',0x80) into a destructor function for the whole A31 class (or fan class), that gets called upon exit. Not sure if that's possible.
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
-
- Posts: 48
- Joined: Mon Oct 09, 2006 7:04 am
- Location: Germany
i've downloaded the T43p acpi file but i dont understand how to use it. any basic guide on how to use this?
tried following the instructions in the readme and i get an error about not being able to compile into ibm.dll, an error log was output to a file called "IBM.error"
any ideas?
tried following the instructions in the readme and i get an error about not being able to compile into ibm.dll, an error log was output to a file called "IBM.error"
Code: Select all
Error building 'C:\Program Files\Notebook Hardware Control\acpi\IBM.cs' into 'C:\Program Files\Notebook Hardware Control\acpi\IBM.dll'
ErrorNumber: CS0117
ErrorText: 'ACPI.FIELD' does not contain a definition for 'ReadByOffset'
Line: 197
Column: 32
IsWarning: False
ErrorNumber: CS0117
ErrorText: 'ACPI.FIELD' does not contain a definition for 'ReadByOffset'
Line: 1044
Column: 39
IsWarning: False
ErrorNumber: CS0117
ErrorText: 'ACPI.FIELD' does not contain a definition for 'ReadByOffset'
Line: 1052
Column: 39
IsWarning: False
ErrorNumber: CS0117
ErrorText: 'ACPI.FIELD' does not contain a definition for 'ReadByOffset'
Line: 1060
Column: 39
IsWarning: False
Skanky,skanky wrote:i've downloaded the T43p acpi file but i dont understand how to use it. any basic guide on how to use this?
tried following the instructions in the readme and i get an error about not being able to compile into ibm.dll, an error log was output to a file called "IBM.error"
any ideas?Code: Select all
Error building 'C:\Program Files\Notebook Hardware Control\acpi\IBM.cs' into 'C:\Program Files\Notebook Hardware Control\acpi\IBM.dll' ErrorNumber: CS0117 ErrorText: 'ACPI.FIELD' does not contain a definition for 'ReadByOffset' Line: 197 Column: 32 IsWarning: False [...snip...]
You need the Core2Duo patch (regardless of what cpu you have). It contains the "ReadByOffset" command for the ACPI configuration files that was added later by the author, and isn't included in the regular NHC release (2-pre4). He says it'll be incorporated in the full NHC 2 release. Meantime get the patch from http://www.pbus-167.com/.
The T43p file will probably work better for your T42.
Good luck,
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
edit: right i now seem to have got NHC to recognise the acpi file (yay!)
can someone explain how to get NHC to adjust the fan speeds according to temps like FC is doing at the moment.
can someone explain how to get NHC to adjust the fan speeds according to temps like FC is doing at the moment.
Last edited by skanky on Sun Oct 22, 2006 9:08 am, edited 1 time in total.
That looks good, assuming the "MAINBOARD" field in your NHC system hardware tab gives you the result "23731WG" .skanky wrote:from how i've interpreted the readme file, i then need to edit the IBM.XML from:to this:Code: Select all
<?xml version="1.0"?> <IBM> <Model name="2668G2G" location="MAINBOARD" class="t43p" file="IBM.cs" /> </IBM>
..correct?Code: Select all
<?xml version="1.0"?> <IBM> <Model name="23731WG" location="MAINBOARD" class="t42" file="IBM.cs" /> </IBM>
should i turn off fan control if i have it running?
Yes you should turn off Shimodax's TPFanControl tool, if you are running it -- this is a direct replacement for it, which allows you to set fan control. It has the exact same settings.
One thing to be careful about: when you exit NHC, you need to make sure the fan is on BIOS control - or it may stay permanently off if it was off and under NHC control when you quit NHC. Otherwise it's same as tpfancontrol. This problem is a deficiency both with Spawn's T43p file and my A31 file for NHC - I'm waiting for a destructor method to be available in NHC before being able to fix that.
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
Sorry, my bad, yes you keep t43p - that's the name of the control class - and just insert your model # as you did.skanky wrote:yep thats my mainboard and had to leave the class as "t43p", error'd me out when changing it to t42.
i dont understand what all the options do once in, FAN LOW LEVEL, CPU_MOD ..what do they mean?!
do i want NHC controlling the fan or ACPI?
If you want the BIOS to control the fan automatically, set it to 3 (ACPI); if you want TPfancontrol like control - where you can choose the temperature thresholds, set NHC control. The FAN LEVEL labels (0,3,4,7,etc) are the various fan speed levels to be used, and there are temperature threshold settings upon crossing which you want to go to the higher and lower fan speed level. There are a bunch of temperatures which show temps of various parts of the machine. And the MODs are if you want to move the temperature threshold of any one of them. Eg. my power bus is always running hotter than CPU so it keeps the fan on, so I offset it by 5 degrees, so when it's 55 degrees, it gets 5 degrees subtracted before it gets compared to the fan thresholds. That allows the power bus sensor (in my case) to be 5 degrees hotter than other components before triggering a fan turn on, or speed up.
Be careful that you don't leave the fan off - as I mentioned, any time you quit NHC, you have to set the mode to 3 (ACPI), to make sure the BIOS is automatically controlling the fan after NHC exits. Here tpfancontrol still has an advantage, as it does this automatically upon exit.
Hope that helps,
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
my FC is set up like this:
checked in nhc's apci control and the only levels are: off, low, med, high. so if i understand that right, in nhc the rough equivalent to the above FC settings will be:
low = 46 to 52?
med = 53 to 56
high = 57+
are they in celcius?
is it possible to change RPM speeds of the fan for the low/med/high settings?
also will nhc's fan control give me lots of these errors in the event viewer like FC does:
Code: Select all
Level=46 0
Level=48 1
Level=50 2
Level=52 3
Level=54 4
Level=56 5
Level=58 6
Level=60 7
Level=65 128
low = 46 to 52?
med = 53 to 56
high = 57+
are they in celcius?
is it possible to change RPM speeds of the fan for the low/med/high settings?
also will nhc's fan control give me lots of these errors in the event viewer like FC does:
Code: Select all
Event Type: Warning
Event Source: ACPIEC
Event Category: None
Event ID: 3
Date: 20/10/2006
Time: 06:48:23
User: N/A
Computer: VD7TET3HDGD
Description:
\Device\ACPIEC: The embedded controller (EC) hardware returned data when none was requested. This may indicate that the BIOS is incorectly trying to access the EC without syncronizing with the OS. The data is being ignored.
Your settings do not seem to me to be well tuned. Check manually the fan levels in tpfancontrol - you'll find that 0-7 are not all different fan speeds, there are only 2-3 fan speed levels. The default tpfancontrol settings, i.e. the default NHC settings are pretty good.skanky wrote:my FC is set up like this:checked in nhc's apci control and the only levels are: off, low, med, high. so if i understand that right, in nhc the rough equivalent to the above FC settings will be:Code: Select all
Level=46 0 Level=48 1 Level=50 2 Level=52 3 Level=54 4 Level=56 5 Level=58 6 Level=60 7 Level=65 128
low = 46 to 52?
med = 53 to 56
high = 57+
Yes, of course.are they in celcius?
No, you can't change RPM (but that may one day be possible with some EC reverse engineering discussion seen in one of the threads here).is it possible to change RPM speeds of the fan for the low/med/high settings?
I think NHC will do better here. NHC is better than tpfancontrol in this way I think. It uses ACPI methods to access the ACPI, so it doesn't run into conflict with hardware like tpfancontrol does on occasion. I've never seen a single error in NHC when reading/writing the EC, whereas tpfancontrol has about a 10% chance of failing to set the fan speed and having to retry because it does it a little less gently.also will nhc's fan control give me lots of these errors in the event viewer like FC does:Code: Select all
Event Type: Warning Event Source: ACPIEC Event Category: None Event ID: 3 Date: 20/10/2006 Time: 06:48:23 User: N/A Computer: VD7TET3HDGD Description: \Device\ACPIEC: The embedded controller (EC) hardware returned data when none was requested. This may indicate that the BIOS is incorectly trying to access the EC without syncronizing with the OS. The data is being ignored.
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
-
- Posts: 48
- Joined: Mon Oct 09, 2006 7:04 am
- Location: Germany
okay i disabled the FC service.
put nhc onto mode 2 so its controlling the fan.
nhc says the "Actual TEMP (after mods)" is 51C, but the nhc tray icon says the cpu is 45C.
and as a result it seems to be running in fan level 3 when the cpu is at 45C..!?
im on default nhc settings which are:
fan low level 1 = 45-50
fan middle level 3 = 50-55
fan high level 6 = 55-60
ec controlled (passive) level 128 = 60-70
also the "Actual FAN-Speed" doesnt change, it seems to be always at 132rpm, not sure if thats just cosmetic or functional.
ah wait, from the temp sensor settings tab, the cpu is at 46C, but the GPU is hovering near 51C. so thats the cause, it seems like my FC is set to ignore the GPU temp so have disabled it here too.
(pointless nhc tray icon reporting one temp and using another for fan controlling)
put full load on the cpu and even though the temps went up to 55C (fan level 3 territory), nhc was still keeping the fan in mode 1?!
doesnt put much faith in me not using FC if i have to keep checking that its doing its job..
put nhc onto mode 2 so its controlling the fan.
nhc says the "Actual TEMP (after mods)" is 51C, but the nhc tray icon says the cpu is 45C.
and as a result it seems to be running in fan level 3 when the cpu is at 45C..!?
im on default nhc settings which are:
fan low level 1 = 45-50
fan middle level 3 = 50-55
fan high level 6 = 55-60
ec controlled (passive) level 128 = 60-70
also the "Actual FAN-Speed" doesnt change, it seems to be always at 132rpm, not sure if thats just cosmetic or functional.
ah wait, from the temp sensor settings tab, the cpu is at 46C, but the GPU is hovering near 51C. so thats the cause, it seems like my FC is set to ignore the GPU temp so have disabled it here too.
(pointless nhc tray icon reporting one temp and using another for fan controlling)
put full load on the cpu and even though the temps went up to 55C (fan level 3 territory), nhc was still keeping the fan in mode 1?!
doesnt put much faith in me not using FC if i have to keep checking that its doing its job..
Last edited by skanky on Wed Oct 25, 2006 2:25 am, edited 1 time in total.
for me at least, each of the fan levels in FC (0-7) change the fan to a different rpm level so thats why i have so many set up.Milos wrote:Your settings do not seem to me to be well tuned. Check manually the fan levels in tpfancontrol - you'll find that 0-7 are not all different fan speeds, there are only 2-3 fan speed levels. The default tpfancontrol settings, i.e. the default NHC settings are pretty good.
If the upward threshold is 55, you need 56C to go to the next level (3 in your case). If you don't like it, just edit the script and change <, > to >=, <=.skanky wrote:put full load on the cpu and even though the temps went up to 55C (fan level 3 territory), nhc was still keeping the fan in mode 1?!
doesnt put much faith in me not using FC if i have to keep checking that its doing its job..
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
That is interesting.. previous T42s were reported to have only 2-3 distinct fan speeds - see here: http://thinkwiki.org/wiki/How_to_control_fan_speed. See if you can get the speed of each level using manual mode in TPFanControl, and post them in the above thinkwiki page.skanky wrote:for me at least, each of the fan levels in FC (0-7) change the fan to a different rpm level so thats why i have so many set up.Milos wrote:Your settings do not seem to me to be well tuned. Check manually the fan levels in tpfancontrol - you'll find that 0-7 are not all different fan speeds, there are only 2-3 fan speed levels. The default tpfancontrol settings, i.e. the default NHC settings are pretty good.
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
-
- Special Member
- Posts: 5741
- Joined: Sat Oct 08, 2005 1:24 pm
- Location: UC Berkeley, California
- Contact:
There are actually seven operational fan levels that are supported in the greater majority of the T4X Series Thinkpads. They can be grouped seperately, according the algorithm controlling it and/or the re-interpretation of the data, but they do have portions of the RPM that overlap, most likely for the particular control algorithm set the EC uses. In addition, this is reflected in the Power Manager and the "Fan Noise:" field but, in practice by default and on Windows primarily, if you look at the registry for the Power Manager, you will find that there are only two or three real levels that it bothers to use; 0, 1, and 2 numerical if I recall correctly from the last time I checked.
IBM ThinkPad T43 Model 2668-72U 14.1" SXGA+ 1GB |IBM 701c
~o/
I met someone who looks a lot like you.
She does the things you do.
But she is an IBM.
/~o ---ELO from "Yours Truly 2059"
~o/
I met someone who looks a lot like you.
She does the things you do.
But she is an IBM.
/~o ---ELO from "Yours Truly 2059"
Interesting, I was aware of 8 levels, but not that each may use a different algorithm in addition to just different fan speed, and I didn't realize that a single fan level can have different speeds depending on situation. Is it documented somewhere in more detail?christopher_wolf wrote:There are actually seven operational fan levels that are supported in the greater majority of the T4X Series Thinkpads. They can be grouped seperately, according the algorithm controlling it and/or the re-interpretation of the data, but they do have portions of the RPM that overlap, most likely for the particular control algorithm set the EC uses.
No 'power manager' or 'fan noise' in my A31 registry.. are these registry entries specific to some T43 utility?In addition, this is reflected in the Power Manager and the "Fan Noise:" field but, in practice by default and on Windows primarily, if you look at the registry for the Power Manager, you will find that there are only two or three real levels that it bothers to use; 0, 1, and 2 numerical if I recall correctly from the last time I checked.
Milos
ThinkPad A31 2652-M3U' (P4m 2.5GHz, 2GB RAM, ATI Mobility Radeon 7500/32MB, HTS 7k100)
sorry dont quite understand where to do this, i assume i have to edit ibm.cs? can you copy and paste the section in question so i know where to look/change mine.Milos wrote:If the upward threshold is 55, you need 56C to go to the next level (3 in your case). If you don't like it, just edit the script and change <, > to >=, <=.
Milos
i've also had to disable both the APS and GPU sensors as the temp reading for the cpu (in my systray) was different to the "actual temp" in the notebook fan control section. i like the cpu temp icon as its a good visual indicator for me so need it to match up to the fan control.
apart from not giving control back to the bios when nhc exits, is there any other drawbacks it has? i do like the fact that so far nhc isnt cluttering up my system event log with lots of errors every second..
i have nhc set to run as a service (registered nhc), shouldnt this get around nhc quitting unexpectantly then automatically restarting the program to give fan control back to nhc? or am i misinterpreting how letting nhc run as a service works? i've even set the service to automatically restart after 60 seconds if theres a problem.
edit: with nhc running as a service, its set to log on as the local system account but the allow service to interact with desktop is not ticked, what is controlling the fan when i reboot and then at the login screen: the bios or nhc's service?
same goes for logging off the current user then back at the login screen, whos got control, bios or the nhc service?
edit2: i guess what would be useful (for me at least) if there was a nhc tray icon which displays what level the fan is set to, be it coloured coded icon (ala FC) or even a icon that simply displays "fan: off/low/med/high/bios" would be great. of course this option would be greyed out if no acpi file was found.
hell, an option to change the fan status from a context menu when right clicking on the nhc icon (or the above fan icon), just so i dont have to go all the way into nhc to view what the fan is up to..
-
- Posts: 48
- Joined: Mon Oct 09, 2006 7:04 am
- Location: Germany
Hi Skanky,
the functions would be nice. But nobody can implement them, accept Manni (the author of NHC). You can post your ideas in the www.p35-forum.de forum. (Just go to the english part).
Carl
the functions would be nice. But nobody can implement them, accept Manni (the author of NHC). You can post your ideas in the www.p35-forum.de forum. (Just go to the english part).
Carl
-
- Special Member
- Posts: 5741
- Joined: Sat Oct 08, 2005 1:24 pm
- Location: UC Berkeley, California
- Contact:
No, it is just something related to the Power Manager and the related power management drivers; it should be on the A31 as well according to this. Then again, it may not install because the PM drivers are different on the A31 and may not flag the system as able to support that; I would have to look at the install process and the relevant registry entries for that. The hardware is very different across all the Thinkpads you see listed there, but it isn't limited to just a T43. Most of the T4X Series Thinkpads that support the Power Manager have that setting. The setting actually does change the fan noise level significant, although I suspect that is only because it has 2-3, unsure about the complete behavior of '0', discrete groups that clump together a large subset of actual fan levels that the EC has.Milos wrote:
No 'power manager' or 'fan noise' in my A31 registry.. are these registry entries specific to some T43 utility?
Milos
IBM ThinkPad T43 Model 2668-72U 14.1" SXGA+ 1GB |IBM 701c
~o/
I met someone who looks a lot like you.
She does the things you do.
But she is an IBM.
/~o ---ELO from "Yours Truly 2059"
~o/
I met someone who looks a lot like you.
She does the things you do.
But she is an IBM.
/~o ---ELO from "Yours Truly 2059"
on nhc version 1.x, the graphics card tab had an option whereby after a period of time, it would clock the gfx card down to a certain speed. (both are set by the user)
in the new version i can see that "Enable ATI Clock Control #2" is what speed it clocks down to, but where do i select the amount of idle time when it goes to that speed?
also in the "ATI Powerplay settings" section just above that, there are 3 settings, online/high battery/low battery with a slider tab next to each one.
what do the sliders do as mine atm are all set to the left side?
in the new version i can see that "Enable ATI Clock Control #2" is what speed it clocks down to, but where do i select the amount of idle time when it goes to that speed?
also in the "ATI Powerplay settings" section just above that, there are 3 settings, online/high battery/low battery with a slider tab next to each one.
what do the sliders do as mine atm are all set to the left side?
Can you set all the checkboxes on this tab, mine are all gray!skanky wrote:on nhc version 1.x, the graphics card tab had an option whereby after a period of time, it would clock the gfx card down to a certain speed. (both are set by the user)
in the new version i can see that "Enable ATI Clock Control #2" is what speed it clocks down to, but where do i select the amount of idle time when it goes to that speed?
also in the "ATI Powerplay settings" section just above that, there are 3 settings, online/high battery/low battery with a slider tab next to each one.
what do the sliders do as mine atm are all set to the left side?
Maybe i should disinstall Catalyst or buy NHC Pro ?!?!?!
-
- Similar Topics
- Replies
- Views
- Last post
-
-
WTB: Thinkpad T420 (Maxed out) i7.
by Thinkbookpro » Thu Jan 18, 2024 7:00 pm » in Marketplace - Forum Members only - 1 Replies
- 1020 Views
-
Last post by BillMorrow
Sun Jan 21, 2024 5:05 am
-
Who is online
Users browsing this forum: No registered users and 3 guests