fw-fanctrl
fw-fanctrl copied to clipboard
[BUG] Crash - `EC returned error result code 1`
Describe the bug
fw-fanctrl
often crashes, with the seemingly relevant error being EC returned error result code 1
(full report below). This usually happens after somewhere between a few seconds and 10 minutes I think (these are simply guesses based on my own time perception). It sounds like this might not be an error with fw-fanctrl
to me, based on the fact it's saying "EC returned error...", but I imagine the error handling could certainly be more graceful (e.g. the UTF-8 decode error shown in the full report, which I interpret as not being the root cause of the crash).
To Reproduce I'm not entirely sure; clearly this is something unique to my setup, or it would be happening to everyone. But however you reproduce EC returning an error code 1 must be how.
Error message
$ sudo fw-fanctrl --run
speed: 15%, temp: 31°C, movingAverageTemp: 31.0°C, effectureTemp: 31.0°C
speed: 15%, temp: 31°C, movingAverageTemp: 31.0°C, effectureTemp: 31.0°C
speed: 15%, temp: 30°C, movingAverageTemp: 30.7°C, effectureTemp: 30°C
EC returned error result code 1
EC response has invalid checksum
EC returned too much data
Traceback (most recent call last):
File "/usr/bin/fw-fanctrl", line 329, in <module>
main()
File "/usr/bin/fw-fanctrl", line 306, in main
fan.run(debug=not args.no_log)
File "/usr/bin/fw-fanctrl", line 252, in run
self.printState()
File "/usr/bin/fw-fanctrl", line 234, in printState
currentTemperture = self.getActualTemperature()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/fw-fanctrl", line 189, in getActualTemperature
rawOut = subprocess.run(bashCommand, stdout=subprocess.PIPE, shell=True, text=True).stdout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 550, in run
stdout, stderr = process.communicate(input, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 1196, in communicate
stdout = self.stdout.read()
^^^^^^^^^^^^^^^^^^
File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 143: invalid start byte
Environment (please complete the following information):
- OS: [e.g. Arch] Arch
- Version [e.g. commit 176d34b]
fw-fanctrl-git r45.dc6558e-1
(AUR package; presumably commit dc6558e) - Configuration file [config.json]: https://gist.github.com/Antikyth/dbd440cae388b1ca563d7fa068cf221f
- Installation method [full command)/package manager/other...]: AUR (
paru -S fw-fanctrl-git
)