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

Unable to establish host communication #18

Closed jedfonner closed 5 months ago

jedfonner commented 9 months ago

When I start the service, I see this in the logs:

5:39 PM Couldn't find EC                                        python3
5:39 PM Unable to establish host communication                  python3
5:39 PM Cannot find I2C adapter                                 python3
5:39 PM Missing Chromium EC memory map.                         python3
5:39 PM Started fw-fanctrl.service - FrameWork Fan Controller.  systemd

It then continues to repeat this ad infinitum

Here's my config file from ~/.config/fw-fanctrl: config.json

Ceremony64 commented 9 months ago

I am running into the same issue. I take it @jedfonner is also trying this on an AMD framework? :-)

jedfonner commented 9 months ago

Indeed I am!

Mari023 commented 6 months ago

I have the same issue, running Debian on an 12th Gen Intel framework

TamtamHero commented 5 months ago

Sorry guys, I'm running an intel 11th gen laptop, I can't troobleshoot this for you. fw-fanctrl is quite a simple script, could you guys dive into it and fix it for the newer framework hardware ?

TamtamHero commented 5 months ago

Okay, apparently this is because the version of ectool shipped with this repo is outdated, sorry There's an ongoing PR with the latest version of the binary, it's not merged yet and there might be some refinements added soon but it should work okay-ish for AMD and okay for Intel : https://github.com/TamtamHero/fw-fanctrl/pull/21

TamtamHero commented 5 months ago

Should be fixed on main thanks to https://github.com/TamtamHero/fw-fanctrl/pull/21

JBetz commented 3 months ago

I just got an AMD Framework 13 and would love to use this tool, but am getting similar errors as the OP. I'm on Ubuntu 22.04 with an AMD Ryzen™ 7 7840U.

There's also some sort of access issue since there's an additional "Error getting I/O privilege: Operation not permitted" message. And it still happens when I run ectool directly with root.

● fw-fanctrl.service - FrameWork Fan Controller
     Loaded: loaded (/etc/systemd/system/fw-fanctrl.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-05-16 03:48:44 CEST; 41min ago
   Main PID: 539463 (python3)
      Tasks: 4 (limit: 37430)
     Memory: 8.8M
        CPU: 22.094s
     CGroup: /system.slice/fw-fanctrl.service
             └─539463 /usr/bin/python3 /usr/local/bin/fw-fanctrl --config /home/joe/.config/fw-fanctrl/config.json --no-log

mai 16 04:29:54 frameworklaptop python3[632331]: Unable to establish host communication
mai 16 04:29:54 frameworklaptop python3[632331]: Couldn't find EC
mai 16 04:30:00 frameworklaptop python3[632363]: Error getting I/O privilege: Operation not permitted
mai 16 04:30:00 frameworklaptop python3[632363]: Cannot find I2C adapter
mai 16 04:30:00 frameworklaptop python3[632363]: Unable to establish host communication
mai 16 04:30:00 frameworklaptop python3[632363]: Couldn't find EC
mai 16 04:30:06 frameworklaptop python3[632393]: Error getting I/O privilege: Operation not permitted
mai 16 04:30:06 frameworklaptop python3[632393]: Cannot find I2C adapter
mai 16 04:30:06 frameworklaptop python3[632393]: Unable to establish host communication
mai 16 04:30:06 frameworklaptop python3[632393]: Couldn't find EC
$ sudo ectool pwmgetfanrpm all
Error getting I/O privilege: Operation not permitted
Cannot find I2C adapter
Unable to establish host communication
Couldn't find EC
TamtamHero commented 3 months ago

Apparently you have to disable secure boot in the bios to get I/O privilege https://www.howett.net/posts/2021-12-framework-ec/#using-fw-ectool

I didn't know that, I'll add it to the instructions

JBetz commented 3 months ago

Yup, got it working now. Thanks!