johnfanv2 / LenovoLegionLinux

Driver and tools for controlling Lenovo Legion laptops in Linux including fan control and power mode.

Home Page:https://github.com/johnfanv2/LenovoLegionLinux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arch Linux LenovoLegionLinux won't launch after install, No module named 'legion_linux'

Linkachus17 opened this issue · comments

System Info

Lenovo Legion 5 15ARH05H
Arch Linux (6.8.8-arch1-1)

Issue

  • Won't launch after either installing it from AUR or building it using make
$ legion_cli
Traceback (most recent call last):
  File "/usr/bin/legion_cli", line 5, in <module>
    from legion_linux.legion_cli import main
ModuleNotFoundError: No module named 'legion_linux'
  • lenovolegionlinux-dkms-git on AUR is having problem when installing (might be unrelated but I think I should point it out)
...
(4/4) LenovoLegionLinux.hook
warning: LenovoLegionLinux: Cannot perform the requested operation due to missing package(s).

The script is here : deploy/LenovoLegionLinux.
It checks the installation of mkinitcpio and dracut, however the mkinitcpio branch is commented out. Logic here is strange.

commented

Yeah, the hook is broken and should be removed
The kernel-module is unrelated to initramfs
CC @MrDuartePT
We'd like to accept a patch to fix the PKGBUILD

The script is here : deploy/LenovoLegionLinux. It checks the installation of mkinitcpio and dracut, however the mkinitcpio branch is commented out. Logic here is strange.

Basically I comment wrong, should haven't only comment line 13 to prevent mkinitcpio of running twices (basically arch already has a hook that run mkinitcpio when a out-of-kernel tree module is install.
Also the install dosen't fail since, I just need to add a messange to mkinitcpio like: "Using mkinitcpio arch linux hook"

$ legion_cli
Traceback (most recent call last):
  File "/usr/bin/legion_cli", line 5, in <module>
    from legion_linux.legion_cli import main
ModuleNotFoundError: No module named 'legion_linux'

Now this error I don't understand why it happen please check if legion_linux is available on legion_linux python install directory. Since the AUR PKGBUILD is base on the gentoo ebuild and the gentoo ebuild is still working fine

@st0nie @Linkachus17 looking at the action logs the aur shouldn't give that error: https://github.com/johnfanv2/LenovoLegionLinux/actions/runs/8957813959/job/24601322012#step:3:4340

The arch linux container install the packages by cloning the aur repo.

I can not reproduce this error on manjaro live cd, and since the github action also don't have the error I would assume is your arch install and not the PKGBUILD.
image

Closing since is not a bug LLL

@Linkachus17 seems that arch linux change to python3.12 recently you probably need to uninstall and install LLL again

I can confirm that there's something wrong with my Arch install previously, not sure why. I reinstalled my Arch last night and now LLL works fine
image

I had the same error. I think it's related to this:

Module version  for legion-laptop.ko.zst
exactly matches what is already found in kernel 6.9.3-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Error! Installation aborted.
==> WARNING: `dkms install --no-depmod lenovolegionlinux/1.0.0 -k 6.9.3-arch1-1' exited 6

Running dkms install --no-depmod --force lenovolegionlinux/1.0.0 -k 6.9.3-arch1-1 seemed to fix it for me.

I had the same error. I think it's related to this:

No, it not related since is the module and not Python app


Module version  for legion-laptop.ko.zst

exactly matches what is already found in kernel 6.9.3-arch1-1.

DKMS will not replace this module.

If you read the message carefully, it explains you already have the module install so dkms will not replace it.

No, it not related since is the module and not Python app

Doesn't the Python app depend on the module?

If you read the message carefully, it explains you already have the module install so dkms will not replace it.

Yeah, which is why I --forced it. I think maybe the previous module didn't properly get removed when I un-installed and reinstalled the package. So I always had the apparently corrupted module, and only like this I was able to replace it.

By the way, I also deleted the LLL directory in /var/libs/dkms/. I remember that I once updated the Nvidia driver and an old directory remained there, so mkinitcpio complained about a missing config.