Giter VIP home page Giter VIP logo

Comments (11)

johnfanv2 avatar johnfanv2 commented on July 30, 2024

This seems to be a newer model from 2022. Please provide the following information so that I can configure the driver:

Inspecting WMI entries

# Install required tools
sudo apt install fwts

# Create folder for all the new files
mkdir fwts_re
cd fwts_re
sudo fwts wmi - > fwts_wmi.log

Then upload files.

Disassembling ACPI tables

# Install requiered tools
sudo apt install acpica-tools
# Create folder for all the new files
mkdir acpi_re
cd acpi_re

# List ACPI tables and copy them
ls /sys/firmware/acpi/tables/
sudo cp --no-preserve=mode /sys/firmware/acpi/tables/*SDT* .

# Disassemble tables to output DSDT.dsl
iasl -e SSDT* -d DSDT

Then upload files.

Gathering WMI info in Windows

If you have Windows, then the following information are very very useful to make use of the ACPI methods. If you do not have Windows skip it. Open powershell as admin in Windows and run the following script. It will list all available lenovo WMI methods. Copy output to a file and upload.

$wmi_classes = Get-WmiObject -Namespace 'ROOT/WMI' -List -Class "*LENOVO*"
foreach ($wmi_class in $wmi_classes){
  Write-Host "########################################"
  Write-Host "########################################"
  Write-Host "########################################"
  Write-Host "Name:" $wmi_class.Name
  Write-Host "Class Name:" $wmi_class.Name 
  Write-Host "Class GUID:" $wmi_class.Qualifiers["guid"].Value
  Write-Host "Description:" $wmi_class.Methods.Count
  Write-Host "Methods:"
  foreach ($method in $wmi_class.Methods){
    Write-Host "Name:" $method.Name
    Write-Host "WmiMethodId:" $method.Qualifiers["WmiMethodId"].Value
    Write-Host "Class Name:" $wmi_class.Name 
    Write-Host "Class GUID:" $wmi_class.Qualifiers["guid"].Value
    Write-Host "Description:" $method.Qualifiers["Description"].Value
    Write-Host "Implemented:" $method.Qualifiers["Implemented"].Value
    Write-Host ""
  }
  Write-Host ""
}

Which features are the most useful for you?

from lenovolegionlinux.

FY0u11 avatar FY0u11 commented on July 30, 2024

FWTS

fwts.txt


ACPI

acpi.txt

from lenovolegionlinux.

FY0u11 avatar FY0u11 commented on July 30, 2024

This is from windows

output.txt

from lenovolegionlinux.

FY0u11 avatar FY0u11 commented on July 30, 2024

About the most useful features for me. I just want to control my fans speed. Sometimes they are spinning too loud and I have no opportunity to make them quite (it creates uncomfortable situations when I'm working away from home). On Windows I can enable quiet mode, so I would like the same feature on Linux. Thank you in advance.

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

@FY0u11
I added your model/BIOS to the kernel module. Please get the new version, recompile, and reload the kernel module (no need to force anymore).

Could you please upload all the files from the "Disassembling ACPI tables", e.g. in a zip file? Then I can get more information about the firmware and can adapt the driver.

In the meantime, please test the following features. We have to try a bit to find the correct configuration.

Temperatures and Fan Speeds

Please read the fan speeds and temperatures (see README) and confirm that they are sensible and change accordingly, e.g. when you put load onto the CPU the CPU temp and the fan speeds should increase, but GPU temp should stay roughly the same.

Powermode

We will start by confirming that power mode change work and to get me more debug info. Please change the power mode with Fn+Q and provide the output of the following commands in each mode.

sudo cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve

Then please also check if the power mode is read correctly in the OS (see README). Then please check if you can set the power mode with the GUI (see README) and the LED changes accordingly.

Tests the following features with the GUI. Please check that if works or otherwise give precise information about what does not work. Please try to check that reading and writing works with the software.

Please provide the log output from the GUI from the log tab for all the tests.

Fn Lock

  • Enable fn-lock: A LED might turn on. fn functions now work without pressing Fn
  • Disable fn-lock: A LED might turn on. fn functions now work only when pressing Fn

Win Key

  • Enable Win Key: Win Key should work, e.g. open start menu or trigger some other action
  • Disable Win Key: Win Key has no function anymore

Touchpad

  • Enable Touchpad: Touchpad works
  • Disable Touchpad: Touchpad does not work

Battery Conservation

  • Enabled: charging stops if above 60 % (or 80% depending on model)
  • Disabled: charging works up to 100%
    Note: Sometimes it takes a 10-20 seconds before it takes effect

Rapid Charging

  • Enabled: Charging is faster; Check this by comparing the time until fully charged displayed in system information or by comparing charging current.
  • Disabled: Charging is slower
    Note: Sometimes it takes a 10-20 seconds before it takes effect .

Charge Output Always On

  • Enabled: Some USB output is always powered even when laptop is off or sleeping; Test e.g. by trying to charge your phone.
  • Disabled: USB outputs are off when laptop is off

Display Overdrive

  • Enabled: display somehow faster
  • Disabled: display not faster
    Just check if checkbox can be checked or not if you cannot verify that it has an effect.

Keyboard Backlight

In order to fix/configure the keyboard backlight and begin with setting fan curves, please put your keyboard backlight to off, medium, or bright. Provide the output of the following commands (in that order) in each backlight state:

sudo cat /sys/kernel/debug/legion/fancurve
sudo dmesg | tail -n 30

from lenovolegionlinux.

FY0u11 avatar FY0u11 commented on July 30, 2024

Now the output of make reloadmodule is following:

[21641.242671] legion_laptop: loading out-of-tree module taints kernel.
[21641.242804] legion_laptop: module verification failed: signature and/or required key missing - tainting kernel
[21641.246206] legion_laptop: legion_laptop starts loading
[21641.246276] legion PNP0C09:00: legion_laptop platform driver probing
[21641.246278] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82TD; DMI_BIOS_VERSION:K1CN28WW
[21641.246279] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82TD; DMI_BIOS_VERSION:K1CN28WW
[21641.246282] legion PNP0C09:00: is_denied: 0; is_allowed: 1; do_load_by_list: 1; do_load: 1
[21641.246283] legion PNP0C09:00: Using configuration for system: K1CN
[21641.246363] legion PNP0C09:00: ACPI CFG: 3925729556
[21641.246364] legion_laptop: Creating RAM access to embedded controller
[21641.246383] legion_laptop: Succeffuly mapped embedded controller: 0xfe00d400 (in RAM)/0x0 (in EC) to virtual 0x0000000070079181
[21641.246726] legion PNP0C09:00: Read embedded controller ID 0x5263
[21641.246727] legion PNP0C09:00: Expected EC chip id 0x8227 but read 0x5263
[21641.246728] legion_laptop: Unloading legion ecram
[21641.246729] legion_laptop: Unloading legion ecram done
[21641.246729] legion_laptop: Unmapping embedded controller memory at 0xfe00d400 (in RAM)/0x0 (in EC) at virtual 0x0000000070079181
[21641.246731] legion_laptop: Unloading legion shared
[21641.246732] legion_laptop: Unloading legion shared done
[21641.246733] legion PNP0C09:00: legion_laptop not loaded for this device
[21641.247979] legion: probe of PNP0C09:00 failed with error -12

Here is all the files from the "Disassembling ACPI tables"
acpi.tar.gz

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

Without the ACPI I assumed it is an older model. Is this a 2022 or 2023 model?

It seem to be a newer firmware. I updated the driver to use a newer config. Please get the new version, recompile, and reload the module and try again.

from lenovolegionlinux.

FY0u11 avatar FY0u11 commented on July 30, 2024

Still the error. I bought the laptop in december, 2022. It should be 2022 model.

image

from lenovolegionlinux.

FY0u11 avatar FY0u11 commented on July 30, 2024

It can help. https://psref.lenovo.com/Detail/Legion/Legion_7_16IAX7?M=82TD0075GE

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

Sorry, I made a mistake setting the ID, hence the driver does not load. Please get the newest version and try again. It would be good if you can just copy the text (Ctrl+Shift+C in terminal) instead of a screenshot. This makes it easier to copy some stuff.

from lenovolegionlinux.

MrDuartePT avatar MrDuartePT commented on July 30, 2024

@FY0u11 you can report if the latest version works?

from lenovolegionlinux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.