S12 mit geänderter Lüftersteuerung in NHC möglich?

BitKiller

Active member
Themenstarter
Registriert
24 März 2008
Beiträge
2.952
Hallo,
ich weiss, dass ich mit dem S12 (noch) alleine dastehe, aber Aufgrund der Ähnlichkeit zum S10(e) hoffe ich doch auf Eure Unterstützung... ;)
Zugegeben, ich bin kein NHC- und Script-Profi, aber ich habe es wenigstens geschafft, dass NHC ein geändertes S10(e) bzw. N500 Profil anzeigt.
Es stammt aus dem eeepcnews.de Forum.
Nur kommt leider die Meldung "ERROR - ACPI Control System problem detected."

Das Profil wird nicht umgesetzt: Der Lüfter startet bei 45Grad und schaltet sich nicht mehr ab (=Werkseinstellung).
Die CPU-Temperatur liegt dann bei laufenden Lüfter zwischen 39 und 44Grad, die HD bei 35Grad.
Kann jemand von Euch einen Fehler entdecken?

Lenovo.xml:
Code:
<?xml version="1.0"?>
<Lenovo>
<Model name="20021,2959" location="SYSTEM" class="S12" file="S12.cs" />
</Lenovo>
S12.cs:
Code:
//
//  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//  N o t e b o o k   H a r d w a r e   C o n t r o l   A C P I   D L L
//  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//  Example class only
//
//  It is recommended to use a c# editor which supports c# syntax highlighting
//  and supports the directive #region and #endregion. With these directives
//  the source code is much more readable and it is easy to hide or show block 
//  of code (for example you can use the c# editor "SharpDevelop 2.0").
//
public static class LENOVO
{

    #region Computer model : class S12
    //
    public static class S12
    {

        public static class FAN
        {
            // Info
            public const string description = "Notebook FAN Control";
            public const bool default_enable = false;
            public const int icon = 2;

            // Condition variables (optional)
            public static bool initialisation = false;
            public static bool enable = false;

            #region Value class for QUIET_FAN_CONTROL : class QUIET_FAN_CONTROL
            //
            public static class QUIET_FAN_CONTROL
            {
                // Properties of the value class
                public const string description = "Quiet fan control";
                public const bool nhc_visible = true; // true -> value is visible in NHC
                // Value
                public static int quiet_fan_control = 0; // It must have the same name as the class
                // (case are ignored)
                public const string unit = ""; // unit of value
                // With this class it is possible to change the value in NHC on runtime
                public static class NHC_WRITE
                {
                    public const bool nhc_write = true; // true -> it is possible to change the
                    // value in NHC
                    public const int nhc_minimum_value = 0; // the minimum value
                    public const int nhc_maximum_value = 1; // the maximum value
                    public const int nhc_default_value = 1; // the default value
                }
            }
            //
            #endregion

            #region Value class for CPU_FAN_ON_TEMP : class CPU_FAN_ON_TEMP
            //
            public static class CPU_FAN_ON_TEMP
            {
                // Properties of the value class
                public const string description = "CPU FAN ON Temperature";
                public const bool nhc_visible = true; // true -> value is visible in NHC
                // Value
                public static int cpu_fan_on_temp = 0; // It must have the same name as the class
                // (case are ignored)
                public const string unit = "°C"; // unit of value
                // With this class it is possible to change the value in NHC on runtime
                public static class NHC_WRITE
                {
                    public const bool nhc_write = true; // true -> it is possible to change the
                    // value in NHC
                    public const int nhc_minimum_value = 40; // the minimum value
                    public const int nhc_maximum_value = 65; // the maximum value
                    public const int nhc_default_value = 55; // the default value
                }
            }
            //
            #endregion

            #region Value class for CPU_FAN_OFF_TEMP : class CPU_FAN_OFF_TEMP
            //
            public static class CPU_FAN_OFF_TEMP
            {
                // Properties of the value class
                public const string description = "CPU FAN OFF Temperature";
                public const bool nhc_visible = true; // true -> value is visible in NHC
                // Value
                public static int cpu_fan_off_temp = 0; // It must have the same name as the class
                // (case are ignored)
                public const string unit = "°C"; // unit of value
                // With this class it is possible to change the value in NHC on runtime
                public static class NHC_WRITE
                {
                    public const bool nhc_write = true; // true -> it is possible to change the
                    // value in NHC
                    public const int nhc_minimum_value = 20; // the minimum value
                    public const int nhc_maximum_value = 60; // the maximum value
                    public const int nhc_default_value = 45; // the default value
                }
            }
            //
            #endregion

