I recently wrote a C++ program to switch on an air conditioner when my computer temperature exceeded a certain threshold. After getting it to work with the main core components (CPU, motherboard, etc.), I started looking at the NVIDIA GPU and found that there don’t seem to be any APIs for getting temperature sensor data from the device (unless I use nouveau drivers)
I’ve tried looking up xnvctrl, but I can’t find a library reference or source code for it.
Does anybody know how I can pass the temperature data from the GPU to my program on Linux?