alou-S / omen-fan

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

IndexError: list index out of range #6

Closed pospielov closed 2 days ago

pospielov commented 11 months ago

I got this error when I tried to run the script:

Traceback (most recent call last):
  File "./omen-fan.py", line 19, in <module>
    BOOST_FILE = glob.glob("/sys/devices/platform/hp-wmi/hwmon/*/pwm1_enable")[0]
IndexError: list index out of range

I checked, and I don't have hwmon folder in /sys/devices/platform/hp-wmi/ path. Any ideas on what should be installed to get this folder? I have HP Omen 15-dh1002ur and Linux Mint 20.2

alou-S commented 11 months ago

What files/folders are present in your hp-wmi folder then? Also what is your kernel version?

pospielov commented 10 months ago

(base) /sys/devices/platform/hp-wmi$ ls -la
total 0
drwxr-xr-x  3 root root    0 Oct 24 22:35 .
drwxr-xr-x 36 root root    0 Oct 24 22:35 ..
-rw-r--r--  1 root root 4096 Oct 24 22:35 als
-r--r--r--  1 root root 4096 Oct 24 22:35 display
-r--r--r--  1 root root 4096 Oct 24 22:35 dock
lrwxrwxrwx  1 root root    0 Oct 24 22:35 driver -> ../../../bus/platform/drivers/hp-wmi
-rw-r--r--  1 root root 4096 Oct 24 22:35 driver_override
-r--r--r--  1 root root 4096 Oct 24 22:35 hddtemp
-r--r--r--  1 root root 4096 Oct 24 22:35 modalias
-rw-r--r--  1 root root 4096 Oct 24 22:35 postcode
drwxr-xr-x  2 root root    0 Oct 24 22:35 power
lrwxrwxrwx  1 root root    0 Oct 24 22:35 subsystem -> ../../../bus/platform
-r--r--r--  1 root root 4096 Oct 24 22:35 tablet
-rw-r--r--  1 root root 4096 Oct 24 22:35 uevent```
alou-S commented 10 months ago

I guess the hp-wmi hwmon interface doesn't exist for your laptop model, why this occurs I'm not sure of. Could be that it isn't compatible or loading fails for some reason.