mathoudebine / turing-smart-screen-python

Unofficial Python system monitor and library for small IPS USB-C displays like Turing Smart Screen or XuanFang
GNU General Public License v3.0
1.07k stars 177 forks source link

Is it possible to view fan speed ? #192

Open kang2k10 opened 1 year ago

kang2k10 commented 1 year ago

Is it possible to view fan speed ?

mathoudebine commented 1 year ago

This would be a great addition to this program! It seems supported by LibreHardwareMonitor on Windows (mostly for desktop, not laptops), for Linux and MacOS i have to find a Python library for it

smandon commented 1 year ago

For linux, you can try bindings for lm-sensors: https://pypi.org/project/PySensors/

mathoudebine commented 1 year ago

It could work, but i'm worried about lm-sensors that has not been updated since Feb. 2021, it seems unmaintained. The PySensors Python library itself seems not to be maintained anymore since Sept. 2019

alexwbaule commented 1 year ago

Using the psutils that is in sensors_python.py its possible to use: sensors = psutil.sensors_fans()

In my case, all labels is empy, but the speeds is there:

{
    "nct6798": [
        [
            "",
            1106
        ],
        [
            "",
            936
        ],
        [
            "",
            3033
        ],
        [
            "",
            0
        ],
        [
            "",
            1075
        ],
        [
            "",
            1347
        ],
        [
            "",
            0
        ]
    ],
    "amdgpu": [
        [
            "",
            0
        ]
    ]
}

I dont know why is empty, but i will find why...

looking in psutils source, its get the values from rmon ...

alexwbaule commented 1 year ago

https://github.com/giampaolo/psutil/pull/2263