-
Notifications
You must be signed in to change notification settings - Fork 63
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
[BUG] Is Legion 7i Pro 2023 supported? #62
Comments
This seems is one of the newest model, so I am very hopeful that it will work after a few changes. 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 WindowsIf 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? |
This is the exact same modal of my laptop, but mine is with NVIDIA RTX 4080. Dumps here. |
@ronyclau @lithces I updated the kernel module.
|
Thankyou @johnfanv2 I tried the latest Arch AUR and still the similar problem. The kernel module is loaded but something appears wrong in dmesg output I was unable to install fwts-git in AUR now, however I attached the output of ACPI tables and the output from the windows system, acpi_re.tar.gz Note that when I was dumping the ACPI table on linux i got error messages as follows,
Similar errors appear when I am trying to detach the discrete GPU (for better battery life) using acpi_call as described in Arch Wiki Your insights are highly appreciated. |
@lithces Sorry, for my incomprehensibly message. Please uninstall any package, DKMS module, ARCH package etc. and compile and load the new version from github as described in the README on github (using make etc.) |
@johnfanv2 Thank you so much for the quick work. This is the output of
FYI, I am using PopOS and is booting with kernelstub. Didn't build for DKMS, as it was apparent above that the module was not loading. |
@johnfanv2 Thanks for the prompt fix. The module can be loaded now, however, tests revealed that both temperature and fan speed were not reported correctly. Please see the logs below: Log output of
|
@ronyclau This seems to be a new software on the embedded controller. I disabled everything using specifics of the embedded controller and just use generic WMI methods for now. Please uninstall old versions and compile and load the new version from github as described in the README on github (using make etc.), again. Most stuff should work except setting the fancurve. You should be able to proceed testing except fan curve settings. To make the fan curve work, 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 |
@johnfanv2
and tried the 'make' method. Seems that the kernel module was loaded. I attached some outputs as follows, `make reloadmodule`, note that there are TONS of similar 'ACPI Error's before unloading legion WMI.
`sensors`
`sudo cat /sys/kernel/debug/legion/fancurve`
|
Setting the fancurve does not work, nor does reading it. It complains about |
This new model is a little different, but we will get there to support probably all features. I created a new version to get some more output/logs and already began with implementing temp and fan sensors. Please get the newest version from git and recompile and reload the kernel module. PowermodeWe 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 software (see README) and the LED changes accordingly. Also check custom mode. @lithces Thanks for the debug output. Some ACPI errors are from stuff unrelated to the module and some errors are from this module. We have to adapt the software to this new model to get rid of them. @potatoalienof13 The fan curve is currently not available for this model before we adapt it. I disabled it so that everything is safe and we can set/change all features without accidentally setting something in the embedded controller that is not tested yet for this model. |
It is reading and setting the power mode correctly with software. The LED changes correctly. Here are the outputs of the commands. Quiet mode:
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve
Balance mode:
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve
Performance mode:
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve
Custom mode:
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve
|
Great. Now that power mode works, we can fix and test sensor values. Please get the modified code again, recompile, and test sensor values (see README). It should display correct temperature values (except for IC/chip) and correct fan speeds. Please put some load onto your CPU and GPU to check that everything is labelled correctly. Note that GPU temp might be 0 if the GPU is off or not used. I also made some changes to read the EC memory. Please provide again the output of: sudo cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C It suffices to provide the output in one power mode. |
I can confirm that sensors work, including fan speeds. Everything is labeled correctly.
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
|
@johnfanv2 Can also confirm that both the sensor values and power profile work. Thank you! Here's my dump of EC memory (balance mode when dumped):
|
Thanks for the feedback. Now, that these basic features work. Let's test some of the miscellaneous features before we come to fan control. Please get the new code for kernel module and GUI. Recompile kernel module and reload and perform the following tests 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. Provide the log output from the GUI. Fn Lock
Win Key
Touchpad
Battery Conservation
Rapid Charging
Charge Output Always On
Display Overdrive
OtherIn 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 |
Test Checklist
BacklightThis model has 4 levels of backlight: off, low, medium, and bright. Commands output at each level: Off
Low
Medium
Bright
|
Please get the new code for kernel module and GUI. Recompile kernel module and reload and perform the following tests 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. Provide the log output from the GUI. TouchpadPlease try the updated version of the GUI and kernel module. Rapid ChargingSo I guess, changing the setting has an effect. It is just delayed. Backlight@ronyclau Is it correct that you have a RGB backlight? This might be controlled by USB or another method. You could try https://openrgb.org/ . Can you control it in Windows with Vantage and Legion Toolkit? Fan curvePlease give again the output of sudo cat /sys/kernel/debug/legion/fancurve
sudo dmesg | tail -n 30 |
@johnfanv2 Thanks for the update. Touchpad control (both read and write) is working now. My model has per-key RGB. I can control it with Lenovo Vantage and Legion Toolkit in Windows, but OpenRGB doesn't detect my keyboard in Linux (didn't try in Windows though). Below is the fan curve dump. I have included a bit more of
|
I will have to look into the backlight stuff. |
@johnfanv2 Rebuilt and reloaded the module. Looks like the OOB is fixed now (saw your fix, straight to the point 😄) New dump here
|
@johnfanv2 I pulled the latest code "commit 611f97b" Seems that there are still problem with FanCurve. See below for the output,
|
@johnfanv2 I don't have my Legion 7i Pro Gen 8 yet, but it seems a common issue that people are seeing messages like these pretty regularly:
You'll see a few on the initial boot, and it seems that's all... But after resuming from sleep, messages relating to SNTM and RTCM occur pretty regularly (once per second it sounds like). Is this also something you can help with? Let me know if you need a new issue. I've posted here since you can see some of these messages showing up under this issue already. |
@johnfanv2 Seems the fan curve for RTX4080 is working now, but for RTX4090 there is still some work to do. |
It looks like reading of the fan curve in custom mode works. It displays 100, 200, 300, ... in the output of @lithces . In the output of @ronyclau it shows 0, 0, 0, ... . I am not sure why it is 0. Maybe this is the default value or was set with Windows tools. I added the feature to set the fan curve. Please use the GUI and enter custom mode. Then change the fan curve (currently only the first row for fan 1), write it to hardware, and read it back. Please report back if it works and provide the log output from the GUI and dmesg. Note that this is a new model and I am not sure what the unit for fan speed is. I guess currently, 1000 = 100%. Moreover, the new WMI interface to control fan speed in custom mode only allows to set one fan speed value for each step and does not have so many options like the old one. We can try later if we can write directly to the embedded controller like in the old models to get more features in all modes. |
@camberkenpas You can open a new issue. This might be an issue of another component (not the embedded controller). The reason might be a problem in the ACPI firmware in the newer models or a missing implementation of some "ACPI calls" in Linux. Currently, I think this is no problem for fan control etc. |
@johnfanv2 Unfortunately, I won't have my Legion 7i Pro Gen 8 until July at some point (and perhaps not until mid July or later as the shipping date has already been pushed back a bit). I'm just being proactive at trying to resolve any issues. 😄 I've asked other Gen 8 owners to see if any of them can open the issue. Failing that, I'll open one myself once I have my Gen 8 in the next month or so. I suspect it's a problem in the ACPI firmware itself, but I'm unsure how well that could be worked around. Thank you so much for your time! |
@johnfanv2 Is there any way we could see the logs? |
Sorry for the crash. It is a little hard to develop for the newer models without having one. I heavily rely on the ACPI disassembly and the provided memory dumps. Please try the new version. |
@johnfanv2 Seems that we are able to adjust the rpm for points ID other the first. I changed the value for the second, third point and Apply to HW, then I read the curve, I got this
Any way to apply the pressure so that it could exactly reach the 2rd or 3rd level? |
@johnfanv2 I have another question regarding to the GPU power settings. Currently is limited to 80W from nvidia-smi, on windows it is set to 175W.. I do find the following errors Any insight that we could increase the GPU power? |
I know this a bit odd but the gpu power boost is not controller by the LLL module but by the nvidia driver, for getting the boost you need to enable nvidia-powerd.service, nvidia powerd is a bit buggy on older driver i recommend 535 or newer. I know it new model it can be possible to change the gpu power using the LLL kernel like LLT on windows but i dont have a new model to test [see sreenshot] You can try the option on your device if there are not at 0 [zero values means is not supported] By the way GPUCTGPPowerLimit for what i remeber is the lowest boost in watts in other words, base wattage + boost, in mine GPU is 125+15, but i can only get 130W because is not a Legion 5 pro (Legion 5 Gen 6 is limited to 130W max even with custom vbios) |
By the way for people using the aur |
Problem Descripition
I am running latest Arch Linux and I successfully installed the kernel dkms.
The modules
legion_laptop
are loaded, however in dmesg I found that legion PNP0C09:00: legion_laptop not loaded for this device.Just wondering if we can use the tool for the latest Legion 7i Pro 2023, in China Y9000P 至尊版 2023
Model and Debug Info
Distribution: 6.3.4-2-MANJARO (64-bit) (including version, e.g. Ubuntu 24.04)
Model name: Legion Y9000P IRX8H
CPU model: Intel 13900HX (e.g. AMD Ryzen 7 5800H)
GPU model: NVIDIA RTX 4090 (e.g NVIDIA RTX 3700)
Keyboard backlight: single color with off/medium/bright (RGB, single color with off/on, single color with off/medium/bright)
Light in lid or logo: ??? (yes/no)
Light at IO-Ports at back: ??? (yes/no)
Output of
sudo dmidecode -t system
. Please remove Serial Number and UUID for privacy:Output of
sudo dmidecode -t bios
:Output of
sudo cat /sys/kernel/debug/legion/fancurve
:The text was updated successfully, but these errors were encountered: