-
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
Add Support: 2022 Lenovo Yoga 7 - 82UF - 16IAH7 (BIOS J1CN38WW) #87
Comments
Interestingly it fails in the step |
Also check if there is another module that provides platform profile support, e.g. get the output of sudo dmesg | grep platform
sudo dmesg | grep profile |
Extremely quick response - thank you very much. Build Log (against commit 9d91706)$ cd /var/data/src/LenovoLegionLinux/
$ git pull
remote: Enumerating objects: 62, done.
remote: Counting objects: 100% (62/62), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 54 (delta 39), reused 40 (delta 25), pack-reused 0
Unpacking objects: 100% (54/54), 5.36 KiB | 152.00 KiB/s, done.
From https://github.com/johnfanv2/LenovoLegionLinux
4f8b030..9d91706 main -> origin/main
Updating 4f8b030..9d91706
Fast-forward
kernel_module/legion-laptop.c | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
python/legion_linux/legion_linux/legion.py | 58 +++++++++++++++++++++++++++++++++++++--------------------
python/legion_linux/legion_linux/legion_gui.py | 69 +++++++++++++++++++++++++++++++++++++-------------------------------
3 files changed, 227 insertions(+), 82 deletions(-)
$ cd kernel_module/
$ make clean
make -C /lib/modules/6.4.4-0.rc1.250.vanilla.fc38.x86_64/build M=/var/data/src/LenovoLegionLinux/kernel_module clean
make[1]: Entering directory '/usr/src/kernels/6.4.4-0.rc1.250.vanilla.fc38.x86_64'
CLEAN /var/data/src/LenovoLegionLinux/kernel_module/Module.symvers
make[1]: Leaving directory '/usr/src/kernels/6.4.4-0.rc1.250.vanilla.fc38.x86_64'
$ make
make -C /lib/modules/6.4.4-0.rc1.250.vanilla.fc38.x86_64/build M=/var/data/src/LenovoLegionLinux/kernel_module modules
make[1]: Entering directory '/usr/src/kernels/6.4.4-0.rc1.250.vanilla.fc38.x86_64'
CC [M] /var/data/src/LenovoLegionLinux/kernel_module/legion-laptop.o
MODPOST /var/data/src/LenovoLegionLinux/kernel_module/Module.symvers
CC [M] /var/data/src/LenovoLegionLinux/kernel_module/legion-laptop.mod.o
LD [M] /var/data/src/LenovoLegionLinux/kernel_module/legion-laptop.ko
BTF [M] /var/data/src/LenovoLegionLinux/kernel_module/legion-laptop.ko
Skipping BTF generation for /var/data/src/LenovoLegionLinux/kernel_module/legion-laptop.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/kernels/6.4.4-0.rc1.250.vanilla.fc38.x86_64'
$ sudo make forcereloadmodule
rmmod legion-laptop.ko || true
insmod legion-laptop.ko force=1
dmesg --ctime
(bunch of prior info)
[Mon Jul 17 17:41:35 2023] legion_laptop: legion_laptop exit
[Mon Jul 17 17:41:35 2023] legion_laptop: legion_laptop starts loading
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: legion_laptop platform driver probing
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82UF; DMI_BIOS_VERSION:J1CN38WW
[Mon Jul 17 17:41:35 2023] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 82UF; DMI_BIOS_VERSION:J1CN38WW
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 1
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: legion_laptop is forced to load.
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: legion_laptop is forced to load and would otherwise be not loaded
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: Using configuration for system: GKCN
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: ACPI CFG: 2081284372
[Mon Jul 17 17:41:35 2023] legion_laptop: Creating RAM access to embedded controller
[Mon Jul 17 17:41:35 2023] legion_laptop: Succeffuly mapped embedded controller: 0xfe00d400 (in RAM)/0x0 (in EC) to virtual 0x0000000043cff4c9
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: Read embedded controller ID 0x8227
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: Creating debugfs inteface
[Mon Jul 17 17:41:35 2023] legion_laptop: Creating sysfs inteface
[Mon Jul 17 17:41:35 2023] legion_laptop: Creating hwmon interface
[Mon Jul 17 17:41:35 2023] legion_laptop: Creating platform profile support
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: Creating platform profile failed: -17
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion hwon
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion hwon done
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion sysfs
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion sysfs done
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion dubugfs
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion dubugfs done
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion ecram
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion ecram done
[Mon Jul 17 17:41:35 2023] legion_laptop: Unmapping embedded controller memory at 0xfe00d400 (in RAM)/0x0 (in EC) at virtual 0x0000000043cff4c9
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion shared
[Mon Jul 17 17:41:35 2023] legion_laptop: Unloading legion shared done
[Mon Jul 17 17:41:35 2023] legion PNP0C09:00: legion_laptop not loaded for this device
[Mon Jul 17 17:41:35 2023] legion: probe of PNP0C09:00 failed with error -17
bash -c "./issue-warning.sh"
If you have a 2022 or 2023 model, please help testing the new features 'here'
If you have a light in the lid (Y-logo) or at the IO-ports (all Legion 7), please help testing controlling it 'here'
$ Output of
|
The above-mentioned failures continue to occur with the latest commit, 2e47eaf. Can you please suggest any troubleshooting ideas or tricks that might reveal what is going on here? |
We have to find out why there is already a platform profile support loaded. In the meantime, get the newest code and load it with sudo make reloadmodule_disableplatformprofile or set the kernel parameter legion_laptop.enable_platformprofile=0. This skips loading the platform profile but loads all other features. So you can do everything except reading and writing the power mode from software. What is the output of ? cat /sys/firmware/acpi/platform_profile_choices
cat /sys/firmware/acpi/platform_profile Can you find out by what module or kernel feature |
Grabbed commit 2412105 and rebuilt against it. Found that doing So I hacked the makefile to include a new target Output of
|
Could you give the output of |
Please see below the output of After unloading the module with Output of
|
Noticed the release of commit caf8ae9, containing While not exactly my modem (my bios is Output of
|
Yes, you should now be able to load the module without forcing it but still with disabling platform profile, i.e. with I guess that the best solution would be to manage powermode/platform_profile with legion_laptop and disable it ideapad_laptop. You can maybe try to disable it by setting the kernel parameter allow_v4_dytc in the ideapad_laptop: https://github.com/torvalds/linux/blob/91aa6c412d7f85e48aead7b00a7d9e91f5cf5863/drivers/platform/x86/ideapad-laptop.c#L135 If this does not work, I could export the power mode as another sysfs attribute that is used be the GUI. If you just use ideapad_laptop without legion_laptop, does the platform_profile file changes if you change it with Fn+Q? |
I tried to troubleshoot the "Unknown symbol in module" error. I made all functions static. Please try to get this error with the new code and provide the tail output of |
Thanks for the continued support - very much appreciated. I updated the build environment slightly to: Kernel: Linux 6.4.11-250.vanilla.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC No longer seeing With
|
Please first load with sudo cat /sys/firmware/acpi/platform_profile
sudo cat /sys/kernel/debug/legion/fancurve
sudo dmesg | tail -n 400 Then, please load with Please first load with |
Please also provide the output of sudo cat /sys/kernel/debug/legion/ecmemory | hexdump -C
sudo cat /sys/kernel/debug/legion/ecmemoryram | hexdump -C in each powermode (changed with Fn+Q). |
Not sure if this is expected behaviour or not, so I'll describe it before showing several lengthy dmesg spews: Doing [Fri Aug 18 00:07:23 2023] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PC00.LPCB.EC0._Q44.WM00], AE_NOT_FOUND (20230331/psargs-330)
[Fri Aug 18 00:07:23 2023] ACPI Error: Aborting method \_SB.PC00.LPCB.EC0._Q44 due to previous error (AE_NOT_FOUND) (20230331/psparse-529) Unloading After rebooting the laptop, if I first unload $ sudo `make forcereloadmodule_disableplatformprofile`
rmmod legion-laptop.ko || true
rmmod: ERROR: Module legion_laptop is not currently loaded
insmod legion-laptop.ko enable_platformprofile=0 force=1
insmod: ERROR: could not insert module legion-laptop.ko: Unknown symbol in module
make: *** [Makefile:67: forcereloadmodule_disableplatformprofile] Error 1 This also happens even if I first clean/remake the Output after
|
The driver was intended for Legion laptops and not Yoga laptops. Your ACPI dissassembly (zip files) shows that the ACPI firmware and the WMI interface is different. However, the output of I am confident we can make it work after solving the problems with ideapad_laptop. I have think to about it a bit. In the meantime, you try finding the reason for
run |
Speaking purely for myself, the only thing I really need is configurable fan-control functionality. Getting it to a point where it takes effect automatically and reliably at boot-time is icing on the cake. The rest of the driver's functionality are quite nice-to-haves, but not critical. The only Fn keys I really need are the volume/mute controls, I don't really care about backlight controls, and I don't frequently need to toggle power-modes - this laptop isn't used for gaming. Mainly, I want to ensure I'm not blowing out internal components with things like Thanks very much for your efforts thus far in getting the driver to load and manage the fans! |
Model Summary
82UF Yoga 7 16IAH7 (2022)
J1CN38WW
12th Gen Intel i7-12700H (20) @ 4.600GHz
GPU 0: Intel Alder Lake-P integrated Graphics GPU 1: Intel DG2 Arc A370M
Single Colour (white) with off/low/high brightness
Fedora Linux 38 (Thirty Eight) x86_64
6.4.3-0.rc2.250.vanilla.fc38.x86_64
Build Log with Errors
Any guidance on how to get the
sudo make forcereloadmodule
to complete successfully would be greatly appreciated.Note that the build was done against a 6.4.3 RC2 Kernel. However similiar build issues occurred against a Fedora stock 6.3.12 kernel.
Output of
sudo dmidecode -t system
Output of
sudo dmidecode -t bios
:Output of
sudo cat /sys/kernel/debug/legion/fancurve
:Uploaded Files
acpi_dsl.zip
fwts_wmi.zip
windows_wmi.zip
The text was updated successfully, but these errors were encountered: