-
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
Legion Slim 5 16IRH8 Support #93
Comments
I added your model to the driver. Please get the newest code, recompile, and try again. Then, please test the following features. We have to try a bit to find the correct configuration. Temperatures and Fan SpeedsPlease 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. 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 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
Win Key
Touchpad
Battery Conservation
Rapid Charging
Charge Output Always On
Display Overdrive
Keyboard BacklightIn 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 curveI guess this is a newer model, so we only can change the fan curve in custom mode for now. Use the GUI to go into custom mode and change the fan curve. I guess that in the newer models the value is from 0 to 1000 (maximal) and not in RPM. Please try to verify it. Please also try if changing the fan curve in custom mode really influences the fan curve. |
legion PNP0C09:00: legion_laptop not loaded for this device. I redid the first step. idk what to do now |
Sorry if I shouldn't intervene in this thread, but I got the same model and same specs as @klmshrk but running on fedora 38 kernel 6.4.10-200, tried installing with dkms and rebooted. my dmesg output includes
|
@class1c-j I have the same output
|
I disabled a ACPI check and updated the code. Please try again with the newest code. |
|
I updated the id of the embedded controller in the code. Please try with the new code again. This seems to be different from what I expected. Is this a 2023 model? |
@johnfanv2 yes, produced in May 2023 |
I expected a 2023 model. Maybe different models have slightly different firmware. Please try the new code. |
@johnfanv2 sensors output:
Powermode output:
|
@johnfanv2 GUI doesn't start |
@klmshrk did you forget the ./ and running from the repo root folder? I tried running some of the tests and this is what I got. Temperatures and Fan Speeds
Fan speeds change when performing heavy work.
PowermodePower mode can be changed/read correctly in the keyboard, python GUI, or GNOME quick tile. Quiet Modesudo cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve empty file, cat hangs Balanced Modesudo cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve empty file, cat hangs Performance Modesudo cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C
sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/fancurve empty file, cat hangs Fn LockWorks well. Win KeyWorks well. TouchpadWorks well. Battery Conservation(Edited, got it to work by uninstalling completely a gnome extension that conflicted) Rapid ChargingHad to unplug and re-plug the charger for it to take effect, but with rapid charge on got energy-rate of 42.528W time-to-full of 39.6min; off got energy-rate of 29.158W and time-to-full of 53.1min. Works well. Display overdriveCheckbox toggles without any error in the log, but I personally couldn't notice the difference, maybe idk what to look for. Keyboard backlightSince fancurve file seems to be always empty, skipping this command dmesg: Off:
Low:
Bright:
Fan curveDid not perform the test as I can't read the fancurve Additionally, the GUI log contains some errors:
2023-08-17 00:12:17,651 - INFO: [ 1.070425] systemd[1]: Hostname set to . 2023-08-17 00:12:17,652 - INFO: Feature LockFanController with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/lockfancontroller and path /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/lockfancontroller ago 17 00:11:40 rmlegion systemd[1]: Starting power-profiles-daemon.service - Power Profiles daemon... 2023-08-17 00:12:17,669 - INFO: CommandFeature LenovoLegionLaptopSuppoerService: [] 2023-08-17 00:12:17,714 - INFO: Feature GPUOverclock reading 2023-08-17 00:12:17,722 - INFO: Feature CPUShorttermPowerLimit reading 2023-08-17 00:12:17,727 - INFO: Feature CPUPeakPowerLimit reading 2023-08-17 00:12:17,733 - INFO: Feature GPUPPABPowerLimit reading 2023-08-17 00:12:17,737 - INFO: Feature GPUTemperatureLimit reading 2023-08-17 00:12:17,745 - INFO: Feature BatteryConservation reading |
yes, sorry. output of launching GUI
|
Sorry for the bug. While I fixed other stuff I introduced a bug that makes it hang. Please get the newest code, recompile, and reload the module (or reinstall if you use dkms). If reloading does not work or hangs, please do a restart. |
@johnfanv2 sudo cat /sys/kernel/debug/legion/fancurve output
sensors
Quick Test: Change Current Fan Curve from Hardware with hwmon
GUI Creating and Setting your own Fan Curve with Script
Powermode
balanced mode
performance mode
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 - works Win Key - works Touchpad - works Battery Conservation - can't check (cause conservation enabled in windows) Rapid Charging - later Charge Output Always On - later (in a few days) Display Overdrive
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 off
medium
bright
|
Are you using "sudo"? I only saw dark theme used when I had forgotten sudo.
…On Thu, 17 Aug 2023, 20:39 Rita Mendes, ***@***.***> wrote:
Yeah, now it doesn't hang, but it still doesn't seem to be able to read
the fancurve.
[image: image]
<https://user-images.githubusercontent.com/57264260/261404584-29452f90-5c1e-449b-a4af-d576cca1355f.png>
GUI Error:
INFO:legion_linux.legion:Feature CPUOverclock reading
ERROR:legion_linux.legion:Feature CPUOverclock reading error [Errno 22] Invalid argument
ERROR:legion_linux.legion:[ 886.185900] legion_laptop fan table wmi buffer00000000500ccbd7: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185901] legion_laptop fan table wmi buffer00000000a6bd1d42: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185902] legion_laptop fan table wmi buffer000000002f4429b8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185903] legion_laptop fan table wmi buffer00000000d82cb37c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185903] legion_laptop fan table wmi buffer000000001759e9f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185904] legion_laptop fan table wmi buffer000000003b9c65a0: 00 00 00 00 00 00 00 00 ........
[ 886.185905] legion_laptop: Size of object: 48
[ 886.185908] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [FID0] at bit offset/length 0/8 exceeds size of target Buffer (0 bits) (20230331/dsopcode-198)
[ 886.185910] ACPI Error: Aborting method \_SB.GZFD.WMAB due to previous error (AE_AML_BUFFER_LIMIT) (20230331/psparse-529)
[ 886.185912] legion_laptop: ACPI evaluation error for: 92549549-4bde-4f06-ac04-ce8bf898dbaa:5
[ 886.185913] legion_laptop fan table wmi buffer00000000d82cb37c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185913] legion_laptop fan table wmi buffer000000001759e9f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185914] legion_laptop fan table wmi buffer000000003b9c65a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185915] legion_laptop fan table wmi buffer00000000b076a8aa: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185915] legion_laptop fan table wmi buffer0000000004ee4cf7: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 886.185916] legion_laptop fan table wmi buffer00000000573eb7aa: 00 00 00 00 00 00 00 00 ........
[ 1016.492592] legion_laptop: get_simple_wmi_attributewith raw value: 0
[ 1016.493100] legion_laptop: get_simple_wmi_attributewith raw value: 0
[ 1016.493238] legion_laptop: get_simple_wmi_attributewith raw value: 0
[ 1016.502075] legion_laptop: Unexpected ACPI result for 14afd777-106f-4c9b-b334-d388dc7809be:1: expected type 3 but got 1; expected length 16 but got 0;
Error occured [Errno 22] Invalid argument
Traceback (most recent call last):
File "/home/rm/Downloads/repos/LenovoLegionLinux/python/legion_linux/legion_linux/./legion_gui.py", line 205, in update_view_from_feature
feature_value = self.feature.get()
^^^^^^^^^^^^^^^^^^
File "/home/rm/Downloads/repos/LenovoLegionLinux/python/legion_linux/legion_linux/./../legion_linux/legion.py", line 297, in get
invalue = self._read_file_int(self.filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rm/Downloads/repos/LenovoLegionLinux/python/legion_linux/legion_linux/./../legion_linux/legion.py", line 231, in _read_file_int
return int(self._read_file_str(file_path))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rm/Downloads/repos/LenovoLegionLinux/python/legion_linux/legion_linux/./../legion_linux/legion.py", line 228, in _read_file_str
raise err
File "/home/rm/Downloads/repos/LenovoLegionLinux/python/legion_linux/legion_linux/./../legion_linux/legion.py", line 222, in _read_file_str
out = str(filepointer.read()).strip()
^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument
—
Reply to this email directly, view it on GitHub
<#93 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALOW2J6ENE3VZB627JI6Z3XVZQPJANCNFSM6AAAAAA3ICR6JI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@johnfanv2 If you need something, feel free to ask |
I'm planning to buy a legion slim 5 I7 13700HX rtx 4060. I'm only interested in having the 3 different thermals modes. What actually works? Do you have any recommendations for setting up linux? |
I have the same model but with rtx4070. Right now everything works as it should except for the fan curve control as discussed in this thread. |
Thank you for responding so quickly. So the the thermal modes only change the voltage? What's controlling the fans? Sorry if my question is dumb, this is my first gaming laptop. |
They do control the fans between the 3 presets. The issue with this module and gen 8 laptops is related to the fancurve, so you cannot edit how your fans behave beyond those three presets (quiet, balanced, performance), that is you can't adjust how fast they go for a given temperature range. |
I have legion slim 5i I7 13700HX rtx 4050, which is almost the same of the one in this thread. I am also going through the same problem of the fan curve. Is there any news/development to solve this problem? |
I have the Legion Slim 7 16IRH8, same everything as stated. The only thing not working is the fan modifications as discussed in this thread. |
Distribution: Ubuntu 23.04
Model name: Lenovo Legion Slim 5 16IRH8
CPU model: Intel Core i7-13700H
GPU model: NVIDIA RTX 4070
Keyboard backlight: single color
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
:fwts_wmi.log
acpi_re.zip
wmi_windows.txt
The text was updated successfully, but these errors were encountered: