CPU and GPU monitoring on Kubuntu
Need or Curiosity
Sometimes we have the need or the curiosity to know the temps of our hardware and adjust the fans accordingly. On windows it is an easy task using HWiNFO for monitoring, and the proprietary software to control fans; there is a great variety of software to do it.
On Linux (Kubuntu this time), is not that straightforward but it is easy too.
Sensors
Quick Google Search and we get the monitoring software: lm-sensors.
First, we install it:
apt install lm-sensors
Then, scan the system:
sensors-detect
After the scan, we can use sensors
to get the temps, but it is not that pretty, so we can install psensor
:
apt-get install lm-sensors hddtemp psensor
Now we can open Psensor just as any other application.
Control Fans
Now, the fans. Even though we can use the BIOS settings to control the CPU and system fans, we still need more software to control de GPU ones.
CoreCtrl for AMD GPUs
Using CoreCtrl we can do more than just tweak the fan speeds, but for this time we are only focusing on that.
First, we have to add an untrusted PPA, so proceed only if you can trust it.
add-apt-repository ppa:ernstp/mesarc
apt-get update
Then install corectrl
:
apt install corectrl
Again, run CoreCtrl as an application.
There are other ways of installing CoreCtrl on its GitLab repository.
NVIDIA X Server Settings
On System Settings go to Driver Manager > Aditional Drivers and install the NVIDIA driver. Now, more Google Searching:
nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration
This gets us the NVIDIA X Server Settings, that besides other configurations, we can use the Thermal Settings to control the fans.
Now, our reference tell us there is another option to create a fan curve (that needs the previous step in order to enable fan control), but the default nvidia configuration seems to be enough for our needs and curiosity.