            #region Public definition: CPU temperatures
            //
            public static int cpu_temperature = 0;
            //
            #endregion

            #region FAN Control highspeed refresh function : highspeed_refresh()

            private const int TEMP_HYSTERESIS = 5;  // If the temperature is equal or higher
            // as (FAN_ON_TEMP.fan_on_temp +
            // TEMP_HYSTERESIS) then the FAN Control
            // is given back to the system

            private const int TEMP_HYSTERESIS_QUIET_FAN = 8;    // Temperature hysteresis for quiet fan control

            private const int TEMP_CPU_FAN_LOW_SPEED = 52;  // Temperature for low speed FAN operation
            private const int TEMP_CPU_FAN_OFF = 35;        // Temperature for FAN off

            private static bool nhc_fan_control_disabled = true;    // NHC fan control disabled (FAN is controlled by BIOS because high temperature)
            private static bool nhc_fan_on = false;                 // Actual state of the FAN
            private static bool quiet_fan_state = false;            // For quiet fan control
            private static bool quiet_fan_running = false;
            private static bool quiet_fan_control_active = false;   // Quiet control active flag
            private static int quiet_fan_control_read_temp_counter = 0;

            private static int temp_cpu = 0;
            private static int written_temp_cpu = 0;
            private static bool cpu_temperature_updated = false;

            public const int highspeed_refresh_interval = 50;
            public static bool highspeed_refresh()
            {
                // 1. Get CPU  temperatures
                if (!quiet_fan_control_active || (quiet_fan_control_read_temp_counter == 0))
                {
                    // If quiet control active do not read temperatures on every refresh to save CPU cycles
                    if (ACPI.FIELD.ReadByOffset("_SB.PCI0.LPCB.EC0.ERAM", ref temp_cpu, 0x51, 8) == false) { return false; }
                }

                // 2. Save the CPU temperatures (only if the CPU temperature is not the same
                // as the last written CPU temperature)
                if (quiet_fan_control_active)
                {
                    // Wait for both CPU temperatures
                    if (quiet_fan_control_read_temp_counter == 0)
                    {
                        if (temp_cpu != written_temp_cpu)
                        {
                            cpu_temperature = temp_cpu;
                            cpu_temperature_updated = true;
                        }

                        if (cpu_temperature_updated)
                        {
                            quiet_fan_control_read_temp_counter = 20;   // 20 * 50 ms = 2000 ms read temperatures period in quiet fan control
                        }
                    }
                    else
                    {
                        cpu_temperature_updated = false;
                    }
                }
                else
                {
                    if (temp_cpu != written_temp_cpu)
                    {
                        cpu_temperature = temp_cpu;
                    }
                }
                quiet_fan_control_active = false;

                // Check high temperatures
                if (nhc_fan_control_disabled || (cpu_temperature > CPU_FAN_ON_TEMP.cpu_fan_on_temp + TEMP_HYSTERESIS))
                {
                    // Too high temperature, disable NHC fan control and allow the BIOS firmware to do the dirty colling work
                    if (cpu_temperature <= CPU_FAN_OFF_TEMP.cpu_fan_off_temp)
                    {
                        // Colled (thanks BIOS :-)), NHC controls FAN
                        nhc_fan_control_disabled = false;
                    }
                    else
                    {
                        nhc_fan_control_disabled = true;
                    }
                    return true;
                }

                // Check normal temperature operation range
                if (nhc_fan_on)
                {
                    if (cpu_temperature <= CPU_FAN_OFF_TEMP.cpu_fan_off_temp)
                    {
                        // Colled, switch off fan
                        nhc_fan_on = false;
                    }
                }
                else
                {
                    if (cpu_temperature >= CPU_FAN_ON_TEMP.cpu_fan_on_temp)
                    {
                        // Too high temperature, switch on fan
                        nhc_fan_on = true;
                    }
                }

                // FAN hardware control
                if (nhc_fan_on)
                {
                    // Run FAN at low speed
                    if (temp_cpu != TEMP_CPU_FAN_LOW_SPEED)
                    {
                        if (ACPI.FIELD.WriteByOffset("_SB.PCI0.LPCB.EC0.ERAM", TEMP_CPU_FAN_LOW_SPEED, 0x51, 8) == false) { return false; }
                        written_temp_cpu = TEMP_CPU_FAN_LOW_SPEED;
                    }
                }
                else
                {
                    // QUIET fan control
                    if (cpu_temperature >= CPU_FAN_OFF_TEMP.cpu_fan_off_temp)
                    {
                        quiet_fan_running = true;
                    }

                    if (cpu_temperature <= CPU_FAN_OFF_TEMP.cpu_fan_off_temp - 3)
                    {
                        quiet_fan_running = false;
                    }

                    if ((QUIET_FAN_CONTROL.quiet_fan_control == 1) && quiet_fan_running)
                    {
                        // Change periodically ON/OFF states of the fan. It causes low speed fan operation
                        quiet_fan_control_active = true;
                        if (!quiet_fan_state)
                        {
                            quiet_fan_state = true;
                            if (ACPI.FIELD.WriteByOffset("_SB.PCI0.LPCB.EC0.ERAM", TEMP_CPU_FAN_OFF, 0x51, 8) == false) { return false; }
                            written_temp_cpu = TEMP_CPU_FAN_OFF;
                        }
                        else
                        {
                            quiet_fan_state = false;
                            if (ACPI.FIELD.WriteByOffset("_SB.PCI0.LPCB.EC0.ERAM", TEMP_CPU_FAN_LOW_SPEED, 0x51, 8) == false) { return false; }
                            written_temp_cpu = TEMP_CPU_FAN_LOW_SPEED;
                        }
                        if (quiet_fan_control_read_temp_counter > 0) quiet_fan_control_read_temp_counter--;
                    }
                    else
                    {
                        // Switch off FAN
                        if (temp_cpu != TEMP_CPU_FAN_OFF)
                        {
                            if (ACPI.FIELD.WriteByOffset("_SB.PCI0.LPCB.EC0.ERAM", TEMP_CPU_FAN_OFF, 0x51, 8) == false) { return false; }
                            written_temp_cpu = TEMP_CPU_FAN_OFF;
                        }
                    }
                }

                return true;
            }
            //
            #endregion
        }

        #region Thermal Zone class for CPU Temperature : class TZ00
        //
        public static class TZ00 // If the name of the Thermal Zone class is the same as the name of
        // an existing thermal zone in the system then NHC will overwrite
        // the system thermal zone
        {
            // Info
            public const string description = "CPU Temperature"; // Description of current class
            public const bool default_enable = true; // false = By default the current
            // class is disabled in NHC
            public const int icon = 5; // 5 = Temperature icon
            public const bool thermal_zone = true; // NHC will interpret this class as
            // a Thermal Zone class if this
            // value is true
            #region Value class for _TMP : class _TMP
            //
            public static class _TMP
            {
                // Properties of the value class
                public const string description = "Current CPU Temperature"; // Description of current
                // value
                public const bool nhc_visible = true; // true -> value is visible in NHC
                // Value
                public static int _tmp = 0; // It must have the same name as the class
                // (case are ignored)
                public const string unit = "°C"; // unit of the example_value class.
            }
            //
            #endregion
            public const int refresh_interval = 1; // <= 1 -> 1 Second; 2 -> 2 Seconds ...
            public static bool refresh()
            {
                if (FAN.enable == true)
                {
                    _TMP._tmp = FAN.cpu_temperature; // read cpu temperature from FAN control
                    return true;
                }
                else
                {
                    // get CPU temperature form Embedded Controller
                    return ACPI.FIELD.ReadByOffset("_SB.PCI0.LPCB.EC0.ERAM", ref _TMP._tmp, 0x51, 8);
                }
            }
        }
        //
        #endregion
    }
}
    #endregion

NHC legt auch eine 10,0 KB grosse S12.dll im acpi-Ordner ab.
Wo liegt der Hund begraben?
Vielen Dank, Martin
 
Nicht verzagen, Carsten fragen

Hi, ich habe Carsten gestern mal gefragt ob das NHC mit dem NCC auch für die neuen S10-2 & S12 funktioniert, nach Anpassung...

seine Antwort:

"Moin.
Na sicher geht das. Da muss nur mal jeweils einer die ACPI DSDT dekompilieren, um das richtige Feld und den richtigen Offset rauszufinden. Wer nicht weiß wie das geht, es aber machen möchte, PM an mich (dabei kann NICHTS passieren).

Im Test des S12 von notebookjournal.de wurde ja mal wieder die Wärmeentwicklung und Lautstärke des Gerätes bemängelt. Der S10-2 soll sich dagegen in normalen Lärmregionen aufhalten.
MfG Carsten"



Bist Du den im Forum angemeldet (Netbooknews) sonst PIN ich mal Carsten an...

Update :

habs im Forum reingeschrieben.... , wenn der am Sonntag nix besseres zu tun hat :)...



Update : Uii er ist doch da... mal sehen wie wir das über 2 Foren managen...



Grüsse KalvinKlein
 
Erstmal müssen die anderen arbeiten...

Moin!

Grrr... "Carsten" ist schon vergeben... :cursing:

Doch, ich darf gleich weiter die Küche aufbauen. :P
Aber erstmal muss BitKiller was tun. Lad Dir mal bitte diese Datei runter und extrahiere sie in den Ordner C:\acpi . Anschließend die Eingabeaufforderung öffnen, in C:\acpi gehen und dort "iasl.exe -d" ausführen. Der legt dann in dem Ordner eine dsdt_IRGENDWAS.dsl Datei an, die hängst Du bitte mal an Deine Antwort an.


MfG

Carsten
 
Wow, hätte nicht mit Antworten gerechnet!
Vielen Dank für Eure Bemühungen. :thumbsup:
Hier die dsdt_CB-01.dsl
iasl.exe hat sie im %userprofile%\ abgelegt.
Hoffentlich könnt Ihr was damit anfangen...

Über die Lautstärke des S12 kann ich mich nicht beklagen, es gibt schlimmere...
 
Ja nee, is klar...

Moin!

Es liegt daran, dass das Register beim S12 anders heißt. Beim S10e heißt das "ERAM", beim S12 nur "RAM". Außerdem weichen die Offsets ab, da müssen wir mal testen, welches der drei möglichen es ist. Ich schreib Dir heute abend mal ein kleines Testskript, das die möglichen Offsets ausliest und anzeigt und Du kontrollieren kannst, welcher der Werte mit dem Lüfter zusammenhängen könnte.

Wie gesagt... jetzt erstmal "Home Improvement" mit dem Heimwerker-King... ;)


MfG

Carsten
 
OK, klingt vielversprechend!
Vielen Dank erstmal!
Gruß, Martin
 
Danke Carsten... das klappt ja bis auf den "Namen" ...

Über 3 Foren (Netbooknews.de,Lenovo.forum & Thinkpadforum) hinweg...

so muss das gehen...





dann viel Spass beim Küchentuning :)



Schöne Grüsse und noch ein schönes Wochenende...
 
Wenn es Euch weiterhilft:
Habe mal in der S12.cs "ERAM" durch "RAM" ersetzt, es folgt keine Fehlermeldung mehr:

Der Lüfter wird aber weiterhin nicht von NHC beeinflusst...
 
Der Lüfter wird aber weiterhin nicht von NHC beeinflusst...
Jo, das 0x50 / 0x51 stimmt ja auch nicht. Welcher Wert da hin muss müssen wir ja anhand der Datei noch rausfinden.

So, mal kurz. Ersetz mal temporär Deine S12.cs durch die angehängte test.txt (musst Du in .cs umbenennen, das Forum erlaubt keine cs Dateien). Dann beobachte die ausgelesenen Werte und schau mal, ob einer davon die Temperatur anzeigt und/oder in einem Zusammenhang mit dem Verhalten des Lüfters zu stehen scheint.


MfG

Carsten
 

Anhänge

Mit der test.cs werden weiterhin unter dem Reiter "Status" CPU und HD Temperatur korrekt angezeigt,
eine Lüfteränderung konnte ich nicht feststellen, hat sich bei 45 Grad eingeschaltet und läuft und läuft...
Der ACPI Control System Debugger zeigt auch keine Fehler an.
Gruß, Martin
 
Mach mal bitte das Häkchen bei "Show only errors" weg, dann solltest Du die ausgelesenen Werte sehen. Wir müssen wissen, welcher davon mit dem Lüfterverhalten korrespondiert.


MfG

Carsten
 
Code:
ACPI.FIELD.ReadyByOffset("_SB.PC10.LPCB.EC0.RAM",ref 0, 146, 1,"ByteAcc","NoLock","Preserve")
ACPI.FIELD.ReadyByOffset("_SB.PC10.LPCB.EC0.RAM",ref 1, 149, 1,"ByteAcc","NoLock","Preserve")
ACPI.FIELD.ReadyByOffset("_SB.PC10.LPCB.EC0.RAM",ref 36, 168, 8,"ByteAcc","NoLock","Preserve")
ACPI.FIELD.ReadyByOffset("_SB.PC10.LPCB.EC0.RAM",ref 36, 169, 8,"ByteAcc","NoLock","Preserve")
.
.
.

Servus, Martin
 
36 könnte ne Temperatur sein... haut das mit Core Temp o.ä. hin?

Konntest Du schon feststellen, bei welchen Temperaturen der Lüfter an/aus/schneller/langsamer geschaltet wird?

MfG

Carsten
 
@Carsten: Ja, sieht nach Temperatur aus - die Werte wechseln ca. +-2

Lüfter ein:
Stufe1: 45 Grad
Stufe2: 60 Grad
Stufe3: 66 Grad

Lüfter aus:
Stufe1: noch nie... (<27 Grad, weiter runter komme ich nicht...)
Stufe2: 48 Grad
Stufe3: ca.60 Grad

Weiter wie 71 Grad komme ich nicht bei 2x100% Prozessorlast und abgeklebten Entüftungsschlitz... :whistling:



@KalvinKlein: Das Tool zeigt ca. 12 Grad weniger an als NHC?


Gruß, Martin
 
Beim S10e beträgt die Differenz zwischen NHC und Core Temp immer genau 20°C.

So, ich hab die test.cs mal so abgeändert, dass er den ersten, augenscheinlichen Temperaturwert mit 25 überschreibt. Permanent, der Lüfter sollte also nie angehen.

Der S12 scheint aber im Gegensatz zum S10e zwei Thermal Zones zu haben, wahrscheinlich im Vorgriff auf die ION-Variante (wenn sie denn kommt...), wo der Chipsatz einen eigenen Temp-Sensor hat. Ich habe daher auch das Kommando zum Überschreiben des zweiten Werts angefügt, aber auskommentiert (auskommentieren in C# mit "//" ).

Ich muss Dich an dieser Stelle jetzt noch darauf hinweisen, dass Du (oder jeder andere, ist ja öffentlich hier) dieses Skript auf eigene Gefahr benutzt. Sollte was kaputt gehen, ist das Dein Problem (kann aber eigentlich nicht).

MfG

Carsten
 

Anhänge

Unterschied

Ja,

.. interessant, beim S10/S10e sind das -20 Grad Unterschied...Das beweisst das beim S12 etwas anders gemessen wird...

Ich lasse das Coretemp immer bei BIOS Tests mitlaufen..man muss eben nur Wissen das da ne Abweichung besteht...



Aaah Carsten hat schneller getippt.... :)

Schönen Abend noch ... KalvinKlein
 
Mit dem neuen Script kann ich keine Änderung feststellen.
Lüfter und Temperaturanzeigen sind gleich geblieben.

Hoffentlich bekommen wir das hin... ^^
Tschau, Martin
 
@KalvinKlein: Zwei Doofe, ein Gedanke... ;)

@BitKiller:
Es liegt meist an völlig banalen Kleinigkeiten, die große Wirkung haben. Beim S10e hab ich zwei Tage davor gesessen, bis es lief, und hier muss ich Dich fernsteuern... ;)

Der Temperatur-Trick funktioniert aber eigentlich auf jedem Notebook...

Auf ein neues! Sollte der immer noch nichts machen, entferne bitte mal die Auskommentierung der zweiten Write-Zeile.
Denk auch bitte daran, dass NHC beendet und neu gestartet werden muss, damit Änderungen an der cs-Datei übernommen werden - falls noch nicht bekannt. :)

MfG

Carsten
 

Anhänge

Leider auch kein Unterschied.
[quote='CW82',index.php?page=Thread&postID=626391#post626391]Sollte der immer noch nichts machen, entferne bitte mal die Auskommentierung der zweiten Write-Zeile.[/quote]
Komme da leider nicht ganz mit... ?(

[quote='CW82',index.php?page=Thread&postID=626391#post626391]Denk auch bitte daran, dass NHC beendet und neu gestartet werden muss.[/quote]
Habe ich gerade beim vorigen Script mitbekommen, darum war kurz ein Edit vorhanden... ;)

Gruß, Martin
 
  • ok1.de
  • thinkstore24.de
  • ok2.de - Notebook Computer Server
  • Preiswerte-IT - Gebrauchte Lenovo Notebooks kaufen

Werbung

Zurück
Oben