Skip to content

Add support for Legion Pro 7 16IAX10H (Q7CN, Arrow Lake 2025)#407

Open
nuclearcat wants to merge 10 commits intojohnfanv2:mainfrom
nuclearcat:add-legion-pro-7-16iax10h-q7cn
Open

Add support for Legion Pro 7 16IAX10H (Q7CN, Arrow Lake 2025)#407
nuclearcat wants to merge 10 commits intojohnfanv2:mainfrom
nuclearcat:add-legion-pro-7-16iax10h-q7cn

Conversation

@nuclearcat
Copy link
Copy Markdown

I recently bought a Legion Pro 7 16IAX10H (83F5, Intel Arrow Lake, BIOS Q7CN) and was impressed to discover this project. After some struggle getting the driver to load on my laptop (the 2025 firmware is quite different from older
models), I managed to get most core features working.

The main challenge is that Q7CN firmware routes nearly everything through the WMAE (OtherMethod/GetFeatureValue/SetFeatureValue) WMI interface, rather than the dedicated per-feature WMI GUIDs (CPU method, GPU method, fan method) or direct EC register access used by older models. Several generic improvements were needed to support this, which should also benefit other newer models that follow the same pattern.

What this PR does:

  • Adds WMAE wmi_other_method_set_value() — the write counterpart that was missing
  • Adds ACCESS_METHOD_WMI3 dispatch for fan fullspeed (older models use WMAB, Q7CN uses WMAE 0x04020000)
  • Fixes pwm1_mode hwmon to use the access method dispatch instead of hardcoded EC reads (was broken for any non-EC model)
  • Adds WMAE fallback to CPU/GPU power limit sysfs attributes — tries the dedicated WMI GUID first, falls back to WMAE on failure (backward compatible)
  • Adds no_ylogo_light/no_ioport_light model config flags for models where these LEDs aren't WMI-controllable
  • Adds model_q7cn config and DMI match entry
  • Disables WMI keyboard backlight registration (keyboard is USB HID: ITE 048d:c193 "Lenovo Lighting", i will look into that later)

What doesn't work / uncertain

  • Fan curves read as all zeros — the WMI3 fan curve read path may need a different approach for this firmware
  • Fan fullspeed — the FNST toggle works (reads back correctly), but I'm not entirely sure it forces unconditional max RPM vs just switching to a more aggressive curve. The fans don't audibly ramp to maximum at idle when enabled, though
    that could be normal EC behavior at low temperatures, i didnt test that well yet.
  • CPU/GPU power limit writes — reads work via WMAE fallback, but writes may need the laptop to be in custom power mode (ODV1=0x03) per the DSDT logic. Needs more testing under load
  • Keyboard backlight — controlled by USB HID (ITE 048d:c193), needs a separate driver?
  • Y-logo / IO-port LEDs — seems not controllable via WMAF on this firmware. The proper control mechanism hasn't been identified yet

Also, I only have this one laptop to test on, so I cannot verify that these changes don't break older Legion models. The generic improvements (WMAE fallback, pwm1_mode fix) are designed to be backward compatible — they try the existing path first and only fall back to WMAE on failure. But please take this with a grain of salt and test on other hardware if possible.

Add wmi_other_method_set_value() as the write counterpart to the
existing wmi_other_method_get_value(). This enables setting hardware
parameters through the WMAE (SetFeatureValue, method ID 18) interface
used by newer Legion firmware.

Add OtherMethodFeature_FAN_FULLSPEED (0x04020000) and
OtherMethodFeature_FAN_SPEED_3 (0x04030004) feature IDs for fan
control on models that route fan management through WMAE rather than
the dedicated WMAB fan method GUID.

These feature IDs were extracted from the DSDT by analyzing the WMAE
method dispatch table (GZFD.WMAE). Sub-ID 0x04020000 maps to the EC
FNST register (F9FT offset 0x8B bit 0) controlling max fan mode.
Sub-ID 0x04030004 maps to EC field FASF (ERAX offset 0x03), returning
the third fan speed as RPM * 100. The 0x040300xx pattern follows the
existing FAN_SPEED_1 (0x04030001) and FAN_SPEED_2 (0x04030002) where
the last byte is the fan ID.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add ACCESS_METHOD_WMI3 case to read_fanfullspeed/write_fanfullspeed
dispatch functions. Newer firmware (e.g. Q7CN/Arrow Lake) routes fan
fullspeed control through WMAE GetFeatureValue/SetFeatureValue with
feature ID 0x04020000, rather than the dedicated WMAB fan method GUID.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
pwm1_mode_show/store were hardcoded to use ec_read/write_fanfullspeed,
bypassing the access method dispatch in read/write_fanfullspeed. This
caused errors on models where fan fullspeed is controlled via WMI
rather than direct EC register access (e.g. the EC port read returns
an unexpected value of 0x28 instead of 0x00/0x40).

Use read_fanfullspeed/write_fanfullspeed which properly dispatches
based on the model's configured access_method_fanfullspeed.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
…speed

On newer firmware (e.g. Arrow Lake Q7CN), the dedicated CPU/GPU WMI
GUIDs (14afd777.../da7547f1...) are data blocks rather than methods,
so wmi_evaluate_method fails. Add WMAE OtherMethod fallback to
power limit and fan_maxspeed sysfs attributes.

Each attribute first tries the existing dedicated WMI method, and on
failure falls back to WMAE Get/SetFeatureValue with the corresponding
OtherMethodFeature ID. This preserves backward compatibility with
older models while enabling power limit read/write on newer ones.

Affected sysfs attributes:
  - cpu_shortterm_powerlimit (0x01010000)
  - cpu_longterm_powerlimit (0x01020000)
  - cpu_cross_loading_powerlimit (0x01060000)
  - gpu_ppab_powerlimit (0x02010000)
  - gpu_ctgp_powerlimit (0x02020000)
  - fan_maxspeed (0x04020000)

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add no_ylogo_light and no_ioport_light flags to model_config. When
set, the driver skips registering the Y-logo and IO-port LED classdev
entries that would otherwise appear non-functional in sysfs.

Some newer firmware (e.g. Arrow Lake) does not expose Y-logo or
IO-port light control through the WMAF WMI method. The proper control
mechanism for these LEDs on this firmware revision has not yet been
identified, so disable registration to avoid misleading sysfs entries
that accept writes but have no hardware effect.

Defaults to false (LEDs registered) via C zero-initialization, so
existing model configs are unaffected.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add model_config and DMI match for the Lenovo Legion Pro 7 16IAX10H
(product ID 83F5, BIOS prefix Q7CN), an Arrow Lake 2025 model.

Hardware details (from DSDT analysis):
  - EC chip ID: 0x5508
  - EC RAM base: 0xFE500400 (ERAX region)
  - All access via WMI3 (WMAE OtherMethod interface)
  - Fan fullspeed via WMAE 0x04020000 (not WMAB)
  - Keyboard backlight via USB HID (ITE 048d:c193), not WMI
  - No Y-logo or IO-port LED control in firmware
  - Custom power mode supported

Tested: module loads, temperatures (CPU/GPU/IC), fan speeds (2 fans),
power mode switching (performance/quiet), fan fullspeed toggle,
CPU PL1/PL2 and GPU PPAB/cTGP readout, platform profile,
overdrive, rapidcharge, winkey, touchpad, gsync all working.
Keyboard backlight is USB HID controlled, not exposed by this driver.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Remove calls to a hardcoded venv path for legion_cli that doesn't
exist on most systems. The sysfs writes to fan_fullspeed, fan_maxspeed,
and powermode already handle the fan control directly.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
The Legion Pro 7 16IAX10H (Q7CN) keyboard backlight is controlled
by a USB HID device (ITE Tech 048d:c193 "Lenovo Lighting"), not
through the WMAF WMI method. The WMAF LECR(0xDA, ...) calls are
accepted by firmware but have no effect on the physical backlight.

Set access_method_keyboard to ACCESS_METHOD_NO_ACCESS for model_q7cn
to avoid registering a non-functional platform::kbd_backlight LED
that misleadingly accepts writes. A dedicated USB HID driver would
be needed to control the RGB keyboard backlight on this model.

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add the Lenovo Legion Pro 7 16IAX10H (Arrow Lake 2025, BIOS Q7CN) to
the confirmed compatible models list with tested feature details.
Update the year range from "2020 to 2023" to "2020 to 2025".

Part of a series adding support for the Lenovo Legion Pro 7 16IAX10H (83F5, BIOS Q7CN), an Intel Arrow Lake (2025) model with pure WMI firmware interface.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
ChaoticSi1ence pushed a commit to ChaoticSi1ence/legion-pro-7-16iax10h-linux that referenced this pull request Mar 16, 2026
Integrate three useful changes from upstream PR johnfanv2#407:

- Add WMAE OtherMethod fallback for 5 power limit attributes
  (cpu_shortterm, cpu_longterm, cpu_cross_loading, gpu_ppab, gpu_ctgp)
  that fail via dedicated CPU/GPU WMI on IT5508 EC models (Q7CN/SMCN).
  Un-hide these from it5508_broken_attrs now that they work.

- Skip ylogo/ioport LED registration on models that lack these lights
  (no_ylogo_light/no_ioport_light flags in model_config).

- Demote 6 WMI/ACPI error messages from pr_info to pr_debug to reduce
  dmesg noise, especially from expected probe failures in the fallback
  path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joppino
Copy link
Copy Markdown

joppino commented Mar 27, 2026

If you set custom mode, choose a preset and then try to write a profile to WMI, the laptop shuts down. I am booting with secure boot

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

Successfully merging this pull request may close these issues.

2 participants