Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenovo Legion patch missing from kernels > 6.7 #71

Closed
emilf opened this issue Sep 12, 2024 · 12 comments
Closed

Lenovo Legion patch missing from kernels > 6.7 #71

emilf opened this issue Sep 12, 2024 · 12 comments

Comments

@emilf
Copy link

emilf commented Sep 12, 2024

It is claimed in the README in https://github.com/johnfanv2/LenovoLegionLinux that the dkms package is not required for CachyOS so I uninstalled it on my machine, but then legion features stopped working.
I looked into it briefly and it seems that legion patches are no longer included in kernels post 6.7.

You can verify if the legion driver is active by checking if /sys/kernel/debug/legion exists.

For the record, I'm running the current 6.10.9-2-cachyos kernel.

@ptr1337
Copy link
Member

ptr1337 commented Sep 12, 2024

Hey,

We have dropped the patchset, because the driver got loaded, even if there was no lenovo hardware available.

@emilf
Copy link
Author

emilf commented Sep 12, 2024

Thanks for the reply. I'll ask them to update their README

@emilf emilf closed this as completed Sep 12, 2024
emilf added a commit to emilf/LenovoLegionLinux that referenced this issue Sep 12, 2024
CachyOS dropped the patchset in kernels > 6.7
See: CachyOS/kernel-patches#71
@johnfanv2
Copy link

johnfanv2 commented Sep 14, 2024

Hey,

We have dropped the patchset, because the driver got loaded, even if there was no lenovo hardware available.

That is pretty interesting and should never happen. Do you have more details or a user report for that?

The driver is probed when there is a device PNP0C0. Then the driver checks if the the vendor is LENOVO and the BIOS version is in a list of supported BIOS versions (e.g. HHCN) via DMI. If this is check is not successful the probe aborts and it will unload.

@ptr1337
Copy link
Member

ptr1337 commented Sep 14, 2024

Hey,
We have dropped the patchset, because the driver got loaded, even if there was no lenovo hardware available.

That is pretty interesting and should never happen. Do you have more details or a user report for that?

The driver is probed when there is a device PNP0C0. Then the driver checks if the the vendor is LENOVO and the BIOS version is in a list of supported BIOS versions (e.g. HHCN) via DMI. If this is check is not successful the probe aborts and it will unload.

Hi,

This was mainly found on the Steam Deck, when we started to work on the cachyos handheld option. Basically the driver got probed but then failed with an error. Generally this is not problematic, but I dont like to have from a patchset side introduced errors in the kernel.

@ptr1337 ptr1337 reopened this Sep 14, 2024
@No-Biggie805
Copy link

Suggestion, how about making it available as a binary package of the existing AUR, for the cachyOS repos?
Many thanks.

@1Naim
Copy link
Member

1Naim commented Sep 16, 2024

It definitely doesn't hurt adding it to our repos, but you can say the same to installing it directly from the AUR. I say this because the AUR package does nothing more than:

  1. Cloning the repo
  2. Setting the pkgver
  3. Installing files to the package

There is no building involved.

@MrDuartePT
Copy link

It definitely doesn't hurt adding it to our repos, but you can say the same to installing it directly from the AUR. I say this because the AUR package does nothing more than:

  1. Cloning the repo
  2. Setting the pkgver
  3. Installing files to the package

There is no building involved.

Sorry but you are wrong, there is buiding involve on the AUR package:
1 - LenovoLegionLinux-dkms - compile the module on you machine, i don't provided a binary.

2 - LenovoLegionLinux - since the gui and cli are python don't require any compilation but the legiond module requires, since is written in C.

@MrDuartePT
Copy link

MrDuartePT commented Sep 17, 2024

Hey,
We have dropped the patchset, because the driver got loaded, even if there was no lenovo hardware available.

That is pretty interesting and should never happen. Do you have more details or a user report for that?
The driver is probed when there is a device PNP0C0. Then the driver checks if the the vendor is LENOVO and the BIOS version is in a list of supported BIOS versions (e.g. HHCN) via DMI. If this is check is not successful the probe aborts and it will unload.

Hi,

This was mainly found on the Steam Deck, when we started to work on the cachyos handheld option. Basically the driver got probed but then failed with an error. Generally this is not problematic, but I dont like to have from a patchset side introduced errors in the kernel.

I agree on your decision is not good have a kernel error on the patchset (even the error are harmeless). I might try to see if I can solve that probing problem, but might be a bit difficult since I don't own a steamdeck (if you can provide logs would be awesome).

Also the if driver is giving a error when unloading, we can try change that to warning instead, like "Unsupported device, Unloading the driver".

@1Naim
Copy link
Member

1Naim commented Sep 18, 2024

Sorry but you are wrong, there is buiding involve on the AUR package:
1 - LenovoLegionLinux-dkms - compile the module on you machine, i don't provided a binary.

You misunderstand. I wasn't referring to what the package does, but how the package is built. I know that it compiles modules in each system, but the package itself doesn't need to be built.

2 - LenovoLegionLinux - since the gui and cli are python don't require any compilation but the legiond module requires, since is written in C.

Yeah, this one needs building.

@ptr1337
Copy link
Member

ptr1337 commented Sep 28, 2024

Hey,
We have dropped the patchset, because the driver got loaded, even if there was no lenovo hardware available.

That is pretty interesting and should never happen. Do you have more details or a user report for that?
The driver is probed when there is a device PNP0C0. Then the driver checks if the the vendor is LENOVO and the BIOS version is in a list of supported BIOS versions (e.g. HHCN) via DMI. If this is check is not successful the probe aborts and it will unload.

Hi,
This was mainly found on the Steam Deck, when we started to work on the cachyos handheld option. Basically the driver got probed but then failed with an error. Generally this is not problematic, but I dont like to have from a patchset side introduced errors in the kernel.

I agree on your decision is not good have a kernel error on the patchset (even the error are harmeless). I might try to see if I can solve that probing problem, but might be a bit difficult since I don't own a steamdeck (if you can provide logs would be awesome).

Also the if driver is giving a error when unloading, we can try change that to warning instead, like "Unsupported device, Unloading the driver".

I dont feel well, pushing git packages into CachyOS with this.
Do you plan to work on an AUR package, which is based on stable releases?
https://aur.archlinux.org/packages/lenovolegionlinux-dkms-git

@ptr1337
Copy link
Member

ptr1337 commented Sep 28, 2024

Anyways, I have pushed the lenovolegionlinux-dkms-git and lenovolegionlinux-git for now.

@ptr1337 ptr1337 closed this as completed Sep 28, 2024
@MrDuartePT
Copy link

MrDuartePT commented Sep 29, 2024

I dont feel well, pushing git packages into CachyOS with this.

Do you plan to work on an AUR package, which is based on stable releases?

https://aur.archlinux.org/packages/lenovolegionlinux-dkms-git

We should make a real stable release after this PR is done: johnfanv2/LenovoLegionLinux#261

The tag that exist was because the fedora copr build system dosen`t accept git packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants