cze 8, 2010

Asus P5AD2 Deluxe


Here you will find system senors configuration for my main computer ASUS P5AD2 Deluxe motherboard.
Kategoria: lm_sensors
Napisał: kardasa

Foreword

My main computer has motherboard ASUS P5AD2 Deluxe, which has many useful sensors. As I'm using my computer in variety of ways including, video and audio editing, gaming and as every Gentoo Linux user I'm running lots of compilation tasks, I would like to know how this tasks are affecting my system. The lm_sensors are giving my detailed information of my current system state. What is extremely important for me is temperature monitors. I found out that my computer has a tendency to overheat, when the radiators cooling most important components of my computer are filled with dust. Watching system monitoring status gives direct information when I should open my computer case and clean it up. Do not underestimate this. Cleaning CPU radiator gives a temperature reading lower by about 10 degrees.

I will try to share here configuration that is coming from my ASUS P5AD2 Deluxe motherboard. Described below configuration is applicable to Gentoo Linux distribution but most important thing the lm_sensors configuration file should work on any Linux distribution. I will start with kernel configuration.

Kernel Configuration

My motherboead has Winbond W83627EHF/EF/EHG/EG Super IO family sensors. To configure my kernel I had to enter kernel catalog and start menuconfig by running following commands in terminal:

cd /usr/src/linux
make menuconfig

Next I had to mark all modules needed to make my sensors work. Below you will find list of needed kernel modules.

Linux Kernel Configuration: Sensor Kernel modules
Device Drivers  --->
    <*> Hardware Monitoring Support --->
        <M> Winbond W83627EHF/EHG/DHG, W83667HG

As you can see support for sensor chip will be build as module. This is highly important because this module will be loaded by lm_sensors system service. Now we are ready to recompile, install and use new kernel. I usually do it by running this commands in terminal:

cd /usr/src/linux
make && make modules_install install

Now it's good time to reboot the machine with new kernel and install lm_sensors.

Lm Sensors Configuration

I use lm_sensors 3.x and I would not recommend using older version. To install lm_sensors in Gentoo system you need to run this commands in terminal:

emerge -av sys-apps/lm_sensors

Next thing we should do is to make sure that programs able to use system sensors will be compiled with this support. To do it we need to add lm_sensors use flag to our /etc/make.conf file. After doing this it is good idea to check which of installed programs should be recompiled. You can do it by using gentoolkit equery utility like this:

equery hasuse lm_sensors
 * Searching for USE flag lm_sensors ... 
[I--] [  ] app-admin/gkrellm-2.3.2-r1 (2)
[I--] [ ~] kde-base/ksysguard-4.4.4 (4.4)
[I--] [ ~] net-analyzer/net-snmp-5.4.2.1-r4 (0)

After rebuilding all packages we may go to lm_sensors configuration. First thing we need to provide is sensors module configuration. The sensors-detect utility which is part of lm_sensors package probed my sensor chip correctly. Below you can see /etc/conf.d/lm_sensors configuration file generated by sensors-detect.

View the full /etc/conf.d/lm_sensors configuration file
  1. # Generated by sensors-detect on Thu Jun 17 17:47:14 2010
  2. # This file is sourced by /etc/init.d/lm_sensors and defines the modules to
  3. # be loaded/unloaded.
  4. #
  5. # The format of this file is a shell script that simply defines variables:
  6. # HWMON_MODULES for hardware monitoring driver modules, and optionally
  7. # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
  8.  
  9. # Load modules at startup
  10. LOADMODULES=yes
  11.  
  12. # Initialize sensors at startup
  13. INITSENSORS=yes
  14.  
  15. HWMON_MODULES="w83627ehf"
  16.  
  17. # For compatibility reasons, modules are also listed individually as variables
  18. # MODULE_0, MODULE_1, MODULE_2, etc.
  19. # Please note that the numbers in MODULE_X must start at 0 and increase in
  20. # steps of 1. Any number that is missing will make the init script skip the
  21. # rest of the modules. Use MODULE_X_ARGS for arguments.
  22. #
  23. # You should use BUS_MODULES and HWMON_MODULES instead if possible.
  24.  
  25. MODULE_0=w83627ehf

As you can see the most important thing in this file is line on the bottom part which is responsible for loading sensor module. Fortunately this part of configuration did not required any additional work.

Last thing we need to do is to provide our sensor configuration. The generic configuration for lm_sensors is kept in /etc/sensors3.conf file. I found out that kept there configuration need to be tuned up to match sensor configuration from my motherboard. Thats why I created my own configuration. The important thing is to remember not to change default file, because you will loose your configuration with every lm_sensors update. You should create your personal configuration in /etc/sensors.d/ catalog. Below you can see configuration file created for my motherboard sensors.

View the full /etc/sensors.d/asus-P5AD2-Deluxe configuration file
  1. chip "w83627ehf-*"
  2.  
  3. # VOLTAGES
  4. # Vcore
  5. label in0 "Vcore"
  6. set in0_min 0.85
  7. set in0_max 1.6
  8.  
  9. # +12V
  10. label in1 "+12V"
  11. compute in1 @*(66/10), @/(66/10)
  12. set in1_min 10.2
  13. set in1_max 13.8
  14.  
  15. # unused
  16. ignore in2
  17.  
  18. # +5V
  19. label in6 "5V"
  20. compute in6 @*(32/10), @/(32/10)
  21. set in6_min 5.0*0.85
  22. set in6_max 5.0*1.05
  23.  
  24. # +3.3V
  25. label in3 "+3.3V"
  26. set in3_min 3.3*0.95
  27. set in3_max 3.3*1.05
  28.  
  29. # unused
  30. ignore in4
  31. ignore in5
  32. ignore in7
  33. ignore in8
  34. ignore in9
  35.  
  36. # Fans
  37. #Case Fan 1
  38. label fan1 "Case Fan1"
  39. set fan1_min 1300
  40.  
  41. #Case Fan2
  42. label fan3 "Case Fan2"
  43. set fan3_min 1600
  44.  
  45. #Case Fan3
  46. label fan5 "Case Fan3"
  47. #This dont seem to affect the settings
  48. #set fan5_min 1600
  49.  
  50. #CPU Fan
  51. label fan2 "CPU Fan"
  52. set fan2_min 1600
  53.  
  54. #unused
  55. ignore fan4
  56.  
  57. # Temparatures
  58. #System temparature
  59. label temp1 "System Temp"
  60. set temp1_max 60
  61. set temp1_max_hyst 50
  62.  
  63. #CPU Temp
  64. label temp2 "CPU Temp"
  65. set temp2_max 85
  66. set temp2_max_hyst 79
  67.  
  68. #Motherboard Temp
  69. label temp3 "Mth Temp"
  70. set temp3_max 65
  71. set temp3_max_hyst 55

As you can see my motherboard has wide range of useful sensors. On the top of the file I'm providing sensor chip name. First part is defining voltage sensors. I'm providing minimum and maximum possible voltage values. You may noticed that some of my sensors are ignored. I found out that those sensors did not gave any output values, seems they are not available or not being used by my motherboard. Second part is fan speed meters. I have 3 chase and a CPU fan. For fan values I'm providing only minimal values. Last part and the most important one is temperature monitor. I have 3 temperature sensors: CPU, motherboard and system. You may see here a hyst and max settings. This settings make use of hysteresis mechanism. When my system will enter maximum defined temperature, it will trigger an Alarm, then another tool can react to alarm by for example lowering CPU performance. This should end up in lowering it's temperature. The hysteresis will trigger off the alarm when the hyst value is met. This mechanism prevents switching on and off alarm trigger to often.

Now I'm ready to use my sensors. I can start them by running following command in terminal:

/etc/init.d/lm_sensors start

For newer kernel there may be a problem with running sensors for P5AD2 Deluxe motherboard, to prevent this I had to pass additional kernel parameter. Here you can see my kernel configuration from boot up grub application:

kernel /boot/vmlinuz-2.6.33-r2-gentoo-sources root=/dev/sda5  noapic CONSOLE=/dev/tty1 acpi=on acpi_enforce_resources=lax

The last parameter acpi_enforce_resources=lax will make sensors running even with latest kernel.

To make my lm_sensors start as system service I have to run following command in terminal:

rc-update add lm_sensors default

To check my machine temperature state I have to run this simple command in terminal:

sensors
w83627ehf-isa-0290
Adapter: ISA adapter
Vcore:       +1.32 V  (min =  +0.85 V, max =  +1.60 V)
+12V:       +12.36 V  (min = +10.19 V, max = +13.46 V)
+3.3V:       +3.38 V  (min =  +2.98 V, max =  +3.63 V)
5V:          +4.99 V  (min =  +4.25 V, max =  +5.25 V)
Case Fan1:  1506 RPM  (min = 1308 RPM, div = 8)
CPU Fan:    2109 RPM  (min = 1607 RPM, div = 8)
Case Fan2:  1985 RPM  (min = 1607 RPM, div = 8)
Case Fan3:  1917 RPM  (min =    0 RPM, div = 4)
System Temp: +40.0°C  (high = +60.0°C, hyst = +50.0°C)  sensor = thermistor
CPU Temp:    +63.5°C  (high = +85.0°C, hyst = +79.0°C)  sensor = diode
Mth Temp:    +43.0°C  (high = +65.0°C, hyst = +55.0°C)  sensor = thermistor

Prove that it's working

Sources

titlepl: Asus P5AD2 Deluxe
summarypl: Tutaj znajdziesz konfigurację sensorów systemowych dla płyty głównej ASUS P5AD2 Deluxe z mojego głównego komputera.
contentpl: 

Wstęp

Mój główny komputer posiada płytę główną ASUS P5AD2 Deluxe, która posiada wiele użytecznych czujników. Jako, że wykorzystuję mój komputer na różne sposoby min: do obróbki video i audio, grania i jak każdy użytkownik Gentoo Linuxa dość dużo kompiluję, chciałbym wiedzieć jak te zadania wpływają na mój system. Lm_senors dają mi szczegółową informację o aktualnym stanie systemu. Szczególnie ważna jest możliwość monitorowanie temperatury. Stwierdziłem, że mój komputer ma tendencję do przegrzewania się, jeśli radiatory chłodzące najważniejsze komponenty mojego komputera są pełne kurzu. Obserwowanie statusu monitorów daje mi dokładną informację, kiedy powinienem otworzyć obudowę mojego komputera i go wyczyścić. Nie warto tego nie doceniać. Czyszczenie radiatora na procesorze sprawia, że odczyty temperatury spadają o około 10 stopni.

Postaram się tutaj podzielić konfiguracją pochodząca z mojego komputera z płytą główną ASUS P5AD2 Deluxe. Opisana poniżej konfiguracja dotyczy Gentoo Linuxa, ale jej najważniejsza część czyli plik konfiguracyjny lm_sensors powinien działać w dowolnej dystrybucji. Rozpocznę swój opis od konfiguracji kernela.

Konfiguracja kernela

Moja płyta główna posiada czujnik z rodziny Winbond W83627EHF/EF/EHG/EG Super IO. Aby skonfigurować kernel musiałem wejść do katalogu z jego źródłami i uruchomić menuconfig wykonując następujące komendy w terminalu:

cd /usr/src/linux
make menuconfig

Następnie musiałem zaznaczyć wszystkie moduły niezbędne do działania moich czujników. Poniżej odnajdziesz listę wymaganych modułów kernela.

Konfiguracja Kernela Linuxa: moduły Czujników Kernela
Device Drivers  --->
    <*> Hardware Monitoring Support --->
        <M> Winbond W83627EHF/EHG/DHG, W83667HG

Jak widzisz wsparcie dla czujników mojej płyty głównej zostanie zbudowana jako moduł. Jest to bardzo ważne gdyż ten moduł zostanie załadowany przez usługę systemową lm_sensors. Teraz możemy skompilować, zainstalować i wykorzystać nowy kernel. Zwykle dokonuję tego wykonując następujące komendy w terminalu:

cd /usr/src/linux
make && make modules_install install

Teraz należy zrestartować komputer z nowym kernelem i zainstalować lm_sensors.

Konfiguracja Lm Sensors

Ja używam lm_sensors 3.x i nie polecam używania starszych wersji. Aby zainstalować lm_sensors w systemie Gentoo należy wydać następującą komendę w terminalu::

emerge -av sys-apps/lm_sensors

Następną rzeczą jaką trzeba zrobić to upewnić się, że programy, które są w stanie wykorzystać czujniki systemowe będą skompilowane, ze wsparciem dla tej funkcji. Aby tego dokonać musimy dodać flagę use lm_sensors do naszego pliku /etc/make.conf. Po dopisaniu tej flagi, dobrze jest sprawdzić, które z zainstalowanych programów powinny zostać ponownie skompilowane. Można to sprawdzić wykorzystując narzędzie equery z pakietu gentoolkit w ten sposób:

