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

[BUG] What's going on here? Laptop showed 0 battery power and then shutoff #56

Closed DeflateAwning closed 1 week ago

DeflateAwning commented 1 month ago

Describe the bug

The error message below happened. Right before the timestamps of the logs, the computer showed 0% battery and then shutdown due to critically-low battery.

DeflateAwning@host ~> sudo systemctl status fw-fanctrl.service
[sudo] password for DeflateAwning:                          
● fw-fanctrl.service - Framework Fan Controller
     Loaded: loaded (/lib/systemd/system/fw-fanctrl.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2024-06-30 14:27:12 PDT; 12min ago
   Main PID: 2166 (python3)
      Tasks: 2 (limit: 76620)
     Memory: 6.8M
        CPU: 21.528s
     CGroup: /system.slice/fw-fanctrl.service
             └─2166 /usr/bin/python3 /usr/bin/fw-fanctrl --run --config /etc/fw-fanctrl/config.json --no-log

Jun 30 14:29:04 host python3[4114]: Unable to establish host communication
Jun 30 14:29:04 host python3[4114]: Couldn't find EC
Jun 30 14:31:13 host python3[4799]: ioctl -1, errno 90 (Message too long), EC result 255 (<unknow>
Jun 30 14:32:54 host python3[7435]: ioctl -1, errno 90 (Message too long), EC result 255 (<unknow>
Jun 30 14:35:19 host python3[8437]: ioctl -1, errno 74 (Bad message), EC result 255 (<unknown>)
Jun 30 14:36:44 host python3[8940]: ioctl -1, errno 74 (Bad message), EC result 255 (<unknown>)
Jun 30 14:36:44 host python3[8940]: EC result 7 (INVALID_CHECKSUM)
Jun 30 14:37:06 host python3[9072]: ioctl -1, errno 74 (Bad message), EC result 255 (<unknown>)
Jun 30 14:37:43 host python3[9250]: ioctl -1, errno 90 (Message too long), EC result 255 (<unknow>
Jun 30 14:38:41 host python3[9598]: ioctl -1, errno 74 (Bad message), EC result 255 (<unknown>)

Environment (please complete the following information):

Additional context Crashes in a tool which controls system temperature are very bad.

In my opinion, this tool should be marked as Unstable in the README, based on this experience.

leopoldhub commented 1 month ago

Hi there, if I understand correctly, the programme got an error before your pc ran out of battery? If so, could you provide the full logs?

Also, in the event of a crash or the service being stopped or paused, the original temperature controller takes over to avoid any hardware damage.

TamtamHero commented 1 month ago

I also have issues with false battery reporting. I have no idea where it comes from. I wrote about it a few days ago here: https://community.frame.work/t/responded-battery-percentage-gets-misreported-as-0-occasionally/38056/19

What makes you think ectool is the culprit ? fw-fanctrl is indeed making a recurrent call to ectool battery. But I don't think that this call has any effect on the state of your OS (what's your distribution btw ?)

leopoldhub commented 1 week ago

Hi, as other members are encountering this problem without the use of ectool https://community.frame.work/t/responded-battery-percentage-gets-misreported-as-0-occasionally/38056/19 (post on Framework community forum by @TamtamHero ), I assume that this is not specific to our project and will close the issue.

I hope it will be fixed soon. Have a nice day.