TamtamHero / fw-fanctrl

A simple systemd service to better control Framework Laptop's fan(s)
BSD 3-Clause "New" or "Revised" License
178 stars 33 forks source link

Cannot open lockfile error #12

Closed andypiper closed 1 year ago

andypiper commented 1 year ago

Fedora 37 on 12th Gen Framework laptop.

Running fw-fanctrl --config ~/.config/fw-fanctrl/config.json results in the following output:

Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
speed: 15% temp: 42.5°C movingAverage: 42.5°C
speed: 15% temp: 42.0°C movingAverage: 42.48°C
speed: 15% temp: 40.666666666666664°C movingAverage: 42.42°C
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
speed: 15% temp: 41.166666666666664°C movingAverage: 42.38°C
speed: 15% temp: 40.916666666666664°C movingAverage: 42.33°C
speed: 15% temp: 40.333333333333336°C movingAverage: 42.25°C
speed: 15% temp: 41.75°C movingAverage: 42.23°C
speed: 15% temp: 40.416666666666664°C movingAverage: 42.16°C
Cannot open lockfile /run/lock/cros_ec_lockCould not acquire GEC lock.
speed: 15% temp: 40.833333333333336°C movingAverage: 42.1°C

Running the same command as root (via sudo) does not have an issue with the lockfile (which is owned by root).

Should this utility only be run as root? If so, should the configuration file be installed on a per-user basis?

andypiper commented 1 year ago

It looks like this is being caused by the call to the ectool binary from the Python script.

TamtamHero commented 1 year ago

fw-fanctrl is meant to be called from userland only to change the current strategy of the privileged instance already running in the background as service