Giter VIP home page Giter VIP logo

Comments (27)

tukanoidd avatar tukanoidd commented on July 30, 2024

Ok, so I decided to be risky and installed it via dkms. System loaded fine, dkms status shows the modules as installed (LenovoLegionLinux/1.0.0, 6.1.25_1, x86_64: installed), but I'm not sure how to get logs for it.

Tests

Quick Test: Reading Current Fancurve from Hardware

No /sys/kernel/debug/legion directory

Quick Test: Read Sensor Values from Hardware

Output of sensors:

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +42.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:        +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 2:        +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 3:        +42.0°C  (high = +100.0°C, crit = +100.0°C)
Core 4:        +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 5:        +47.0°C  (high = +100.0°C, crit = +100.0°C)

No legion_hwmon, but coretemp an no Fan info.

Quick Test: Change Current Fan Curve from Hardware with hwmon

Directory nonexistent
Output of sudo ls -la /sys/module/legion_laptop/drivers/platform:legion/:

total 0
drwxr-xr-x  2 root root    0 Apr 25 16:40 .
drwxr-xr-x 41 root root    0 Apr 25 16:39 ..
--w-------  1 root root 4096 Apr 25 16:52 bind
lrwxrwxrwx  1 root root    0 Apr 25 16:52 module -> ../../../../module/legion_laptop
--w-------  1 root root 4096 Apr 25 16:40 uevent
--w-------  1 root root 4096 Apr 25 16:52 unbind

Normal Usage

Temperature and Fan Monitoring

psensor output:
image
No fans, same as sensors (figures)

Changing and Setting your own Fan Curve with the Python GUI

image
Everything is greyed out (of course), the only usable options are these:
image
But I see they are not legion-specific soooo

I hope I provided enough information for you to work with. Or I could try tackling this myself, but I'm not a kernel dev, so some pointers on how I could add support would be appreciated, because I'm not even sure where to start

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Oh, and I'm running Void on linux kernel (6.1.25_1)

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

This model, i.e. this BIOS version E9CN is not on int the list of compatible models. Adding it probably needs some minor modifications. I guess some of the stuff will work but I cannot guarantee that fan control will work.

Please first uninstall the module via DKMS. Otherwise, the following might sometimes not work. Then run

# go to folder kernel module
make
sudo make forcereloadmodule
sudo dmesg

to load the module even if your model is not on the list yet. Please provide the output of dmesg (for the legion module). Then provide output of:

sudo cat /sys/kernel/debug/legion/fancurve

To make the adaption for your model I need the following information:

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. 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 ""
}

Memory view

Could you also provide the output of sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C? Please change the power mode and provide the output after each change. Then I can check if setting the fan curve is possible on your model.

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Hi, thanks for the quick reply!

Here's the output of sudo make forcereloadmodule (legion portion):

[  104.594895] legion_laptop: legion_laptop starts loading
[  104.594936] legion PNP0C09:00: legion_laptop platform driver probing
[  104.594938] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 81YT; DMI_BIOS_VERSION:E9CN66WW(V4.11)
[  104.594939] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 81YT; DMI_BIOS_VERSION:E9CN66WW(V4.11)
[  104.594941] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 1
[  104.594942] legion PNP0C09:00: legion_laptop is forced to load.
[  104.594942] legion PNP0C09:00: legion_laptop is forced to load and would otherwise be not loaded
[  104.594943] legion PNP0C09:00: Using configuration for system: GKCN
[  104.594952] legion PNP0C09:00: Could not evaluate ACPI _STA
[  104.594952] legion PNP0C09:00: Could not init ACPI access
[  104.594952] legion_laptop: Unloading legion shared
[  104.594953] legion_laptop: Unloading legion shared done
[  104.594953] legion PNP0C09:00: legion_laptop not loaded for this device
[  104.594981] legion: probe of PNP0C09:00 failed with error -5
[  157.714009] legion_laptop: legion_laptop exit
[  157.736785] legion_laptop: legion_laptop starts loading
[  157.736857] legion PNP0C09:00: legion_laptop platform driver probing
[  157.736859] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 81YT; DMI_BIOS_VERSION:E9CN66WW(V4.11)
[  157.736863] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 81YT; DMI_BIOS_VERSION:E9CN66WW(V4.11)
[  157.736870] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 1
[  157.736874] legion PNP0C09:00: legion_laptop is forced to load.
[  157.736876] legion PNP0C09:00: legion_laptop is forced to load and would otherwise be not loaded
[  157.736878] legion PNP0C09:00: Using configuration for system: GKCN
[  157.736890] legion PNP0C09:00: Could not evaluate ACPI _STA
[  157.736892] legion PNP0C09:00: Could not init ACPI access
[  157.736894] legion_laptop: Unloading legion shared
[  157.736895] legion_laptop: Unloading legion shared done
[  157.736896] legion PNP0C09:00: legion_laptop not loaded for this device
[  157.736934] legion: probe of PNP0C09:00 failed with error -5

Unfortunately, it won't load even in this state, seems to be a problem with ACPI for some reason. I'm not sure if it's a hardware issue, or Void Linux, and it's linux6.2 package (I updated the kernel version in the meantime and rebooted multiple times since then, so I don't think that is causing the issue).

Understandably, /sys/kernel/legion doesn't exist still. (So can't get memory view either).

Couldn't get wmi info, fwts is not available on Void and I couldn't find an alternative (unless someone could reference me to one) either, sadly. And I don't have windows installed, I moved to Linux fully about 2 years ago now

Acpi tables I was able to disassemble though, here are all the files
acpi_re.zip

from lenovolegionlinux.

dimesizehole avatar dimesizehole commented on July 30, 2024

Hi, I have an 81YT as well, same bios version. Only difference is i9 cpu and 2080 super with max-q.

I am using windows 10 and have dumped the WMI Methods here:
wmi.zip

hope this helps.

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

@dimesizehole Thanks for the help with the WMI tables! This really helped.

@tukanoidd This ACPI methods in this BIOS version seems different. I have not found the WMI methods in the ACPI disassembly. Getting the output of fwts described above would really help for this. Maybe you could boot from a pen drive with a live Ubuntu system. The version of the kernel should not matter.

In the meantime I added the model to the kernel module and tried to guess the parameters/adaptions. Please get the new version from git and try the steps above again.

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Maybe you could boot from a pen drive with a live Ubuntu system.

Oh ye, idk why i didn't think of it myself, i already have a ventoy usb with multiple ios, adding Ubuntu won't be a problem😅 not at my laptop rn, but will send the info asap

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Got the Ubuntu Live USB working, ran fwts, here's the output. I did see some errors pop up, but im not sure if those are relevant. Here's the output
fwts_wmi.log

Gonna try pulling master now and trying again

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Pulled, didn't have to use forcereloadmodule this time, all seemed to load really smoothly (except backlight, but it says it's disabled by the driver so I guess it's intentional), here's the output of dmesg:

[  804.778407] legion_laptop: legion_laptop starts loading
[  804.778450] legion PNP0C09:00: legion_laptop platform driver probing
[  804.778452] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 81YT; DMI_BIOS_VERSION:E9CN66WW(V4.11)
[  804.778453] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 81YT; DMI_BIOS_VERSION:E9CN66WW(V4.11)
[  804.778812] legion PNP0C09:00: Read embedded controller ID 0xffff
[  804.778813] legion PNP0C09:00: Skipped checking embedded controller id
[  804.778813] legion PNP0C09:00: Creating debugfs inteface
[  804.778818] legion_laptop: Creating sysfs inteface
[  804.778850] legion_laptop: Creating hwmon interface
[  804.778927] legion_laptop: Creating platform profile support
[  804.778929] legion_laptop: Init WMI driver support
[  804.778954] legion_wmi 887B54E3-DDDC-4B2C-8B88-68A26A8835D0: Register after probing for WMI.
[  804.778965] legion_wmi BFD42481-AEE3-4501-A107-AFB68425C5F8: Register after probing for WMI.
[  804.778973] legion_wmi D062906B-12D4-4510-999D-4831EE80E985: Register after probing for WMI.
[  804.778981] legion_wmi BFD42481-AEE3-4502-A107-AFB68425C5F8: Register after probing for WMI.
[  804.778989] legion_wmi BC72A435-E8C1-4275-B3E2-D8B8074ABA59: Register after probing for WMI.
[  804.778997] legion_wmi 10AFC6D9-EA8B-4590-A2E7-1CD3C84BB4B1: Register after probing for WMI.
[  804.779006] legion_wmi D320289E-8FEA-41E0-86F9-611D83151B5F: Register after probing for WMI.
[  804.779023] legion_laptop: Init keyboard backlight LED driver
[  804.779024] legion_laptop: Keyboard backlight handling disabled by this driver
[  804.779024] legion PNP0C09:00: Init keyboard backlight LED driver failed. Skipping ...
[  804.779025] legion PNP0C09:00: legion_laptop loaded for this device

Also figured out why my /sys/kernel/debug was empty - debugfs was not mounted, added to /etc/fstab, so should be good now with subsequent reboots. Here's the output of sudo cat /sys/kernel/debug/legion/fancurve:

EC Chip ID: ffff
EC Chip Version: ffff
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 4228186132
temperature access method: 3
CPU temperature error: 0
CPU temperature: 48
CPU temperature EC error: 0
CPU temperature EC: 255
CPU temperature ACPI error: -5
CPU temperature ACPI: 255
CPU temperature WMI error: 0
CPU temperature WMI: 48
CPU temperature WMI2 error: -14
CPU temperature WMI2: 48
GPU temperature error: 0
GPU temperature: 45
GPU temperature EC error: 0
GPU temperature EC: 255
GPU temperature ACPI error: -5
GPU temperature ACPI: 255
GPU temperature WMI error: 0
GPU temperature WMI: 45
GPU temperature WMI2 error: -14
GPU temperature WMI2: 45
fan speed access method: 3
1 fanspeed error: 0
1 fanspeed: 1600
1 fanspeed EC error: 0
1 fanspeed EC: 65535
1 fanspeed ACPI error: -5
1 fanspeed ACPI: 65535
1 fanspeed WMI error: 0
1 fanspeed WMI: 1600
1 fanspeed WMI2 error: -14
1 fanspeed WMI2: 1600
2 fanspeed error: 0
2 fanspeed: 1600
2 fanspeed EC error: 0
2 fanspeed EC: 65535
2 fanspeed ACPI error: -5
2 fanspeed ACPI: 65535
2 fanspeed WMI error: 0
2 fanspeed WMI: 1600
2 fanspeed WMI2 error: -14
2 fanspeed WMI2: 1600
powermode access method: 3
powermode error: 0
powermode: 2
powermode EC error: 0
powermode EC: 255
powermode ACPI error: -5
powermode ACPI: 1
powermode WMI error: 0
powermode WMI: 2
has custom powermode: 0
ACPI rapidcharge error: 0
ACPI rapidcharge: 0
WMI backlight 2 state: 0
WMI backlight 3 state: -5
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: -1
EC lockfancontroller: error
EC fanfullspeed error: error
EC fanfullspeed status: -1
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
=====================

And Memory view:

00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000300

Weirdly enough, I just realized that I don't have different performance modes, I just have Ghz Boost for some reason. But the memory layout is exactly the same with it being on and off.

I assume I don't need to query ACPI tables again

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Apparently needed to get power-profiles-daemon package t be able to see them, here's the memory views for each profile (no Ghz boost enabled (I forgot it was an extension)). What's interesting though, that after changing each profile, the output stayed the same:

00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000300

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Anything else I should provide?

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

Memory access and fan control does not seem to work. We probably need some changes. Let's test the other things before we do that.

Test power mode

  • Test reading
    • Please change the power mode with Fn + Q. After each change, provide the output of cat /sys/firmware/acpi/platform_profile and sudo cat /sys/kernel/debug/legion/fancurve.
  • Test writing
    • Do you have a LED on your laptop that indicates the power mode? Please change the power mode with software with the follwoing commands. The LED should change. Please provide the output of the commands.
# run as root (sudo su)

echo quiet > /sys/firmware/acpi/platform_profile
cat /sys/firmware/acpi/platform_profile
# or balanced
echo balanced > /sys/firmware/acpi/platform_profile
cat /sys/firmware/acpi/platform_profile
# or performance
echo performance > /sys/firmware/acpi/platform_profile
cat /sys/firmware/acpi/platform_profile
  • What do you mean by Ghz boost? Is this a feature on your model?

Test Fan Speed and Temperature

Open psensor. You should see newly values for CPU and GPU temperature and two fan speed. Run something CPU intensive that does not use the GPU much (https://www.tecmint.com/linux-cpu-load-stress-test-with-stress-ng-tool/). This should increase mainly CPU temperature. The fan speed should also increase. Make sure the speed value makes sense, e.g. by listening to the fan noise.
Run something GPU intensive that does not use the CPU much. The GPU temperature should mainly increase.

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

Test rapid charging

You can also test rapid charging be enabling/disabling it in the GUI and checking if it makes a differences, e.g. by checking the charging current (should be larger with rapid charging) or the estimated time until it is full (should be smaller if rapid charging is enabled).
Please also provide the output of sudo cat /sys/kernel/debug/legion/fancurve when disabled and when enabled.

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Please change the power mode with Fn + Q.
Oh yeah, sorry about that, idk why I didn't think of it in the first place:

Test Reading

Here are the outputs of cat /sys/firmware/acpi/platform_profile:
Balanced: balanced
Performance: performance
Quiet: quiet

And here are the outputs for sudo cat /sys/kernel/debug/legion/fancurve:
Balanced

EC Chip ID: ffff
EC Chip Version: ffff
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 4228186132
temperature access method: 3
CPU temperature error: 0
CPU temperature: 93
CPU temperature EC error: 0
CPU temperature EC: 255
CPU temperature ACPI error: -5
CPU temperature ACPI: 255
CPU temperature WMI error: 0
CPU temperature WMI: 93
CPU temperature WMI2 error: -14
CPU temperature WMI2: 93
GPU temperature error: 0
GPU temperature: 47
GPU temperature EC error: 0
GPU temperature EC: 255
GPU temperature ACPI error: -5
GPU temperature ACPI: 255
GPU temperature WMI error: 0
GPU temperature WMI: 47
GPU temperature WMI2 error: -14
GPU temperature WMI2: 47
fan speed access method: 3
1 fanspeed error: 0
1 fanspeed: 3200
1 fanspeed EC error: 0
1 fanspeed EC: 65535
1 fanspeed ACPI error: -5
1 fanspeed ACPI: 65535
1 fanspeed WMI error: 0
1 fanspeed WMI: 3200
1 fanspeed WMI2 error: -14
1 fanspeed WMI2: 3200
2 fanspeed error: 0
2 fanspeed: 3300
2 fanspeed EC error: 0
2 fanspeed EC: 65535
2 fanspeed ACPI error: -5
2 fanspeed ACPI: 65535
2 fanspeed WMI error: 0
2 fanspeed WMI: 3300
2 fanspeed WMI2 error: -14
2 fanspeed WMI2: 3300
powermode access method: 3
powermode error: 0
powermode: 2
powermode EC error: 0
powermode EC: 255
powermode ACPI error: -5
powermode ACPI: 1
powermode WMI error: 0
powermode WMI: 2
has custom powermode: 0
ACPI rapidcharge error: 0
ACPI rapidcharge: 0
WMI backlight 2 state: 0
WMI backlight 3 state: -5
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: -1
EC lockfancontroller: error
EC fanfullspeed error: error
EC fanfullspeed status: -1
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
=====================

Performance

EC Chip ID: ffff
EC Chip Version: ffff
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 4228186132
temperature access method: 3
CPU temperature error: 0
CPU temperature: 50
CPU temperature EC error: 0
CPU temperature EC: 255
CPU temperature ACPI error: -5
CPU temperature ACPI: 255
CPU temperature WMI error: 0
CPU temperature WMI: 50
CPU temperature WMI2 error: -14
CPU temperature WMI2: 50
GPU temperature error: 0
GPU temperature: 46
GPU temperature EC error: 0
GPU temperature EC: 255
GPU temperature ACPI error: -5
GPU temperature ACPI: 255
GPU temperature WMI error: 0
GPU temperature WMI: 46
GPU temperature WMI2 error: -14
GPU temperature WMI2: 46
fan speed access method: 3
1 fanspeed error: 0
1 fanspeed: 1800
1 fanspeed EC error: 0
1 fanspeed EC: 65535
1 fanspeed ACPI error: -5
1 fanspeed ACPI: 65535
1 fanspeed WMI error: 0
1 fanspeed WMI: 1800
1 fanspeed WMI2 error: -14
1 fanspeed WMI2: 1800
2 fanspeed error: 0
2 fanspeed: 1800
2 fanspeed EC error: 0
2 fanspeed EC: 65535
2 fanspeed ACPI error: -5
2 fanspeed ACPI: 65535
2 fanspeed WMI error: 0
2 fanspeed WMI: 1800
2 fanspeed WMI2 error: -14
2 fanspeed WMI2: 1800
powermode access method: 3
powermode error: 0
powermode: 3
powermode EC error: 0
powermode EC: 255
powermode ACPI error: -5
powermode ACPI: 1
powermode WMI error: 0
powermode WMI: 3
has custom powermode: 0
ACPI rapidcharge error: 0
ACPI rapidcharge: 0
WMI backlight 2 state: 0
WMI backlight 3 state: -5
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: -1
EC lockfancontroller: error
EC fanfullspeed error: error
EC fanfullspeed status: -1
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
=====================

Quiet

EC Chip ID: ffff
EC Chip Version: ffff
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 4228186132
temperature access method: 3
CPU temperature error: 0
CPU temperature: 49
CPU temperature EC error: 0
CPU temperature EC: 255
CPU temperature ACPI error: -5
CPU temperature ACPI: 255
CPU temperature WMI error: 0
CPU temperature WMI: 49
CPU temperature WMI2 error: -14
CPU temperature WMI2: 49
GPU temperature error: 0
GPU temperature: 45
GPU temperature EC error: 0
GPU temperature EC: 255
GPU temperature ACPI error: -5
GPU temperature ACPI: 255
GPU temperature WMI error: 0
GPU temperature WMI: 45
GPU temperature WMI2 error: -14
GPU temperature WMI2: 45
fan speed access method: 3
1 fanspeed error: 0
1 fanspeed: 1600
1 fanspeed EC error: 0
1 fanspeed EC: 65535
1 fanspeed ACPI error: -5
1 fanspeed ACPI: 65535
1 fanspeed WMI error: 0
1 fanspeed WMI: 1600
1 fanspeed WMI2 error: -14
1 fanspeed WMI2: 1600
2 fanspeed error: 0
2 fanspeed: 1600
2 fanspeed EC error: 0
2 fanspeed EC: 65535
2 fanspeed ACPI error: -5
2 fanspeed ACPI: 65535
2 fanspeed WMI error: 0
2 fanspeed WMI: 1600
2 fanspeed WMI2 error: -14
2 fanspeed WMI2: 1600
powermode access method: 3
powermode error: 0
powermode: 1
powermode EC error: 0
powermode EC: 255
powermode ACPI error: -5
powermode ACPI: 1
powermode WMI error: 0
powermode WMI: 1
has custom powermode: 0
ACPI rapidcharge error: 0
ACPI rapidcharge: 0
WMI backlight 2 state: 0
WMI backlight 3 state: -5
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: -1
EC lockfancontroller: error
EC fanfullspeed error: error
EC fanfullspeed status: -1
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
=====================

Test Writing

Yes, I have LED (Balanced - white, Performance - Red, Quit - Blue)

Writing worked like a charm, LED changed it's color appropriately

GHz Boost

No, sorry, my bad, I forgot I had installed this extension and since I haven't configured power profiles at that point (I only recently switched to Void from Garuda and updating the system as I go along) I got it confused with those.

Test Fan Speed and Temperature

Temperature was being read properly and was updating as well, but fan speed was just stuck like this
image

Testing Rapid Charging

Disabled:

EC Chip ID: ffff
EC Chip Version: ffff
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 4228186132
temperature access method: 3
CPU temperature error: 0
CPU temperature: 55
CPU temperature EC error: 0
CPU temperature EC: 255
CPU temperature ACPI error: -5
CPU temperature ACPI: 255
CPU temperature WMI error: 0
CPU temperature WMI: 55
CPU temperature WMI2 error: -14
CPU temperature WMI2: 55
GPU temperature error: 0
GPU temperature: 50
GPU temperature EC error: 0
GPU temperature EC: 255
GPU temperature ACPI error: -5
GPU temperature ACPI: 255
GPU temperature WMI error: 0
GPU temperature WMI: 50
GPU temperature WMI2 error: -14
GPU temperature WMI2: 50
fan speed access method: 3
1 fanspeed error: 0
1 fanspeed: 1800
1 fanspeed EC error: 0
1 fanspeed EC: 65535
1 fanspeed ACPI error: -5
1 fanspeed ACPI: 65535
1 fanspeed WMI error: 0
1 fanspeed WMI: 1800
1 fanspeed WMI2 error: -14
1 fanspeed WMI2: 1800
2 fanspeed error: 0
2 fanspeed: 1800
2 fanspeed EC error: 0
2 fanspeed EC: 65535
2 fanspeed ACPI error: -5
2 fanspeed ACPI: 65535
2 fanspeed WMI error: 0
2 fanspeed WMI: 1800
2 fanspeed WMI2 error: -14
2 fanspeed WMI2: 1800
powermode access method: 3
powermode error: 0
powermode: 2
powermode EC error: 0
powermode EC: 255
powermode ACPI error: -5
powermode ACPI: 1
powermode WMI error: 0
powermode WMI: 2
has custom powermode: 0
ACPI rapidcharge error: 0
ACPI rapidcharge: 0
WMI backlight 2 state: 0
WMI backlight 3 state: -5
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: -1
EC lockfancontroller: error
EC fanfullspeed error: error
EC fanfullspeed status: -1
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
=====================

Enabled:

EC Chip ID: ffff
EC Chip Version: ffff
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 4228186132
temperature access method: 3
CPU temperature error: 0
CPU temperature: 57
CPU temperature EC error: 0
CPU temperature EC: 255
CPU temperature ACPI error: -5
CPU temperature ACPI: 255
CPU temperature WMI error: 0
CPU temperature WMI: 57
CPU temperature WMI2 error: -14
CPU temperature WMI2: 57
GPU temperature error: 0
GPU temperature: 50
GPU temperature EC error: 0
GPU temperature EC: 255
GPU temperature ACPI error: -5
GPU temperature ACPI: 255
GPU temperature WMI error: 0
GPU temperature WMI: 50
GPU temperature WMI2 error: -14
GPU temperature WMI2: 50
fan speed access method: 3
1 fanspeed error: 0
1 fanspeed: 1800
1 fanspeed EC error: 0
1 fanspeed EC: 65535
1 fanspeed ACPI error: -5
1 fanspeed ACPI: 65535
1 fanspeed WMI error: 0
1 fanspeed WMI: 1800
1 fanspeed WMI2 error: -14
1 fanspeed WMI2: 1800
2 fanspeed error: 0
2 fanspeed: 1800
2 fanspeed EC error: 0
2 fanspeed EC: 65535
2 fanspeed ACPI error: -5
2 fanspeed ACPI: 65535
2 fanspeed WMI error: 0
2 fanspeed WMI: 1800
2 fanspeed WMI2 error: -14
2 fanspeed WMI2: 1800
powermode access method: 3
powermode error: 0
powermode: 2
powermode EC error: 0
powermode EC: 255
powermode ACPI error: -5
powermode ACPI: 1
powermode WMI error: 0
powermode WMI: 2
has custom powermode: 0
ACPI rapidcharge error: 0
ACPI rapidcharge: 1
WMI backlight 2 state: 0
WMI backlight 3 state: -5
EC minifancurve feature enabled: 0
EC minifancurve on cool: error
EC lockfancontroller error: -1
EC lockfancontroller: error
EC fanfullspeed error: error
EC fanfullspeed status: -1
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
=====================

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

And sorry for a late response, got sick, just got well enough to be able to do this properly :)

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

@tukanoidd Ok. So everything except fan speed seems to work. Are you sure that the fan speed wasn't just constant? Unfortunately, on your model one has only an accuracy of 100.

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

@tukanoidd Ok. So everything except fan speed seems to work. Are you sure that the fan speed wasn't just constant? Unfortunately, on your model one has only an accuracy of 100.

Honestly, not sure if it was just constant, but it feels strange to actually not change at all in 5-10 min

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

@tukanoidd I see that values 1800, 1600, 3200, and 3300 were in the outputs of sudo cat /sys/kernel/debug/legion/fancurve. From your image I see that 2300 was measured (first value), 1600 (second) was minimum, and 3500 (last) was maximum. Could you provide the the image of the complete window of psensor while you stress the CPU?

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

@tukanoidd I see that values 1800, 1600, 3200, and 3300 were in the outputs of sudo cat /sys/kernel/debug/legion/fancurve. From your image I see that 2300 was measured (first value), 1600 (second) was minimum, and 3500 (last) was maximum. Could you provide the the image of the complete window of psensor while you stress the CPU?

Not at home rn, but will do when I'm back

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Ok, no, my bad, I didn't realize it was actually working, the values were changing as the fans sped up.
Psensor under stress:
image

Psensor without stress:
image

I don't know why I didn't recognize that change, I might've paid more attention to CPU, sorry for that

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024
  1. Great! So temps, fan speed, and power mode works.
  2. Have you checked that enabling/disabling rapid charge actually has an effect on the charging speed.
  3. To get fan control working we have to inspect the memory. Does sudo busybox devmem 0xFC7E0800 works on your distribution? It should output the value of the memory at this address. You probably first have to install the busybox package.

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024
  1. Ye, seems like it :)
  2. Honestly, not sure. I usually use my laptop as a desktop (I just like the portability of laptops and that I can just take it with me anywhere if needed), so I have power plugged in all the time, so the battery could've degraded quite a bit at this point. I did try the setting though, and Gnome power settings did seem to skip from "14 minutes remaining" to 10 (I had 80% battery at that point) in about a minute (I'm assuming it just takes time for the settings to reload the info) but I'm not sure if that's a reliable source of information.
  3. Ye, had to install busybox-huge (for anyone who also uses Void) for devmem to work, but the output is 0x8E000000

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

@tukanoidd

  1. ok, good!
  2. I guess it works.
  3. It seems like the busybox tool can only access at most 128bit. I changed the kernel module to read the whole memory of the embedded controller via memory mapped access to find the memory addresses where the fan control values might be stored. Please get the new code, compile, load the kernel module. Please change the power mode and provide the output of cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C after each change. Note that it is ecmemoryram instead of ecmemory which was used above.

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

At work, will do when i come back home

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

@johnfanv2

Balance

00000000  00 00 00 8f 00 00 00 00  00 52 c0 00 00 a2 56 00  |.........R....V.|
00000010  00 00 30 40 30 01 1a 1a  26 00 00 00 40 62 00 00  |..0@0...&...@b..|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000060  00 80 16 17 24 00 00 00  00 00 00 00 00 00 00 00  |....$...........|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 00 00 00 02 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  43 65 6c 78 70 65 72 00  00 4c 31 39 43 34 50 43  |Celxper..L19C4PC|
000000a0  00 00 00 c7 41 00 00 4e  00 00 00 08 64 2a 00 78  |....A..N....d*.x|
000000b0  4d 4d 2d 00 37 00 35 45  00 00 00 0f 00 5a 00 00  |MM-.7.5E.....Z..|
000000c0  00 02 4f 12 f2 05 20 3f  28 3c 40 1f a0 1d 3e 24  |..O... ?(<@...>$|
000000d0  7c 09 7d 09 8c 09 a0 1d  f9 02 59 40 00 00 2c 52  ||.}.......Y@..,R|
000000e0  00 00 00 c4 0f cb 0f cf  0f c0 0f 00 00 00 00 00  |................|
000000f0  00 00 00 00 00 00 f8 43  60 00 00 46 00 00 00 00  |.......C`..F....|
00000100  01 65 26 55 1a 09 05 00  46 00 41 5c 15 50 5c 20  |.e&U....F.A\.P\ |
00000110  50 5c 20 50 5c 20 50 5c  20 50 5c 20 50 5c 20 52  |P\ P\ P\ P\ P\ R|
00000120  5f 23 5e 64 23 1a 1a 01  65 24 6d 1a 08 00 00 46  |_#^d#...e$m....F|
00000130  00 41 5c 15 50 5c 20 50  5c 20 50 5c 20 50 5c 20  |.A\.P\ P\ P\ P\ |
00000140  50 5c 20 50 5c 20 52 5f  23 5e 64 23 1a 1a 00 00  |P\ P\ R_#^d#....|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000160  00 00 00 00 00 01 01 00  00 00 00 00 00 00 00 00  |................|
00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001d0  00 00 00 64 00 00 00 00  00 00 00 00 00 00 00 00  |...d............|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000300  00 00 00 01 14 5a e6 e6  00 08 00 10 02 00 00 32  |.....Z.........2|
00000310  00 00 00 12 00 00 22 00  00 00 00 00 03 00 0a 00  |......".........|
00000320  00 00 00 1a 00 10 02 1a  00 10 02 1a 00 10 02 1a  |................|
00000330  00 10 02 1a 00 10 02 1a  00 10 02 1a 00 10 02 1a  |................|
00000340  00 00 00 00 00 00 00 00  00 09 80 00 00 06 00 00  |................|
00000350  00 00 00 00 10 00 00 00  00 00 00 00 00 00 00 00  |................|
00000360  00 00 00 00 00 00 00 00  06 00 00 00 00 1b 00 00  |................|
00000370  00 00 00 00 00 2a 00 80  40 00 00 00 d5 08 cd 38  |.....*[email protected]|
00000380  cb 44 00 00 00 00 00 00  00 00 00 00 2b 00 00 0b  |.D..........+...|
00000390  00 00 01 00 07 00 00 00  00 00 00 02 01 80 00 00  |................|
000003a0  3e 3e 88 0b 00 00 00 00  00 00 00 00 00 00 00 00  |>>..............|
000003b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000003e0  00 00 00 00 00 00 00 00  00 01 00 00 6c 5b 00 a8  |............l[..|
000003f0  0b 00 00 00 00 00 00 00  00 00 00 00 00 01 00 33  |...............3|
00000400  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000500  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000510  00 02 20 ff ff 00 00 f0  30 10 00 c0 00 00 83 82  |.. .....0.......|
00000520  1c 0e 05 00 00 00 00 f2  30 fd 22 2e 06 00 64 31  |........0."...d1|
00000530  20 70 00 00 00 00 50 f0  b5 00 40 11 08 00 9b 00  | p....P...@.....|
00000540  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000560  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 20  |............... |
00000570  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000580  5a a5 01 80 98 0a 75 5b  00 00 00 00 00 00 00 00  |Z.....u[........|
00000590  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000005a0  08 00 00 00 00 00 04 04  04 04 25 04 37 25 00 00  |..........%.7%..|
000005b0  00 60 00 00 00 84 01 00  00 00 00 00 00 00 00 00  |.`..............|
000005c0  00 04 00 00 00 00 00 00  ff 00 00 01 00 00 00 00  |................|
000005d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000600

Performance

00000000  00 00 00 8f 00 00 00 00  00 52 c0 00 00 a2 56 00  |.........R....V.|
00000010  00 00 31 41 31 00 23 23  26 00 01 00 40 62 00 00  |..1A1.##&...@b..|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000060  00 80 16 17 24 00 00 00  00 00 00 00 00 00 00 00  |....$...........|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 00 00 00 02 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  43 65 6c 78 70 65 72 00  00 4c 31 39 43 34 50 43  |Celxper..L19C4PC|
000000a0  00 00 00 c7 41 00 00 2f  00 00 00 08 64 2a 00 78  |....A../....d*.x|
000000b0  51 51 2c 00 38 10 35 46  00 00 00 0f 00 5a 00 00  |QQ,.8.5F.....Z..|
000000c0  00 02 70 12 f2 05 3a 3f  28 3c 40 1f a0 1d 3e 24  |..p...:?(<@...>$|
000000d0  7d 09 7d 09 8c 09 a0 1d  f9 02 59 50 00 00 2c 52  |}.}.......YP..,R|
000000e0  00 00 00 c7 0f cf 0f d3  0f c5 0f 00 00 00 00 00  |................|
000000f0  00 00 00 00 00 00 f8 43  0a 0f 00 46 00 00 00 00  |.......C...F....|
00000100  00 65 34 f9 23 0d 05 00  46 00 41 61 15 58 61 2d  |.e4.#...F.Aa.Xa-|
00000110  58 61 2d 58 61 2d 58 61  2d 58 61 2d 58 61 2d 58  |Xa-Xa-Xa-Xa-Xa-X|
00000120  61 2d 5e 64 2d 23 23 00  65 32 f9 23 0d 00 00 46  |a-^d-##.e2.#...F|
00000130  00 41 61 15 58 61 2d 58  61 2d 58 61 2d 58 61 2d  |.Aa.Xa-Xa-Xa-Xa-|
00000140  58 61 2d 58 61 2d 58 61  2d 5e 64 2d 23 23 00 00  |Xa-Xa-Xa-^d-##..|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000160  00 00 00 00 00 01 01 00  00 00 00 00 00 00 00 00  |................|
00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001d0  00 00 00 52 00 00 00 00  00 00 00 00 00 00 00 00  |...R............|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000300  00 00 00 01 14 5a e6 e6  00 08 00 10 02 00 00 32  |.....Z.........2|
00000310  00 00 00 12 00 00 03 00  00 00 00 00 03 00 0a 00  |................|
00000320  00 00 00 1a 00 10 02 1a  00 10 02 1a 00 10 02 1a  |................|
00000330  00 10 02 1a 00 10 02 1a  00 10 02 1a 00 10 02 1a  |................|
00000340  00 00 00 00 00 00 00 00  00 09 80 00 00 06 00 00  |................|
00000350  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000360  00 00 00 00 00 00 00 00  06 00 00 00 00 3a 00 00  |.............:..|
00000370  00 00 00 00 00 49 00 80  40 00 00 00 d5 08 cd 38  |[email protected]|
00000380  cb 44 00 00 00 00 00 00  00 00 00 00 2b 00 00 0b  |.D..........+...|
00000390  00 00 01 00 07 00 00 00  00 00 00 02 01 80 00 00  |................|
000003a0  3e 3e 88 0b 00 00 00 00  00 00 00 00 00 00 00 00  |>>..............|
000003b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000003e0  00 00 00 00 00 00 00 00  00 01 00 00 6c 5b 00 a8  |............l[..|
000003f0  0b 00 00 00 00 00 00 00  00 00 00 00 00 01 00 33  |...............3|
00000400  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000500  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000510  00 02 20 ff ff 00 00 f0  30 10 00 c0 00 00 83 82  |.. .....0.......|
00000520  1c 0e 05 00 00 00 00 f2  30 fd 22 2e 06 00 64 31  |........0."...d1|
00000530  20 70 00 00 00 00 50 f0  b5 00 40 11 08 00 9b 00  | p....P...@.....|
00000540  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000560  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 20  |............... |
00000570  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000580  5a a5 01 80 98 0a 75 5b  00 00 00 00 00 00 00 00  |Z.....u[........|
00000590  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000005a0  08 00 20 80 00 00 20 0c  04 04 25 04 37 25 02 02  |.. ... ...%.7%..|
000005b0  00 60 00 00 00 84 09 00  00 00 00 00 00 00 00 00  |.`..............|
000005c0  00 04 00 00 00 00 00 00  ff 00 00 01 00 00 00 00  |................|
000005d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000600

Quiet

00000000  00 00 00 8f 00 00 00 00  00 52 c0 00 00 a2 56 00  |.........R....V.|
00000010  00 00 31 41 31 01 21 22  26 00 02 00 40 62 00 00  |..1A1.!"&...@b..|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000060  00 80 16 17 24 00 00 00  00 00 00 00 00 00 00 00  |....$...........|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 00 00 00 02 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  43 65 6c 78 70 65 72 00  00 4c 31 39 43 34 50 43  |Celxper..L19C4PC|
000000a0  00 00 00 c7 41 00 00 1b  00 00 00 08 64 2a 00 78  |....A.......d*.x|
000000b0  4e 4e 2e 00 38 10 36 46  00 00 00 0f 00 5a 00 00  |NN..8.6F.....Z..|
000000c0  00 02 8f 12 f2 05 4e 3f  28 3c 40 1f a0 1d 3f 24  |......N?(<@...?$|
000000d0  7d 09 7d 09 8c 09 a0 1d  f9 02 59 50 00 00 2c 52  |}.}.......YP..,R|
000000e0  00 00 00 cf 0f d6 0f db  0f cc 0f 00 00 00 00 00  |................|
000000f0  00 00 00 00 00 00 f8 43  02 09 00 46 00 00 00 00  |.......C...F....|
00000100  00 65 30 01 21 03 05 00  5a 00 54 5c 20 54 5c 20  |.e0.!...Z.T\ T\ |
00000110  54 5c 20 54 5c 20 54 5c  20 54 5c 20 54 5c 20 58  |T\ T\ T\ T\ T\ X|
00000120  5f 23 5e 64 23 17 17 00  65 2e 01 22 03 00 00 5a  |_#^d#...e.."...Z|
00000130  00 54 5c 20 54 5c 20 54  5c 20 54 5c 20 54 5c 20  |.T\ T\ T\ T\ T\ |
00000140  54 5c 20 54 5c 20 58 5f  23 5e 64 23 17 17 00 00  |T\ T\ X_#^d#....|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000160  00 00 00 00 00 01 01 00  00 00 00 00 00 00 00 00  |................|
00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001d0  00 00 00 5d 00 00 00 00  00 00 00 00 00 00 00 00  |...]............|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000300  00 00 00 01 14 5a e6 e6  00 08 00 10 02 00 00 32  |.....Z.........2|
00000310  00 00 00 12 00 00 1d 00  00 00 00 00 03 00 0a 00  |................|
00000320  00 00 00 1a 00 10 02 1a  00 10 02 1a 00 10 02 1a  |................|
00000330  00 10 02 1a 00 10 02 1a  00 10 02 1a 00 10 02 1a  |................|
00000340  00 00 00 00 00 00 00 00  00 09 80 00 00 06 00 00  |................|
00000350  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000360  00 00 00 00 00 00 00 00  06 00 00 00 00 05 00 00  |................|
00000370  00 00 00 00 00 14 00 80  40 00 00 00 d5 08 cd 38  |[email protected]|
00000380  cb 44 00 00 00 00 00 00  00 00 00 00 2b 00 00 0b  |.D..........+...|
00000390  00 00 01 00 07 00 00 00  00 00 00 02 01 80 00 00  |................|
000003a0  3f 3f 88 0b 00 00 00 00  00 00 00 00 00 00 00 00  |??..............|
000003b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000003e0  00 00 00 00 00 00 00 00  00 01 00 00 6c 5b 00 a8  |............l[..|
000003f0  0b 00 00 00 00 00 00 00  00 00 00 00 00 01 00 33  |...............3|
00000400  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000500  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000510  00 02 20 ff ff 00 00 f0  30 10 00 c0 00 00 83 82  |.. .....0.......|
00000520  1c 0e 05 00 00 00 00 f2  30 fd 22 2e 06 00 64 31  |........0."...d1|
00000530  20 70 00 00 00 00 50 f0  b5 00 40 11 08 00 9b 00  | p....P...@.....|
00000540  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000560  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 20  |............... |
00000570  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000580  5a a5 01 80 98 0a 75 5b  00 00 00 00 00 00 00 00  |Z.....u[........|
00000590  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000005a0  08 00 00 80 00 00 20 0c  0c 04 25 04 37 25 03 03  |...... ...%.7%..|
000005b0  00 60 00 00 00 84 09 00  00 00 00 00 00 00 00 00  |.`..............|
000005c0  00 04 00 00 00 00 00 00  ff 00 00 01 00 00 00 00  |................|
000005d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000600

from lenovolegionlinux.

johnfanv2 avatar johnfanv2 commented on July 30, 2024

@tukanoidd I don't see any values that could be interpreted as fan speeds or temperature limits for each step. If you find the number/addresses I can add them to the driver. You might want to look for these numbers in the dumps yourself because it is a little harder to see them from only three dumps:

  • They are usually numbers that increase from byte to byte and that change between the three modes.
  • There are usually at least 3 steps, so one expects three increasing numbers. In other legions models, there are 8 to 10 steps.
  • There are numbers for fan speed and temperature limit.
  • The numbers do not change if you do not change power mode but just output the hexdump again.

Therefore, I can not activate fan control right now. Are there any other features that your are looking for?

from lenovolegionlinux.

tukanoidd avatar tukanoidd commented on July 30, 2024

Oh shoot, sorry for such a late response, I got busy at a job and completely forgot to check up on this!

I'm not sure I have enough knowledge to understand the hexdumps, but it's fine, no worries! I've managed for 2 years without fan controls, so I don't mind. You've been a great help, thank you!

Closing the issue. Thanks again!

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.