Package Details: legion-fan-utils-linux-git r52.eff4124-1

Git Clone URL: https://aur.archlinux.org/legion-fan-utils-linux-git.git (read-only, click to copy)
Package Base: legion-fan-utils-linux-git
Description: Systemd service that will apply a given profile (read the systemd section in the repo). Needs LenovoLegionLinux to work
Upstream URL: https://github.com/Petingoso/legion-fan-utils-linux
Licenses: GPL
Conflicts: lenovolegionlinux-git
Submitter: MrDuartePT
Maintainer: MrDuartePT
Last Packager: MrDuartePT
Votes: 1
Popularity: 0.000207
First Submitted: 2023-03-14 18:29 (UTC)
Last Updated: 2023-09-21 14:20 (UTC)

Dependencies (4)

Required by (0)

Sources (1)

Latest Comments

MrDuartePT commented on 2023-09-21 14:15 (UTC) (edited on 2023-09-21 14:15 (UTC) by MrDuartePT)

Sorry for take a bit of time to update the package. I also what to inform that if you are using LenovoLegionLinux-git package you don't need this since it was implement in LLL a long time ago.

dreieck commented on 2023-09-21 11:55 (UTC)

Please remove dependency on python-argparse-shim. This is not needed at all. python-argparse is part of core python. python-argparse-shim is only there for packages which have not been fixed yet and still depend on python-argparse, to fulfill their dependency.

Depending on python-argparse-shim is pointless, superfluos, and might break when python-argparse-shim is to be deleted because it came obsolete.

Thanks for maintaining!

leledumbo commented on 2023-06-09 18:28 (UTC)

The PKGBUILD contains small but fatal errors:

pkgver() {
  cd "$pkgname" # should be "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

package() {
        cd "${srcdir}/${_pkgname}"
        mkdir -p "${pkgdir}/etc/lenovo-fan-control/profiles"
        mkdir -p "${pkgdir}/etc/systemd/system"
        mkdir -p "${pkgdir}/etc/acpi/events"
        install -Dm664 service/profiles/* -t "${pkgdir}/etc/lenovo-fan-control/profiles"
        install -Dm755 service/fancurve-set.sh -t "${pkgdir}/etc/lenovo-fan-control"
        install -Dm775 service/lenovo-legion-fan-service.py "${pkgdir}/etc/lenovo-fan-control/"
        install -Dm775 profile_man.py "${pkgdir}/etc/lenovo-fan-control/"
        install -Dm664 service/*.service "${pkgdir}/etc/systemd/system"
        install -Dm664 service/*.path "${pkgdir}/etc/systemd/system"
        install -Dm775 /service/ac_adapter_legion-fancurve "${pkgdir}/etc/acpi/events" # should have no leading / before "service"
}

Fixing those two will allow the package to be built and installed. However, post installation script is still broken:

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.
× lenovo-fancurve.service - Apply Fan Curve to Lenovo Legion Laptop depending of Power State and Charger Mode (LenovoLegionLinux kernel Module)
     Loaded: loaded (/etc/systemd/system/lenovo-fancurve.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2023-06-10 01:24:57 WIB; 24ms ago
   Duration: 38ms
    Process: 222337 ExecStart=/etc/lenovo-fan-control/fancurve-set.sh (code=exited, status=2)
   Main PID: 222337 (code=exited, status=2)
        CPU: 28ms

Jun 10 01:24:57 Lelesus systemd[1]: Starting Apply Fan Curve to Lenovo Legion Laptop depending of Power State and Charger Mode (LenovoLegionLinux kernel Module)...
Jun 10 01:24:57 Lelesus systemd[1]: Started Apply Fan Curve to Lenovo Legion Laptop depending of Power State and Charger Mode (LenovoLegionLinux kernel Module).
Jun 10 01:24:57 Lelesus fancurve-set.sh[222337]: /etc/lenovo-fan-control/fancurve-set.sh: line 16: /etc/lenovo-fan-control/.env: No such file or directory
Jun 10 01:24:57 Lelesus fancurve-set.sh[222337]: /etc/lenovo-fan-control/fancurve-set.sh: line 19: [: ==: unary operator expected
Jun 10 01:24:57 Lelesus fancurve-set.sh[222337]: Applying Quiet Mode Profile ﴛ  -> charger...
Jun 10 01:24:57 Lelesus fancurve-set.sh[222337]: /etc/lenovo-fan-control/fancurve-set.sh: line 30: [: ==: unary operator expected
Jun 10 01:24:57 Lelesus fancurve-set.sh[222346]: python: can't open file '//lenovo-legion-fan-service.py': [Errno 2] No such file or directory
Jun 10 01:24:57 Lelesus systemd[1]: lenovo-fancurve.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 10 01:24:57 Lelesus systemd[1]: lenovo-fancurve.service: Failed with result 'exit-code'.
● lenovo-fancurve-restart.path
     Loaded: loaded (/etc/systemd/system/lenovo-fancurve-restart.path; enabled; preset: disabled)
     Active: active (waiting) since Sat 2023-06-10 01:22:16 WIB; 2min 41s ago
   Triggers: ● lenovo-fancurve-restart.service

Jun 10 01:22:16 Lelesus systemd[1]: Started lenovo-fancurve-restart.path.
○ lenovo-fancurve-restart.service
     Loaded: loaded (/etc/systemd/system/lenovo-fancurve-restart.service; static)
     Active: inactive (dead) since Sat 2023-06-10 01:24:57 WIB; 76ms ago
TriggeredBy: ● lenovo-fancurve-restart.path
    Process: 222336 ExecStart=/bin/systemctl restart lenovo-fancurve.service (code=exited, status=0/SUCCESS)
   Main PID: 222336 (code=exited, status=0/SUCCESS)
        CPU: 3ms

Jun 10 01:24:57 Lelesus systemd[1]: Starting lenovo-fancurve-restart.service...
Jun 10 01:24:57 Lelesus systemd[1]: lenovo-fancurve-restart.service: Deactivated successfully.
Jun 10 01:24:57 Lelesus systemd[1]: Finished lenovo-fancurve-restart.service.
Service was enable
If fail reboot the system because LenovoLegionLinux module was not install

Now I don't really know how to fix this one without thorough debugging.

dreieck commented on 2023-05-12 12:24 (UTC)

python-argparse must be removed from the depends array, see ↗ here.

Thanks for maintaining!

yochananmarqos commented on 2023-04-28 03:18 (UTC)

Please use a pkgver function, see VCS package guidlines

The files are being installed with improper permissions. Binaries / scripts should be 0755 and the other files should be 0644.

MrDuartePT commented on 2023-03-15 22:15 (UTC)

I add the missing dependency try now to see if works

serj1983 commented on 2023-03-15 19:33 (UTC)

You need to add a dependency to the "python-psutil" package, otherwise an error will appear:

fancurve-set.sh[21856]: Applying Quiet Mode Fan Curve ﴛ -> charger... fancurve-set.sh[21856]: Traceback (most recent call last): fancurve-set.sh[21856]: File "/usr/local/bin/lenovo-legion-fan-service.py", line 3, in <module> fancurve-set.sh[21856]: import psutil fancurve-set.sh[21856]: ModuleNotFoundError: No module named 'psutil'