Skip to content

Dasharo Performance: Custom fan curve

Test cases common documentation

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Proceed with the Generic test setup: OS boot from disk.

CFC001.001 Custom fan curve measure (Ubuntu 20.04)

Test description

The fan has been configured to follow a custom curve. This test aims to verify that the fan curve is configured correctly and the fan spins up and down according to the defined values.

Test configuration data

  1. FIRMWARE = Dasharo

Test setup

  1. Proceed with the Test cases common documentation section.
  2. Install lm-sensors and stress-ng on the DUT.

Test steps

  1. Power on the DUT.
  2. Boot into the system.
  3. Log into the system by using the proper login and password.
  4. Open the terminal window and run the following command:

    stress-ng --cpu 16 --timeout 30m
    
  5. Open the terminal window and run the following command to get the temperature:

    sensors | grep 'Package id 0'
    
  6. In the terminal window run the following command to get the PWM value of the CPU fan:

    cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/17761776:00/hwmon/hwmon3/pwm1
    
  7. Repeat steps 5-6 a couple of times.

  8. Note the results.

Expected result

Defined curve

Keep in mind that the EC firmware is smoothing, i.e. the fans will enter the target speed with a delay.

The algorithm by which the EC calculates the speed is as follows:

  • If the temperature is below the first one defined in the curve, set the speed to 0.
  • If the temperature is above the last defined curve, set the maximum speed.
  • If the temperature is equal to one of the temperatures of the points on the curve, set the speed from that point on the curve
  • If the temperature is between points on the curve:

    slope = (right_point_speed - left_point_speed)/right_point_temperature - left_point_temperature)
    speed = slope*(temperature - left_point_temperature) + left_point_speed
    

Divide the PWM value by 2.55 to get the percentage to compare.

Example check for 30°C and 70 PWM values:

```text
expected_speed = ((30-25)/(65-0))*(30-0)+25 ≈ 27
actual_speed = 70/2.55 ≈ 27
```

Values expected_speed and actual_speed are strongly similar. This means that the fan control is set correctly.