No announcement yet.

Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

    Short version : even if you do not want to read everything you can still help me by simply sending me the exact values you get for +5.00V, +12.00V, +3.30V in the bios H/W Monitor screen.

    Long version :

    I use Linux (Debian Wheezy). I want to be able to send an alert if there is a problem with voltages, temperature or fan speed. To access the Asrock E3C226D2I Nuvoton NCT5573 I loaded the module w83627ehf and then can access to the values with lm-sensors "sensors" command. Unfortunatelly, the values displayed are not directly usable as they need to be scaled to get the real values.

    Indeed, most voltage monitoring chips cannot accept high voltage values and the voltage need to be scaled down (by resistors) before being send to the chip. Afterwards, when the value is read it just need to be multipled by a constant to get the real voltage value. The problem is only the board manufacturer knows theses values ...

    So if someone from Asrock can give me the scaling factors it would be the fastest way ...

    But, as engineers time is precious I would be suprised if I get an answer. But there is another way cleaver way to get the values. Please read VoltageLabelsAndScaling for the method description.

    For the rest of the message I suppose that you read the previous link.

    I managed to do the first steps :
    • I did not manage to get the Nuvoton NCT5573 datasheet but I found the NCT6776F/NCT6776D datasheet and I hope that they are similar (in linux the driver detects a nct6776-isa-0290) ...
    • From this I know that voltages greater than 2.048V (or negative) have to be scaled.
    • Also there is an integrated voltage divisor suitable for voltages around 3V (and I suppose the linux driver automaticaly scale back these values).
    • Finally the values are read with a 8 bits ADC with 8mV LSB (256 steps x 8mV = 2.048 V)


    But my power supply is either very stable or the bios H/W monitor does not update the
    +5.00V, +12.00V, +3.30V values because I got only one set of values (+5.112 +12.144 and +3.344). Remark : I do not use the remote management values because they are less precise (and still not changing).

    Now how you can help ? I simply need your values as displayed by the bios H/W Monitor section +5.00V, +12.00V, +3.30V.

    Thank for you help ! If I manage to get a good configuration I will share it with everyone.

    Cheers,
    --
    Ludovic

  • #2
    Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

    Sorry it took a few days for the answer. I need to establish a contact with the engineer in HQ (TW) to get the appropriate information. Here you go, hope that helps.

    + 5.00V :
    Status = HWMRead(0x00,0x25,&temp) ; // Register 0x25
    VIN2 = (temp * 8 * (SIO_R1_VIN2 + SIO_R2_VIN2)) / SIO_R2_VIN2;
    SIO_R1_VIN2 = 20, SIO_R2_VIN2=10;

    + 12.00V :
    Status = HWMRead(0x00,0x26,&temp) ; // Register 0x26
    VIN3 = (temp * 8 * (SIO_R1_VIN3 + SIO_R2_VIN3)) / SIO_R2_VIN3;
    SIO_R1_VIN3 = 56, SIO_R2_VIN3=10;

    +3.30V :
    Status = HWMRead(0x00,0x23,&temp) ; // Register 0x23,
    3VCC = (temp * 8 * (SIO_R1_3VCC + SIO_R2_3VCC)) / SIO_R2_3VCC;
    SIO_R1_3VCC=34, SIO_R2_3VCC=34;

    Comment


    • #3
      Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

      Bill, thank a lot for the answer, It was a very good surprise.

      In case other people are interested here is a short guide to configure lm-sensors for ASRock E3C226D2I :
      <tt>
      </tt>
      • Install lm-sensors package
      • <tt>In file "/etc/modules</tt>"
      Code:
      # not using "w83627ehf" as it disables IN6 (+12V)
      nct6775
      • In file "/etc/sensors.d/asrock_e3c226d2i"
      Code:
      # From ASRock technical support :
      # * Scaling : VALUE * (R1+R2)/R2 * 8mV
      #   (*8 already done by driver)
      # * +3.30V : register 0x23 R1=34 and R2=34
      #   (integrated resistors, scaling already done by driver)
      # * +5.00V : register 0x25 R1=20 and R2=10
      # * +12.00V : register 0x26 R1=56 and R2=10
      #
      # From nct6775 module source code :
      # 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x550, 0x551, 0x552
      #  in0   in1   in2   in3   in4   in5   in6    in7    in8    in9
      #                   +3.3V        +5V  +12V
      
      chip "nct6776-*"
          # Voltages ------------------------------------------------------------
          label in3 "+3.30V"
          set in3_min  3.3 * 0.95
          set in3_max  3.3 * 1.05
              
          label in5 "+5.00V"
          compute in5 @*3, @/3
          set in5_min  5.0 * 0.95
          set in5_max  5.0 * 1.05
      
          label in6 "+12.00V"
          compute in6 @*6.6,@/6.6
          set in6_min  12.0 * 0.95
          set in6_max  12.0 * 1.05
      
          # Need more documentation :
          ignore in0
          ignore in1
          ignore in2
          ignore in4
          ignore in7
          ignore in8
      
          # Temperatures --------------------------------------------------------
          label temp1 "M/B Temp"
          set temp1_max 60
          set temp1_max_hyst 50
      
          label temp2 "CPU Temp"
          set temp2_max 80
          set temp2_max_hyst 75   
      
          # Fans ----------------------------------------------------------------
          # No value, controlled by ASPEED AST2300 ?
          ignore fan1
          ignore fan2
      
          # Disable unconnected sensors -----------------------------------------
          ignore intrusion0
          ignore intrusion1
          ignore cpu0_vid
          ignore beep_enable
          ignore temp3  # AUXTIN
          ignore temp7  # PECI Agent 0
          ignore temp8  # PCH_CHIP_TEMP
          ignore temp9  # PCH_CPU_TEMP
          ignore temp10 # PCH_MCH_TEMP
      • Restart the service (to set the limits):
      Code:
      service lm-sensors restart
      • Test configuration : execute the command "sensors"
      Code:
      nct6776-isa-0290
       Adapter: ISA adapter
      +3.30V:       +3.34 V  (min =  +2.98 V, max =  +3.63 V)
      +5.00V:       +5.11 V  (min =  +4.75 V, max =  +5.26 V)
      +12.00V:     +12.14 V  (min = +11.40 V, max = +12.62 V)
      M/B Temp:     +26.0°C  (high = +60.0°C, hyst = +50.0°C)  sensor = thermistor
      CPU Temp:     +27.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor

      Comment


      • #4
        Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

        Ludovic, thanks for sharing your knowledge with other users!

        Comment


        • #5
          Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

          Bill,

          If it is not asking to much, I would like to ask a few questions for the engineer to have a complete lm-sensor support (and add it to lm-sensors/ASRock) :
          • Question 1 : I would like to get the registers and resistances values for the remaining voltages. At least for Vcore and BAT, but I you provide the other values (ATX+5VSB, +3VSB, VCCM,+1.05V, VCCIO_OUT) it would be perfect
          • Question 2 : I did not manage to get information from the fans. I have 2 hypothesis, could you tell me if one of the is right ?
            • The linux support for Nuvoton NCT5573 is incomplete, which would not be a surprise as the datasheet is not publicly available
            • They are directly controlled by the ASPEED AST2300 chip (I managed to access it from linux directly with IPMI, it works well)



          Cheers,
          --
          Ludovic

          Comment


          • #6
            Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

            Hi Ludovic, here is the update. Hope it's helpful.

            Click image for larger version

Name:	isensor.jpg
Views:	1
Size:	90.5 KB
ID:	754236

            Comment


            • #7
              Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

              Any progress on getting the fan speed reported? I'm trying to lower the RPM, but no luck so far in detecting the fan speed, so fancontrol doesn't work.

              Thanks for the lm-sensors config btw :-)

              Comment


              • #8
                Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                Originally posted by tty33 View Post
                Any progress on getting the fan speed reported?
                I only managed to get fan speed through IPMI :
                Code:
                modprobe ipmi_si
                modprobe ipmi_devintf
                ipmitool sensor
                [...]
                CPU_FAN1         | 1100.000   | RPM        | ok    | na        | na        | 300.000   | na        | na        | na        
                REAR_FAN1        | 400.000    | RPM        | ok    | na        | na        | 300.000   | na        | na        | na        
                FRNT_FAN1        | 500.000    | RPM        | ok    | na        | na        | 300.000   | na        | na        | na        
                [...]
                Originally posted by tty33 View Post
                I'm trying to lower the RPM, but no luck so far in detecting the fan speed, so fancontrol doesn't work.
                Can you access to the fans PWM interface ? I tried many kernel modules but not one could see the PWM interface. If you cannot access the PWM interface, you will not be able to change the fan speed.

                But if you only want to reduce the fan speed, I suggest you upgrade to the latest BIOS and use the fan speed control in the BIOS. The control is quite complete and allow to associate fan speed with temperatures intervals.

                Originally posted by tty33 View Post
                Thanks for the lm-sensors config btw :-).
                Thanks, I will put an updated version with the missing fields values.

                Comment


                • #9
                  Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                  Sorry to dig it up. I am wondering if anyone figure out how to control the fan speed (pwmconfig--> fancontrol)? My motherboard is Asrock C2550D4I but it uses the same NCT6776 chip.

                  But at least this thread explained why the fan readings are 0 since they are not controlled by nct6776... Thanks!

                  I can set the fan speed in the bios through remote session, but it is not convenient (need to reboot every time). And sometimes, the fans just go crazy and spin at top speed..

                  Thanks in advance!

                  Comment


                  • #10
                    Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                    Originally posted by littlelio View Post
                    Sorry to dig it up. I am wondering if anyone figure out how to control the fan speed (pwmconfig--> fancontrol)? My motherboard is Asrock C2550D4I but it uses the same NCT6776 chip.

                    But at least this thread explained why the fan readings are 0 since they are not controlled by nct6776... Thanks!

                    I can set the fan speed in the bios through remote session, but it is not convenient (need to reboot every time). And sometimes, the fans just go crazy and spin at top speed..
                    So far I have been completely unable to control the fans on my C2750D4I board under Linux (Ubuntu 14.04 LTS).
                    pwmconfig reports:
                    Code:
                    Found the following devices:
                       hwmon0/device is coretemp
                       hwmon1 is nct6776
                    
                    Found the following PWM controls:
                       hwmon1/pwm1           current value: 255
                       hwmon1/pwm2           current value: 255
                    
                    Giving the fans some time to reach full speed...
                    Found the following fan sensors:
                       hwmon1/fan1_input     current speed: 0 ... skipping!
                       hwmon1/fan2_input     current speed: 0 ... skipping!
                    
                    There are no working fan sensors, all readings are 0.
                    Make sure you have a 3-wire fan connected.
                    You may also need to increase the fan divisors.
                    See doc/fan-divisors for more information.
                    I'm wondering if this is a side-effect of setting all the fans to "smart" in the BIOS. I have 3 3-pin fans attached to the REAR-FAN1, REAR_FAN2, and FRNT_FAN1 headers (confirmed in the IPMI console).

                    BTW, the Nuvoton SuperIO chip is actually mis-detected, as it's a nct5573, not a nct6776. However, a post from a Nuvoton engineer on the lm-sensors mailing list indicates strongly that both can be covered by the same driver.

                    I think I got the Voltages right, but if Bill could get the HQ engineers to confirm the information in the attachment, that would be lovely.
                    Next step is to get the fans to quiet down a fair bit.
                    Attached Files

                    Comment


                    • #11
                      Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                      Originally posted by Retteren View Post
                      So far I have been completely unable to control the fans on my C2750D4I board under Linux (Ubuntu 14.04 LTS).
                      pwmconfig reports:
                      Code:
                      Found the following devices:
                         hwmon0/device is coretemp
                         hwmon1 is nct6776
                      
                      Found the following PWM controls:
                         hwmon1/pwm1           current value: 255
                         hwmon1/pwm2           current value: 255
                      
                      Giving the fans some time to reach full speed...
                      Found the following fan sensors:
                         hwmon1/fan1_input     current speed: 0 ... skipping!
                         hwmon1/fan2_input     current speed: 0 ... skipping!
                      
                      There are no working fan sensors, all readings are 0.
                      Make sure you have a 3-wire fan connected.
                      You may also need to increase the fan divisors.
                      See doc/fan-divisors for more information.
                      I'm wondering if this is a side-effect of setting all the fans to "smart" in the BIOS. I have 3 3-pin fans attached to the REAR-FAN1, REAR_FAN2, and FRNT_FAN1 headers (confirmed in the IPMI console).

                      BTW, the Nuvoton SuperIO chip is actually mis-detected, as it's a nct5573, not a nct6776. However, a post from a Nuvoton engineer on the lm-sensors mailing list indicates strongly that both can be covered by the same driver.

                      I think I got the Voltages right, but if Bill could get the HQ engineers to confirm the information in the attachment, that would be lovely.
                      Next step is to get the fans to quiet down a fair bit.
                      I think the main problem is that the fans are not controlled by the Nuvoton SuperIO chip but by the IPMI/BMC. There must me some IPMI command to control the fans, we just need to find it.

                      Comment


                      • #12
                        Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                        Originally posted by yakideo View Post
                        I think the main problem is that the fans are not controlled by the Nuvoton SuperIO chip but by the IPMI/BMC. There must me some IPMI command to control the fans, we just need to find it.
                        Please check your current BMC firmware version. The latest BMC firmware is 0.14.0 ASRock Rack > E3C226D2I and it has added the formulated Smart Fan function.

                        Comment


                        • #13
                          Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                          Originally posted by ASRockRack TSD - Bill View Post
                          Please check your current BMC firmware version. The latest BMC firmware is 0.14.0 ASRock Rack > E3C226D2I and it has added the formulated Smart Fan function.
                          Sorry to confuse you Bill, but yakideo and I are mixing in the C2750D4I into this thread. I'll PM you.

                          Comment


                          • #14
                            Re: Asrock E3C224D2I / E3C226D2I lm-sensors (linux) configuration

                            Hey guys,

                            Any chance of similar configuration information to label and compute the in-* for the Q1900DC-ITX? lm-sensors output is:

                            Code:
                            nct6776-isa-0290
                            Adapter: ISA adapter
                            Vcore:          +0.68 V  (min =  +0.00 V, max =  +1.74 V)
                            in1:            +1.85 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
                            AVCC:           +3.34 V  (min =  +2.98 V, max =  +3.63 V)
                            +3.3V:          +3.34 V  (min =  +2.98 V, max =  +3.63 V)
                            in4:            +0.90 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
                            in5:            +1.70 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
                            in6:            +0.82 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
                            3VSB:           +3.26 V  (min =  +2.98 V, max =  +3.63 V)
                            Vbat:           +3.12 V  (min =  +2.70 V, max =  +3.63 V)
                            fan1:          2125 RPM  (min =    0 RPM)
                            fan2:             0 RPM  (min =    0 RPM)
                            fan3:             0 RPM  (min =    0 RPM)
                            SYSTIN:         +39.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
                            CPUTIN:         +35.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
                            AUXTIN:         +39.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
                            PCH_CHIP_TEMP:   +0.0°C
                            PCH_CPU_TEMP:    +0.0°C
                            PCH_MCH_TEMP:    +0.0°C
                            cpu0_vid:      +0.000 V
                            intrusion0:    ALARM
                            intrusion1:    ALARM
                            beep_enable:   disabled
                            I would like to be able to monitor DC-in, 12V, 5V.

                            Cheers,
                            Jason

                            Comment

                            Working...
                            X