Sensors, CPU & Fans Control: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
= Kernel configuration =
= Sensors =


* You need to compile I2C_CHARDEV into the kernel.
== CPU temperature ==
* You need to compile the correct module in Hardware Monitoring and in I2C, the one corresponding to your chip. One good technique is to compile everything available, run sensors-detect, which will find the correct module. Then you can delete all the other modules and rebuild the kernel.
* On many ASUS motherboards you need to build the Asus atk0110 ACPI module. You don't need anything else but this module is not detected by sensors-detect; you must load it manually in the configuration file, see below.


= Userspace =
* To get CPU temperature, kernel modules are needed. I2C support in particular is generally required (compile '''I2C_CHARDEV''').
* In addition, the correct modules corresponding to your chip should be added in the Hardware Monitoring support and I2C sections. One good technique is to compile everything available, then run '''sensors-detect''', which will find the correct module. Then you can delete all the other modules and rebuild the kernel.
* For a recent Intel Core CPU, compile in the '''SENSORS_CORETEMP''' module (Device Drivers -> Hardware Monitoring support).
* In user space, you need to emerge lm-sensors.
* A KDE widget (plasmoid) is available to display current CPU temperature. You need to emerge ksysguard with the lm_sensors USE flag in order for it to work. It's not very beautiful but functional.


* Emerge lm-sensors.
== Fan metrics ==
* To get KDE 4 Plasma widget working, emerge ksysguard with the lm_sensors USE flag.


= Configuration =
* lm-sensors is also needed, along with some kernel modules (same procedure as for CPU temperature above).
* You may need to add the '''acpi_enforce_resources=lax''' command-line kernel boot parameter for some ASUS motherboards (like the ROG Strix Z590-I).
* You can then get the current fan RPM by running the '''sensors''' program.


== Asus ==
* On some ASUS motherboards you may need to build the Asus atk0110 ACPI module. You don't need anything else but this module is not detected by sensors-detect; you must load it manually in the configuration file, see below.
* If you use the Asus atk0110 module, enter the following in /etc/conf.d/lm_sensors:
* If you use the Asus atk0110 module, enter the following in /etc/conf.d/lm_sensors:


  MODULE_0=asus_atk0110
  MODULE_0=asus_atk0110
= Fan Control =
* Fan control is better done in the BIOS. Normally it will allow you to set a fan profile, which associates a given CPU temperature with a given rotation speed. Usually you will want to keep rotation speed low to minimize noise, even if the CPU gets hot. In particular, running the fan at full speed produces a lot of noise at least on Noctua fans.
* CPU temperature should be less than 45 degrees while idling, 75 degrees under normal load, and 95 degrees under heavy load (gaming).
== Pulse-Width Modulation ==
* Modern fans implement this interface, and in theory this makes it possible to control the fan speed from the OS rather than the BIOS. In practice, I think it's hard to do so and I was not able to even obtain metrics via PWM.
* Kernel modules that might be needed for this include Device Drivers -> Pulse-Width Modulation and Device Drivers -> Hardware Monitoring support -> PWM fan.
= CPU Control =
= Potential important kernel modules =
* Some modules in the ACPI section (mostly for CPU frequency scaling).
* Some modules in Device Drivers -> Multifunction device drivers (in particular the Intel LPSS modules?).
* Some modules in Device Drivers -> X86 Platform specific drivers (Intel ones?).

Revision as of 09:42, 18 March 2022

Sensors

CPU temperature

  • To get CPU temperature, kernel modules are needed. I2C support in particular is generally required (compile I2C_CHARDEV).
  • In addition, the correct modules corresponding to your chip should be added in the Hardware Monitoring support and I2C sections. One good technique is to compile everything available, then run sensors-detect, which will find the correct module. Then you can delete all the other modules and rebuild the kernel.
  • For a recent Intel Core CPU, compile in the SENSORS_CORETEMP module (Device Drivers -> Hardware Monitoring support).
  • In user space, you need to emerge lm-sensors.
  • A KDE widget (plasmoid) is available to display current CPU temperature. You need to emerge ksysguard with the lm_sensors USE flag in order for it to work. It's not very beautiful but functional.

Fan metrics

  • lm-sensors is also needed, along with some kernel modules (same procedure as for CPU temperature above).
  • You may need to add the acpi_enforce_resources=lax command-line kernel boot parameter for some ASUS motherboards (like the ROG Strix Z590-I).
  • You can then get the current fan RPM by running the sensors program.

Asus

  • On some ASUS motherboards you may need to build the Asus atk0110 ACPI module. You don't need anything else but this module is not detected by sensors-detect; you must load it manually in the configuration file, see below.
  • If you use the Asus atk0110 module, enter the following in /etc/conf.d/lm_sensors:
MODULE_0=asus_atk0110

Fan Control

  • Fan control is better done in the BIOS. Normally it will allow you to set a fan profile, which associates a given CPU temperature with a given rotation speed. Usually you will want to keep rotation speed low to minimize noise, even if the CPU gets hot. In particular, running the fan at full speed produces a lot of noise at least on Noctua fans.
  • CPU temperature should be less than 45 degrees while idling, 75 degrees under normal load, and 95 degrees under heavy load (gaming).

Pulse-Width Modulation

  • Modern fans implement this interface, and in theory this makes it possible to control the fan speed from the OS rather than the BIOS. In practice, I think it's hard to do so and I was not able to even obtain metrics via PWM.
  • Kernel modules that might be needed for this include Device Drivers -> Pulse-Width Modulation and Device Drivers -> Hardware Monitoring support -> PWM fan.

CPU Control

Potential important kernel modules

  • Some modules in the ACPI section (mostly for CPU frequency scaling).
  • Some modules in Device Drivers -> Multifunction device drivers (in particular the Intel LPSS modules?).
  • Some modules in Device Drivers -> X86 Platform specific drivers (Intel ones?).