equery hasuse lm_sensors
 * Searching for USE flag lm_sensors ... 
[I--] [  ] app-admin/gkrellm-2.3.2-r1 (2)
[I--] [ ~] kde-base/ksysguard-4.4.4 (4.4)
[I--] [ ~] net-analyzer/net-snmp-5.4.2.1-r4 (0)

Po przebudowaniu wszystkich pakietów możemy przejśc do konfiguracji lm_sensors. Najpierw należy dokonać konfiguracji modułów lm_sensors. Narzędzie sensors-detect, które jest częścią pakietu lm_sensors rozpoznało moje czujniki prawidłowo. Poniżej możesz zobaczyć plik konfiguracyjny /etc/conf.d/lm_sensors wygenerowany poprzez sensors-detect.

Wyświetl pełny plik konfiguracyjny /etc/conf.d/lm_sensors
  1. # Generated by sensors-detect on Thu Jun 17 17:47:14 2010
  2. # This file is sourced by /etc/init.d/lm_sensors and defines the modules to
  3. # be loaded/unloaded.
  4. #
  5. # The format of this file is a shell script that simply defines variables:
  6. # HWMON_MODULES for hardware monitoring driver modules, and optionally
  7. # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
  8.  
  9. # Load modules at startup
  10. LOADMODULES=yes
  11.  
  12. # Initialize sensors at startup
  13. INITSENSORS=yes
  14.  
  15. HWMON_MODULES="w83627ehf"
  16.  
  17. # For compatibility reasons, modules are also listed individually as variables
  18. # MODULE_0, MODULE_1, MODULE_2, etc.
  19. # Please note that the numbers in MODULE_X must start at 0 and increase in
  20. # steps of 1. Any number that is missing will make the init script skip the
  21. # rest of the modules. Use MODULE_X_ARGS for arguments.
  22. #
  23. # You should use BUS_MODULES and HWMON_MODULES instead if possible.
  24.  
  25. MODULE_0=w83627ehf

Jak widzisz najważniejszą rzeczą w tym pliku jest linia w dolnej jego części odpowiedzialna za ładowanie modułu czujnika. Na szczęście ta część konfiguracji nie wymagała dodatkowej pracy.

Ostatnią rzeczą jaką musimy zrobić to skonfigurować czujniki. Domyślna konfiguracja dla lm_sensors jest trzymana w pliku /etc/sensors3.conf. Przekonałem się, że przechowywane tam ustawienia dotyczące sensorów mojej płyty głównej wymagają dodatkowej konfiguracji. Dlatego stworzyłem własną konfigurację. Ważną rzeczą jest aby pamiętać o nie dokonywaniu zmian w domyślnym pliku, ponieważ stracisz swoją konfigurację przy każdej aktualizacji lm_sensors. Powinno się stworzyć osobną konfigurację w katalogu /etc/sensors.d/. Poniżej możesz zobaczyć plik konfiguracyjny stworzony dla czujników mojej płyty głównej.

Wyświetl pełny plik konfiguracyjny /etc/sensors.d/asus-P5AD2-Deluxe
  1. chip "w83627ehf-*"
  2.  
  3. # VOLTAGES
  4. # Vcore
  5. label in0 "Vcore"
  6. set in0_min 0.85
  7. set in0_max 1.6
  8.  
  9. # +12V
  10. label in1 "+12V"
  11. compute in1 @*(66/10), @/(66/10)
  12. set in1_min 10.2
  13. set in1_max 13.8
  14.  
  15. # unused
  16. ignore in2
  17.  
  18. # +5V
  19. label in6 "5V"
  20. compute in6 @*(32/10), @/(32/10)
  21. set in6_min 5.0*0.85
  22. set in6_max 5.0*1.05
  23.  
  24. # +3.3V
  25. label in3 "+3.3V"
  26. set in3_min 3.3*0.95
  27. set in3_max 3.3*1.05
  28.  
  29. # unused
  30. ignore in4
  31. ignore in5
  32. ignore in7
  33. ignore in8
  34. ignore in9
  35.  
  36. # Fans
  37. #Case Fan 1
  38. label fan1 "Case Fan1"
  39. set fan1_min 1300
  40.  
  41. #Case Fan2
  42. label fan3 "Case Fan2"
  43. set fan3_min 1600
  44.  
  45. #Case Fan3
  46. label fan5 "Case Fan3"
  47. #This dont seem to affect the settings
  48. #set fan5_min 1600
  49.  
  50. #CPU Fan
  51. label fan2 "CPU Fan"
  52. set fan2_min 1600
  53.  
  54. #unused
  55. ignore fan4
  56.  
  57. # Temparatures
  58. #System temparature
  59. label temp1 "System Temp"
  60. set temp1_max 60
  61. set temp1_max_hyst 50
  62.  
  63. #CPU Temp
  64. label temp2 "CPU Temp"
  65. set temp2_max 85
  66. set temp2_max_hyst 79
  67.  
  68. #Motherboard Temp
  69. label temp3 "Mth Temp"
  70. set temp3_max 65
  71. set temp3_max_hyst 55

Jak widzisz moja płyty główna posiada bardzo wiele użytecznych czujników. W górnej części pliku podaje nazwę układu moich czujników. Pierwsza część pliku definiuje czujniki napięcia. Podaje tu minimalne i maksymalne dopuszczalne poziomy napięcia. Możesz zauważyć, że niektóre czujniki są przeze mnie ignorowane. Przekonałem się, że te czujniki nie zwracają żadnych informacji, tym samym wydaje się, że nie są one dostępne lub nie są one wykorzystywane przez moją płytę główną. Drugą część stanowią mierniki prędkości wentylatorów. Posiadam 3 wentylatory w obudowie i wentylator na procesorze. Dla wentylatorów podaję tylko minimalne wartości. Ostatnią i najważniejszą rzeczą są monitory temperatury. Posiadam 3 czujniki temperatury: procesora, płyty głównej i systemu. Możesz w tym miejscu dostrzec ustawienia hyst i max. Te ustawienia używają mechanizmu histerezy. Kiedy temperatura mojego systemu przekroczy maksymalną wartość, zgłoszony zostanie Alarm, wtedy inne narzędzie może zareagować na ten alarm i na przykład zmniejszyć wydajność procesora. To powinno spowodować obniżenie temperatury. Histereza wyłączy alarm wtedy kiedy temperatura spadnie poniżej wartości hyst. Ten mechanizm przeciwdziała zbyt częstemu włączaniu i wyłączaniu alarmów.

Teraz mogę wykorzystać moje sensory. Mogę je uruchomić wykonując następującą komendę w terminalu:

/etc/init.d/lm_sensors start

Dla nowszych kerneli występuje problem z uruchamianiem sensorów dla płyty głównej P5AD2 Deluxe, aby wykluczyć ten problem musiałem przekazać dodatkowy parametr do kernela. Poniżej możesz zobaczyć moją konfigurację kernela z programu rozruchowego grub:

kernel /boot/vmlinuz-2.6.33-r2-gentoo-sources root=/dev/sda5  noapic CONSOLE=/dev/tty1 acpi=on acpi_enforce_resources=lax

Ostatni parametr acpi_enforce_resources=lax sprawi, że sensory będą się uruchamiać nawet dla najnowszego kernela.

Aby sprawić żeby moje lm_sensors startowały jako usługa systemowa muszę wykonać następującą komendę w terminalu:

rc-update add lm_sensors default

Aby sprawdzić stan temperatury mojego komputera muszę wykonać następującą komendę w terminalu:

sensors
w83627ehf-isa-0290
Adapter: ISA adapter
Vcore:       +1.32 V  (min =  +0.85 V, max =  +1.60 V)
+12V:       +12.36 V  (min = +10.19 V, max = +13.46 V)
+3.3V:       +3.38 V  (min =  +2.98 V, max =  +3.63 V)
5V:          +4.99 V  (min =  +4.25 V, max =  +5.25 V)
Case Fan1:  1506 RPM  (min = 1308 RPM, div = 8)
CPU Fan:    2109 RPM  (min = 1607 RPM, div = 8)
Case Fan2:  1985 RPM  (min = 1607 RPM, div = 8)
Case Fan3:  1917 RPM  (min =    0 RPM, div = 4)
System Temp: +40.0°C  (high = +60.0°C, hyst = +50.0°C)  sensor = thermistor
CPU Temp:    +63.5°C  (high = +85.0°C, hyst = +79.0°C)  sensor = diode
Mth Temp:    +43.0°C  (high = +65.0°C, hyst = +55.0°C)  sensor = thermistor

Dowód, że to działa

Źródła