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

Legion Pro 5 2023 ( R9000P 2023 in China ) support #71

Open
huyz-git opened this issue Jun 20, 2023 · 12 comments
Open

Legion Pro 5 2023 ( R9000P 2023 in China ) support #71

huyz-git opened this issue Jun 20, 2023 · 12 comments

Comments

@huyz-git
Copy link

Problem Descripition
This model come with up to AMD Ryzen 7945HX processor and up to NVIDIA 4070 GPU.

By default legion-laptop module will not loaded in this model:

[ 3746.695747] legion_laptop: legion_laptop starts loading
[ 3746.695800] legion PNP0C09:00: legion_laptop platform driver probing
[ 3746.695801] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82WM; DMI_BIOS_VERSION:LPCN41WW
[ 3746.695802] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82WM; DMI_BIOS_VERSION:LPCN41WW
[ 3746.695804] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 0
[ 3746.695805] legion PNP0C09:00: Module not useable for this laptop because it is not in allowlist. Notify maintainer if you want to add your device or force load with param force.
[ 3746.695805] legion PNP0C09:00: legion_laptop not loaded for this device

If I force load it with parameter, it also failed to load due to EC version mismatch:

[ 5262.433770] legion_laptop: legion_laptop starts loading
[ 5262.433829] legion PNP0C09:00: legion_laptop platform driver probing
[ 5262.433831] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82WM; DMI_BIOS_VERSION:LPCN41WW
[ 5262.433832] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82WM; DMI_BIOS_VERSION:LPCN41WW
[ 5262.433834] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 1
[ 5262.433835] legion PNP0C09:00: legion_laptop is forced to load.
[ 5262.433835] legion PNP0C09:00: legion_laptop is forced to load and would otherwise be not loaded
[ 5262.433836] legion PNP0C09:00: Using configuration for system: GKCN
[ 5262.433872] legion PNP0C09:00: ACPI CFG: 2081289482
[ 5262.433873] legion_laptop: Creating RAM access to embedded controller
[ 5262.433883] legion_laptop: Succeffuly mapped embedded controller: 0xfe00d400 (in RAM)/0x0 (in EC) to virtual 0x00000000b588faf2
[ 5262.434072] legion PNP0C09:00: Read embedded controller ID 0x5507
[ 5262.434073] legion PNP0C09:00: Expected EC chip id 0x8227 but read 0x5507
[ 5262.434074] legion_laptop: Unloading legion ecram
[ 5262.434075] legion_laptop: Unloading legion ecram done
[ 5262.434075] legion_laptop: Unmapping embedded controller memory at 0xfe00d400 (in RAM)/0x0 (in EC) at virtual 0x00000000b588faf2
[ 5262.434077] legion_laptop: Unloading legion shared
[ 5262.434077] legion_laptop: Unloading legion shared done
[ 5262.434078] legion PNP0C09:00: legion_laptop not loaded for this device
[ 5262.434425] legion: probe of PNP0C09:00 failed with error -12

This is because if the module is forced to load, it will only use the first model. So I modify the source code, and move KWCN model to the first one, and then force load it, it finally loads, but with many errors:

[ 3776.873002] legion_laptop: legion_laptop starts loading
[ 3776.873052] legion PNP0C09:00: legion_laptop platform driver probing
[ 3776.873053] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82WM; DMI_BIOS_VERSION:LPCN41WW
[ 3776.873055] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82WM; DMI_BIOS_VERSION:LPCN41WW
[ 3776.873056] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 1
[ 3776.873057] legion PNP0C09:00: legion_laptop is forced to load.
[ 3776.873057] legion PNP0C09:00: legion_laptop is forced to load and would otherwise be not loaded
[ 3776.873058] legion PNP0C09:00: Using configuration for system: KWCN
[ 3776.873083] legion PNP0C09:00: ACPI CFG: 2081289482
[ 3776.873084] legion_laptop: Creating RAM access to embedded controller
[ 3776.873089] legion_laptop: Succeffuly mapped embedded controller: 0xfe0b0400 (in RAM)/0x0 (in EC) to virtual 0x00000000b588faf2
[ 3776.873279] legion PNP0C09:00: Read embedded controller ID 0x5507
[ 3776.873279] legion PNP0C09:00: Creating debugfs inteface
[ 3776.873284] legion_laptop: Creating sysfs inteface
[ 3776.873293] legion_laptop: Creating hwmon interface
[ 3776.873313] legion_laptop: Creating platform profile support
[ 3776.873315] legion_laptop: Init WMI driver support
[ 3776.873330] legion_wmi <UUID1>: Register after probing for WMI.
[ 3776.873457] legion_wmi <UUID2>: Register after probing for WMI.
[ 3776.873463] legion_wmi <UUID3>: Register after probing for WMI.
[ 3776.873468] legion_wmi <UUID4>: Register after probing for WMI.
[ 3776.873473] legion_wmi <UUID5>: Register after probing for WMI.
[ 3776.873480] legion_wmi <UUID6>: Register after probing for WMI.
[ 3776.873486] legion_wmi <UUID7>: Register after probing for WMI.
[ 3776.873500] legion_wmi <UUID8>: Register after probing for WMI.
[ 3776.873510] legion_laptop: Init keyboard backlight LED driver
[ 3776.873925] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3776.874308] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3776.874309] legion_laptop: Init Y-Logo LED driver
[ 3776.874810] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3776.875082] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3776.875083] legion_laptop: Init IO-Port LED driver
[ 3776.875095] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3776.875095] legion_laptop: Error WMI call for reading brightness: expected a value between 1 and 2, but got 0
[ 3776.875096] legion_laptop: Error reading brighntess for light: 5
[ 3776.875096] legion PNP0C09:00: Init IO-Port LED driver failed. Skipping ...
[ 3776.875097] legion PNP0C09:00: legion_laptop loaded for this device
[ 3776.905136] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3836.243834] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3836.243849] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3836.244149] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2
[ 3836.244245] legion_laptop: Unexpected value in MINIFANCURVE register:0
[ 3836.244447] legion_laptop: No access method for fancurve:0
[ 3836.244448] legion_laptop: Size of object: 48
[ 3836.244581] legion_laptop: ACPI result for <UUID10>:5: ACPI buffer length: 88
[ 3898.310317] legion_laptop: ACPI result for <UUID9>:1: ACPI buffer length: 2

Model and Debug Info

Distribution: Arch (including version, e.g. Ubuntu 24.04)
Model name: Legion Pro 5 2023 ( R9000P in China )
CPU model: AMD Ryzen 9 7945HX
GPU model: NVIDIA RTX 4060
Keyboard backlight: single color with off/medium/bright
Light in lid or logo: yes
Light at IO-Ports at back: no, only power cable has a light

Output of sudo dmidecode -t system. Please remove Serial Number and UUID for privacy:

# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.4.0 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: LENOVO
        Product Name: 82WM
        Version: Legion R9000P ARX8
        Serial Number: <Serial>
        UUID: <UUID11>
        Wake-up Type: Power Switch
        SKU Number: LENOVO_MT_82WM_BU_idea_FM_Legion R9000P ARX8
        Family: Legion R9000P ARX8

Handle 0x0017, DMI type 12, 5 bytes
System Configuration Options
        Option 1: String1 for Type12 Equipment Manufacturer
        Option 2: String2 for Type12 Equipment Manufacturer
        Option 3: String3 for Type12 Equipment Manufacturer
        Option 4: String4 for Type12 Equipment Manufacturer

Handle 0x0026, DMI type 32, 20 bytes
System Boot Information
        Status: No errors detected

Output of sudo dmidecode -t bios:

# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.4.0 present.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
        Vendor: LENOVO
        Version: LPCN41WW
        Release Date: 05/24/2023
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 32 MB
        Characteristics:
                PCI is supported
                PNP is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Function key-initiated network boot is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 1.41
        Firmware Revision: 1.41

Handle 0x0018, DMI type 13, 22 bytes
BIOS Language Information
        Language Description Format: Long
        Installable Languages: 4
                en|US|iso8859-1
                fr|FR|iso8859-1
                ja|JP|unicode
                zh|TW|unicode
        Currently Installed Language: en|US|iso8859-1

Output of sudo cat /sys/kernel/debug/legion/fancurve:

EC Chip ID: 5507
EC Chip Version: 2a4
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 1
ACPI CFG error: 0
ACPI CFG: 2081289482
temperature access method: 5
CPU temperature error: 0
CPU temperature: 60
CPU temperature EC error: 0
CPU temperature EC: 0
CPU temperature ACPI error: 0
CPU temperature ACPI: 60
CPU temperature WMI error: 0
CPU temperature WMI: 0
CPU temperature WMI2 error: 0
CPU temperature WMI2: 0
CPU temperature WMI3 error: 0
CPU temperature WMI3: 60
GPU temperature error: 0
GPU temperature: 48
GPU temperature EC error: 0
GPU temperature EC: 0
GPU temperature ACPI error: 0
GPU temperature ACPI: 48
GPU temperature WMI error: 0
GPU temperature WMI: 0
GPU temperature WMI2 error: 0
GPU temperature WMI2: 0
GPU temperature WMI3 error: 0
GPU temperature WMI3: 48
fan speed access method: 5
1 fanspeed error: 0
1 fanspeed: 2100
1 fanspeed EC error: 0
1 fanspeed EC: 48
1 fanspeed ACPI error: 0
1 fanspeed ACPI: 2100
1 fanspeed WMI error: 0
1 fanspeed WMI: 0
1 fanspeed WMI2 error: 0
1 fanspeed WMI2: 0
1 fanspeed WMI3 error: 0
1 fanspeed WMI3: 2100
2 fanspeed error: 0
2 fanspeed: 2100
2 fanspeed EC error: 0
2 fanspeed EC: 0
2 fanspeed ACPI error: 0
2 fanspeed ACPI: 2100
2 fanspeed WMI error: 0
2 fanspeed WMI: 0
2 fanspeed WMI2 error: 0
2 fanspeed WMI2: 0
2 fanspeed WMI3 error: 0
2 fanspeed WMI3: 2100
powermode access method: 3
powermode error: 0
powermode: 255
powermode EC error: 0
powermode EC: 17
powermode ACPI error: -5
powermode ACPI: 0
powermode WMI error: 0
powermode WMI: 255
has custom powermode: 1
ACPI rapidcharge error: 0
ACPI rapidcharge: 1
WMI backlight 2 state: 0
WMI backlight 3 state: 0
WMI light IO port: 0
WMI light y logo/lid: 0
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: 0
EC lockfancontroller: false
EC fanfullspeed error: false
EC fanfullspeed status: 0
EC fan curve current point id: 0
EC fan curve points size: 0
Current fan curve in hardware (embedded controller):
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
=====================
Current fan curve in hardware (WMI) (might be empty)
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
100      0       0       0       0       0       0       0       0       0
200      0       0       0       0       0       0       0       0       0
300      0       0       0       0       0       0       0       0       0
400      0       0       0       0       0       0       0       0       0
500      0       0       0       0       0       0       0       0       0
600      0       0       0       0       0       0       0       0       0
700      0       0       0       0       0       0       0       0       0
800      0       0       0       0       0       0       0       0       0
900      0       0       0       0       0       0       0       0       0
1000     0       0       0       0       0       0       0       0       0
=====================
@huyz-git huyz-git changed the title Legion Pro 5 2023 ( R9000P in China ) support Legion Pro 5 2023 ( R9000P 2023 in China ) support Jun 20, 2023
@huyz-git
Copy link
Author

huyz-git commented Jun 20, 2023

Here is ACPI tables and WMI entries:
DSDT.txt
fwts_wmi.log
Here is the WMI info from Windows:
WMI.txt

In the WMI info, LENOVO_CPU_METHOD class has only one method, and LENOVO_GPU_METHOD class has zero methods. Unlike 2022 model (#46 (comment)), which has 17 and 10 methods respectively. Does this means that it is impossible to support changing power limits in custom power profiles?

@johnfanv2
Copy link
Owner

@huyz-git
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).

Then, 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

Fan curve

First, please give again the output of

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

Second, 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 sudo dmesg | tail -n 70.

@huyz-git
Copy link
Author

Temperatures and Fan Speeds

The fan speed seems correct, when temperature rises, fan speed increases.
The CPU temperature is nearly the same as the one showed in k10temp module, so it seems correct.
Screenshot_20230622_225308
But the GPU temperature is far higher than the one showed in nvidia-smi, during GPU stress test, it has roughly 5 degrees higher.
Screenshot_20230622_225159

@huyz-git
Copy link
Author

huyz-git commented Jun 22, 2023

Powermode

