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

FileNotFoundError: [Errno 2] No such file or directory on latest commit #35

Closed Akrai closed 2 months ago

Akrai commented 3 months ago

Just updated the AUR package after last commits. Now it's not running. Tried to reinstall the package, no luck

$ fw-fanctrl Traceback (most recent call last): File "/usr/bin/fw-fanctrl", line 320, in main() File "/usr/bin/fw-fanctrl", line 301, in main client_socket.connect(COMMANDS_SOCKET_FILE_PATH) FileNotFoundError: [Errno 2] No such file or directory

OmegaLambda1998 commented 3 months ago

Same issue here, it looks like COMMANDS_SOCKET_FILE_PATH only gets initialised if a FanController is instantiated, however if not using --run, this never happens

OmegaLambda1998 commented 3 months ago

As a temporary patch, create a file called override.conf in /etc/systemd/system/fw-fanctrl.service.d with the following"

[Service]
ExecStart=
ExecStart=/usr/bin/python3 /usr/bin/fw-fanctrl --run --config "/etc/fw-fanctrl/config.json" --no-log
ExecStopPost=
ExecStopPost=/bin/sh -c "ectool autofanctrl"

This got it working again for me, basically just taking the source code service file (https://github.com/TamtamHero/fw-fanctrl/blob/main/services/fw-fanctrl.service) and applying it

leopoldhub commented 3 months ago

Hi, as explained here, we are not the maintainers of the AUR package and cannot guarantee that it will work. The AUR package imports external outdated service files, please contact the AUR maintainer instead. Please use the installation script for the time being (as the AUR version should have done to begin with...)

leopoldhub commented 3 months ago

I have contacted the AUR package maintainer, who should be patching it soon

icedream commented 3 months ago

Package maintainer here, I'm currently going over the current packaging complications I have with @leopoldhub via mail. I'll have time to hotfix the package files this evening after work but I intend to follow up with a better solution. Hopefully from there we find a more permanent solution soon.

icedream commented 3 months ago

We're taking care of long-term fixes in https://github.com/TamtamHero/fw-fanctrl/pull/37, the error should no longer happen on the AUR package where a hotfix has been applied a few days ago.

icedream commented 3 months ago

AUR package has been updated with the proper long-term solution, should now install service files properly from repository.

Ignore my previous comment if you see it via mail notification, I had a silly override still installed that I thought I removed. All good now. 👍🏻

leopoldhub commented 3 months ago

Made me panic for a bit 👀

leopoldhub commented 2 months ago

Hi everyone, the AUR package have been fixed (thanks to the wonderful work of @icedream). Did any of you experience any kind of unexpected behaviour with the latest package version? If not, I would like to close this issue. Have a nice day

Akrai commented 2 months ago

Working properly here

leopoldhub commented 2 months ago

It seems that everything has been resolved, so I will then close the issue.

skerit commented 1 month ago

@leopoldhub I just installed fw-fanctrl-git (r38.f0d8d77-2), fw-fanctrl-ui-git (r1.120f20e-1) and fw-ectool-git from the AUR, but I still get the error:

$ fw-fanctrl                                                                                                                                                                                                   ma 22 jul 2024 11:18:05
Traceback (most recent call last):
  File "/usr/bin/fw-fanctrl", line 329, in <module>
    main()
  File "/usr/bin/fw-fanctrl", line 310, in main
    client_socket.connect(COMMANDS_SOCKET_FILE_PATH)
FileNotFoundError: [Errno 2] No such file or directory

The systemd service file was installed, though I didn't get a mention anywhere I needed to start & enable it manually. After doing that (sudo systemctl start fw-fanctrl) it worked.

icedream commented 1 month ago

@skerit The package should automatically update to the latest git (at this point that would be r45.dc6558e) when it's being built.