alou-S / omen-fan

Utility to control fans in Omen laptops
GNU General Public License v3.0
49 stars 5 forks source link

tomlkit: TypeError: __int__ returned non-int (type float) in omen-fand.py #4

Closed anispwyn closed 1 year ago

anispwyn commented 1 year ago

Laptop: Victus by HP Laptop 16-e1xxx os: endeavoursOS (based on arch) Kernel: 6.4.12-arch1-1

i tried checking the temp using btop++ and keep spamming the omen-fan.py i

when the temp hit 80C or less than that it still stays at
Fan 1 : 2393 RPM Fan 2 : 2591 RPM

i have disabled BIOS control and enabled Services status

manually setting fan speed works

alou-S commented 1 year ago

If manually setting fan speed works I guess it is possibly a temperature read issue. Temperature is directly read from the EC. Probably your laptop model has a different register that stores the temperature.

Could you send me a copy of this sysfs file : /sys/firmware/acpi/tables/DSDT

To do so you can

sudo cp /sys/firmware/acpi/tables/DSDT ~/dsdt.dat
sudo chown $USER:$USER ~/dsdt.dat

And then upload that file here.

anispwyn commented 1 year ago

dsdt.dat (gdrive)

also i tried enabling the services but it just wont enable, i have to run omen-fand.py manually which still gives me error, i dont really know if this help anything but maybe it does so

https://github.com/alou-S/omen-fan/assets/36318840/377ee135-15f1-4725-948c-e91843d4415b

alou-S commented 1 year ago

Okay seems like its not a problem with reading the wrong register.

There is a new bug that has come out from python-tomlkit 0.12.0 that is causing the fan service to crash. I'm currently looking how to move forward with fixing the bug.

You can probably confirm if you are having the same issue by simply directly running the service (omen-fand.py) and telling me if you get this error :

Traceback (most recent call last):
  File "/usr/bin/omen-fand", line 113, in <module>
    update_fan(FAN1_MAX * speed / 100, FAN2_MAX * speed / 100)
  File "/usr/bin/omen-fand", line 56, in update_fan
    print(type(int(speed1)))
               ^^^^^^^^^^^
TypeError: __int__ returned non-int (type float)

A workaround for this issue you can use the downgrade package for Arch and downgrade the python-tomlkit package back to 0.11.8 if you are having the same error.

alou-S commented 1 year ago

@HoriKyoukosimp A new patch has been pushed to fix the TypeError issue. Please confirm if it fixes your problem.

anispwyn commented 1 year ago

it works now but is i normal that i have to execute omen-fand.py normally and not managed by the omen-fan.py e true? (i dont know how to really explain this)