Skip to content

Fix rounding for conversion of PWM/RPM values.#389

Open
qquique wants to merge 1 commit intojohnfanv2:mainfrom
qquique:fix-pwm-rounding
Open

Fix rounding for conversion of PWM/RPM values.#389
qquique wants to merge 1 commit intojohnfanv2:mainfrom
qquique:fix-pwm-rounding

Conversation

@qquique
Copy link

@qquique qquique commented Jan 17, 2026

Test :

  • Changing from quiet mode to balanced-performance (custom) mode. The hardware values show the values from the previous mode
u(speed_of_unit)|speed1[u]|speed2[u]|speed1[pwm]|speed2[pwm]|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
3	 0	 0	 0	 0	 0	 0	 0	 80	 0	 68	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 86	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 88	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 99	 0	 94	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 100	 0	 0	 0	 0
  • Read values from python client
pwm_screen_1
  • Modifying cpu rpm's via sysfs hwmon
echo 35 > pwm1_auto_point1_pwm
echo 40 > pwm1_auto_point2_pwm
echo 43 > pwm1_auto_point3_pwm
echo 48 > pwm1_auto_point4_pwm
echo 53 > pwm1_auto_point5_pwm
echo 61 > pwm1_auto_point6_pwm
echo 63 > pwm1_auto_point7_pwm
echo 71 > pwm1_auto_point8_pwm
echo 76 > pwm1_auto_point9_pwm
echo 89 > pwm1_auto_point10_pwm
  • Checking valuessudo cat /sys/kernel/debug/legion/fancurve
u(speed_of_unit)|speed1[u]|speed2[u]|speed1[pwm]|speed2[pwm]|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
3	 14	 0	 35	 0	 0	 0	 0	 80	 0	 68	 0	 0
3	 16	 25	 40	 63	 0	 0	 0	 86	 0	 84	 0	 0
3	 17	 25	 43	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 19	 25	 48	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 21	 25	 53	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 24	 25	 61	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 25	 63	 63	 0	 0	 0	 92	 0	 84	 0	 0
3	 28	 25	 71	 63	 0	 0	 0	 92	 0	 88	 0	 0
3	 30	 25	 76	 63	 0	 0	 0	 99	 0	 94	 0	 0
3	 35	 25	 89	 63	 0	 0	 0	 100	 0	 0	 0	 0
  • Reading again from python client
pwm_screen_2
  • Modifying gpu rpm's in python client and applying to hardware
pwm_screen_3
  • Reading values sudo cat /sys/kernel/debug/legion/fancurve
u(speed_of_unit)|speed1[u]|speed2[u]|speed1[pwm]|speed2[pwm]|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
3	 14	 15	 35	 38	 0	 0	 0	 80	 0	 68	 0	 0
3	 16	 17	 40	 43	 0	 0	 0	 86	 0	 84	 0	 0
3	 17	 18	 43	 45	 0	 0	 0	 92	 0	 84	 0	 0
3	 19	 19	 48	 48	 0	 0	 0	 92	 0	 84	 0	 0
3	 21	 20	 53	 51	 0	 0	 0	 92	 0	 84	 0	 0
3	 24	 21	 61	 53	 0	 0	 0	 92	 0	 84	 0	 0
3	 25	 22	 63	 56	 0	 0	 0	 92	 0	 84	 0	 0
3	 28	 23	 71	 58	 0	 0	 0	 92	 0	 88	 0	 0
3	 30	 24	 76	 61	 0	 0	 0	 99	 0	 94	 0	 0
3	 35	 26	 89	 66	 0	 0	 0	 100	 0	 0	 0	 0
=====================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant