johnfanv2 / LenovoLegionLinux

Driver and tools for controlling Lenovo Legion laptops in Linux including fan control and power mode.
https://github.com/johnfanv2/LenovoLegionLinux
GNU General Public License v2.0
1.29k stars 49 forks source link

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

Closed Linkachus17 closed 1 month ago

Linkachus17 commented 2 months ago

System Info

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

Issue

jiang131072 commented 1 month ago

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.

st0nie commented 1 month ago

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

MrDuartePT commented 1 month ago

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"

MrDuartePT commented 1 month ago
$ 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

MrDuartePT commented 1 month ago

@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.

MrDuartePT commented 1 month ago

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

MrDuartePT commented 1 month ago

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

Linkachus17 commented 1 month ago

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

PinkSerenity commented 3 weeks ago

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.

MrDuartePT commented 3 weeks ago

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.

PinkSerenity commented 3 weeks ago

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.