This tarball contains the output of these 3 files at each powermodes:
powermode.tar.gz
In the gui, powermode can read correctly. Changing power mode also works, and the LED light color is changed correctly. However, all power limit cannot read correctly.

Screenshot_20230622_230501

I tested these power modes in stress test, changing power mode to 3 default modes works, and the power limits do changes accordingly.
But changing power mode to custom mode doesn't work. The LED turn pink, but the power limits is not the one I set in Windows.
On default performance mode, I can get around 70+140 watts power during stress test. If I set the power limits to the maximum value in Windows, these values can persist in Linux, and I can get around 105+140 watts power during stress test. However, if I set power mode to performance mode, run the stress test and wait the CPU power drops to 70 watts, and then change power mode to custom mode use this module, the CPU power further drops to 55 watts rather than increases to 105 watts.

@huyz-git
Copy link
Author

Options

Many options greyed out in gui.
Screenshot_20230622_230740
Win key and touchpad works as expected. Rapid charging I haven't tested because my battery is currently full, will test later.
Display Overdrive can be ticked, but I cannot verify that it has an effect.
Y-Logo light cannot be ticked, click on it and it just remain unticked. If the light is turned off on Windows, it can be turned on by click this option. But if it is on, there is no way to turn it off, click on this option has no effects.
Terminal output:

INFO:legion_linux.legion:Click on UI 'Y-Logo/Lid LED light' element for YLogoLight.
INFO:legion_linux.legion:Feature YLogoLight writing: 1
INFO:legion_linux.legion:Feature YLogoLight reading
INFO:legion_linux.legion:Feature YLogoLight reading: 0

@huyz-git
Copy link
Author

Keyboard Backlight

backlight.tar.gz

@huyz-git
Copy link
Author

huyz-git commented Jun 22, 2023

Fan curve

The "Lock fan controller" option works, the fan can keep at high speed after ending stress test, and return to low speed as soon as I unticked this option.
The "maximum fan speed" option doesn't work, it can be ticked. Terminal output:

INFO:legion_linux.legion:Click on UI 'Set speed to maximum fan speed (often only in custom power mode possible)' element for MaximumFanSpeedFeature.
INFO:legion_linux.legion:Feature MaximumFanSpeedFeature writing: 1
INFO:legion_linux.legion:Feature MaximumFanSpeedFeature reading
INFO:legion_linux.legion:Feature MaximumFanSpeedFeature reading: 0

Fan speed can be read correctly from hw, If I change the fan speed curve in Windows, this module can correctly read these changes.
But If I click apply to hw, my system freezes, both mouse and keyboard is not responsible. After force reboot my device, journalctl -b -1 does not contain anything related to this ( its last line is my previous operation ).

@johnfanv2
Copy link
Owner

johnfanv2 commented Jun 23, 2023

Sorry for the crash. I have to develop it without access to the newest models. Please try the newest version again and test the fan curve. I guess it was an array accessed out of bounds.

Temperatures: I guess the temperatures for the GPU are a little different because these are different sensors or calibration. There is also a difference on my model (e.g. 35 degrees vs 37 degrees).

Greyed out options: Some of them are provided by another driver (idepad)? Maybe in the newer models it does not load or the firmware changes. Is the idepad module loaded (output of lsmod) and do you have any output in dmesg (output of dmesg | grep ideapad)?

Power limits: It's good that changing the power modes work. We can later troubleshoot the power limits. I have not configured/changes the driver for the newest models, yet. Let's do this later and first focus on fan curve etc.

Maximum Fan Speed: I have to adapt it to the newest model. We can test it later after I change it. First try to fix the other problems.

Y-Logo: Can you turn it on off with Ctrl+U or Ctrl+L? Please turn it off and give the output of sudo cat /sys/kernel/debug/legion/fancurve. Then turn it on and give the output of sudo cat /sys/kernel/debug/legion/fancurve.

@huyz-git
Copy link
Author

With the latest commit, changing fan curve works. If I set all the values to 1000 and apply to HW, the fan speed reaches maximum on idle state.

I blacklisted ideapad_laptop module because it blocks wifi and bluetooth, and I have to manually unblock them. But if I load ideapad_laptop module, these 4 options is not greyed out, and can be ticked except "camera power" (this model has a physical camera power switch key, so this option should be useless).

For power limits, currently ryzenadj haven't support dragon range CPUs yet, so I don't know how to check these values now.

For Y logo, I can turn it on and off with Fn+L. Here is the output:
Y-Logo off:

EC Chip ID: 5507
EC Chip Version: 2a4
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 2081289482
temperature access method: 5
CPU temperature error: 0
CPU temperature: 64
CPU temperature EC error: 0
CPU temperature EC: 0
CPU temperature ACPI error: 0
CPU temperature ACPI: 64
CPU temperature WMI error: 0
CPU temperature WMI: 0
CPU temperature WMI2 error: 0
CPU temperature WMI2: 0
CPU temperature WMI3 error: 0
CPU temperature WMI3: 64
GPU temperature error: 0
GPU temperature: 48
GPU temperature EC error: 0
GPU temperature EC: 0
GPU temperature ACPI error: 0
GPU temperature ACPI: 48
GPU temperature WMI error: 0
GPU temperature WMI: 0
GPU temperature WMI2 error: 0
GPU temperature WMI2: 0
GPU temperature WMI3 error: 0
GPU temperature WMI3: 48
fan speed access method: 5
1 fanspeed error: 0
1 fanspeed: 2000
1 fanspeed EC error: 0
1 fanspeed EC: 48
1 fanspeed ACPI error: 0
1 fanspeed ACPI: 2000
1 fanspeed WMI error: 0
1 fanspeed WMI: 0
1 fanspeed WMI2 error: 0
1 fanspeed WMI2: 0
1 fanspeed WMI3 error: 0
1 fanspeed WMI3: 2000
2 fanspeed error: 0
2 fanspeed: 2100
2 fanspeed EC error: 0
2 fanspeed EC: 0
2 fanspeed ACPI error: 0
2 fanspeed ACPI: 2100
2 fanspeed WMI error: 0
2 fanspeed WMI: 0
2 fanspeed WMI2 error: 0
2 fanspeed WMI2: 0
2 fanspeed WMI3 error: 0
2 fanspeed WMI3: 2100
powermode access method: 3
powermode error: 0
powermode: 255
powermode EC error: 0
powermode EC: 17
powermode ACPI error: -5
powermode ACPI: 0
powermode WMI error: 0
powermode WMI: 255
has custom powermode: 1
ACPI rapidcharge error: 0
ACPI rapidcharge: 1
WMI backlight 2 state: 0
WMI backlight 3 state: 0
WMI light IO port: 0
WMI light y logo/lid: 0
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: 0
EC lockfancontroller: false
EC fanfullspeed error: false
EC fanfullspeed status: 0
EC fan curve current point id: 0
EC fan curve points size: 10
Current fan curve in hardware:
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
100      0       0       0       0       0       0       0       0       0
200      0       0       0       0       0       0       0       0       0
300      0       0       0       0       0       0       0       0       0
400      0       0       0       0       0       0       0       0       0
500      0       0       0       0       0       0       0       0       0
600      0       0       0       0       0       0       0       0       0
700      0       0       0       0       0       0       0       0       0
800      0       0       0       0       0       0       0       0       0
900      0       0       0       0       0       0       0       0       0
1000     0       0       0       0       0       0       0       0       0
=====================
Current fan curve in hardware (WMI; might be empty)
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
100      0       0       0       0       0       0       0       0       0
200      0       0       0       0       0       0       0       0       0
300      0       0       0       0       0       0       0       0       0
400      0       0       0       0       0       0       0       0       0
500      0       0       0       0       0       0       0       0       0
600      0       0       0       0       0       0       0       0       0
700      0       0       0       0       0       0       0       0       0
800      0       0       0       0       0       0       0       0       0
900      0       0       0       0       0       0       0       0       0
1000     0       0       0       0       0       0       0       0       0
=====================

Y-Logo on:

EC Chip ID: 5507
EC Chip Version: 2a4
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 2081289482
temperature access method: 5
CPU temperature error: 0
CPU temperature: 63
CPU temperature EC error: 0
CPU temperature EC: 0
CPU temperature ACPI error: 0
CPU temperature ACPI: 63
CPU temperature WMI error: 0
CPU temperature WMI: 0
CPU temperature WMI2 error: 0
CPU temperature WMI2: 0
CPU temperature WMI3 error: 0
CPU temperature WMI3: 63
GPU temperature error: 0
GPU temperature: 49
GPU temperature EC error: 0
GPU temperature EC: 0
GPU temperature ACPI error: 0
GPU temperature ACPI: 49
GPU temperature WMI error: 0
GPU temperature WMI: 0
GPU temperature WMI2 error: 0
GPU temperature WMI2: 0
GPU temperature WMI3 error: 0
GPU temperature WMI3: 49
fan speed access method: 5
1 fanspeed error: 0
1 fanspeed: 2100
1 fanspeed EC error: 0
1 fanspeed EC: 48
1 fanspeed ACPI error: 0
1 fanspeed ACPI: 2100
1 fanspeed WMI error: 0
1 fanspeed WMI: 0
1 fanspeed WMI2 error: 0
1 fanspeed WMI2: 0
1 fanspeed WMI3 error: 0
1 fanspeed WMI3: 2100
2 fanspeed error: 0
2 fanspeed: 2100
2 fanspeed EC error: 0
2 fanspeed EC: 0
2 fanspeed ACPI error: 0
2 fanspeed ACPI: 2100
2 fanspeed WMI error: 0
2 fanspeed WMI: 0
2 fanspeed WMI2 error: 0
2 fanspeed WMI2: 0
2 fanspeed WMI3 error: 0
2 fanspeed WMI3: 2100
powermode access method: 3
powermode error: 0
powermode: 255
powermode EC error: 0
powermode EC: 17
powermode ACPI error: -5
powermode ACPI: 0
powermode WMI error: 0
powermode WMI: 255
has custom powermode: 1
ACPI rapidcharge error: 0
ACPI rapidcharge: 1
WMI backlight 2 state: 0
WMI backlight 3 state: 0
WMI light IO port: 0
WMI light y logo/lid: 0
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: 0
EC lockfancontroller: false
EC fanfullspeed error: false
EC fanfullspeed status: 0
EC fan curve current point id: 0
EC fan curve points size: 10
Current fan curve in hardware:
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
100      0       0       0       0       0       0       0       0       0
200      0       0       0       0       0       0       0       0       0
300      0       0       0       0       0       0       0       0       0
400      0       0       0       0       0       0       0       0       0
500      0       0       0       0       0       0       0       0       0
600      0       0       0       0       0       0       0       0       0
700      0       0       0       0       0       0       0       0       0
800      0       0       0       0       0       0       0       0       0
900      0       0       0       0       0       0       0       0       0
1000     0       0       0       0       0       0       0       0       0
=====================
Current fan curve in hardware (WMI; might be empty)
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
100      0       0       0       0       0       0       0       0       0
200      0       0       0       0       0       0       0       0       0
300      0       0       0       0       0       0       0       0       0
400      0       0       0       0       0       0       0       0       0
500      0       0       0       0       0       0       0       0       0
600      0       0       0       0       0       0       0       0       0
700      0       0       0       0       0       0       0       0       0
800      0       0       0       0       0       0       0       0       0
900      0       0       0       0       0       0       0       0       0
1000     0       0       0       0       0       0       0       0       0
=====================

It seems that these two outputs are exactly the same (except for temperatures).

@huyz-git
Copy link
Author

huyz-git commented Jun 24, 2023

For power modes, I do some stress testing, and find out that, If I set power mode to custom mode with this tool, it actually change the power limits to the same as balance mode ( in my model, this mode has 105 watts of cpu maximum power, and 55 watts cpu cross loading power, which is the same as the result of my stress test ).

Also, applying fan curve will also change power limits in custom mode.

Also, there is a bug with legion_gui.py, the process cannot exit. After closing the window, the python process remains, and also I can't terminate it using Ctrl+C, I can only terminate it using kill <pid>.

@johnfanv2
Copy link
Owner

Regarding ideapad driver: You could try starting it with the parameter (https://wiki.archlinux.org/title/Kernel_parameters) ideapad_laptop.no_bt_rfkill=0 or ideapad_laptop.no_bt_rfkill=1 (no idea what what setting is the correct one) to fix the problem with the bluetooth/wifi.

@MrDuartePT
Copy link
Collaborator

MrDuartePT commented Oct 19, 2023

@huyz-git what features are working and not working with the latest version?
the ideapad_laptopit use for some features that why you get some of them grey out when unload.
Try what jonhfanv2 said and report back.

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

3 participants