xref: /linux/Documentation/wmi/devices/lenovo-wmi-gamezone.rst (revision 9669b2499ea377764f8320dd562dd6cd4ea80a5d)
1*57139e12SDerek J. Clark.. SPDX-License-Identifier: GPL-2.0-or-later
2*57139e12SDerek J. Clark
3*57139e12SDerek J. Clark==========================================================
4*57139e12SDerek J. ClarkLenovo WMI Interface Gamezone Driver (lenovo-wmi-gamezone)
5*57139e12SDerek J. Clark==========================================================
6*57139e12SDerek J. Clark
7*57139e12SDerek J. ClarkIntroduction
8*57139e12SDerek J. Clark============
9*57139e12SDerek J. ClarkThe Lenovo WMI gamezone interface is broken up into multiple GUIDs,
10*57139e12SDerek J. ClarkThe primary "Gamezone" GUID provides advanced features such as fan
11*57139e12SDerek J. Clarkprofiles and overclocking. It is paired with multiple event GUIDs
12*57139e12SDerek J. Clarkand data block GUIDs that provide context for the various methods.
13*57139e12SDerek J. Clark
14*57139e12SDerek J. ClarkGamezone Data
15*57139e12SDerek J. Clark-------------
16*57139e12SDerek J. Clark
17*57139e12SDerek J. ClarkWMI GUID ``887B54E3-DDDC-4B2C-8B88-68A26A8835D0``
18*57139e12SDerek J. Clark
19*57139e12SDerek J. ClarkThe Gamezone Data WMI interface provides platform-profile and fan curve
20*57139e12SDerek J. Clarksettings for devices that fall under the "Gaming Series" of Lenovo devices.
21*57139e12SDerek J. ClarkIt uses a notifier chain to inform other Lenovo WMI interface drivers of the
22*57139e12SDerek J. Clarkcurrent platform profile when it changes.
23*57139e12SDerek J. Clark
24*57139e12SDerek J. ClarkThe following platform profiles are supported:
25*57139e12SDerek J. Clark - low-power
26*57139e12SDerek J. Clark - balanced
27*57139e12SDerek J. Clark - balanced-performance
28*57139e12SDerek J. Clark - performance
29*57139e12SDerek J. Clark - custom
30*57139e12SDerek J. Clark
31*57139e12SDerek J. ClarkBalanced-Performance
32*57139e12SDerek J. Clark~~~~~~~~~~~~~~~~~~~~
33*57139e12SDerek J. ClarkSome newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile
34*57139e12SDerek J. Clarkenabled in their BIOS. For these devices, the performance platform profile
35*57139e12SDerek J. Clarkcorresponds to the BIOS Extreme Mode, while the balanced-performance
36*57139e12SDerek J. Clarkplatform profile corresponds to the BIOS Performance mode. For legacy
37*57139e12SDerek J. Clarkdevices, the performance platform profile will correspond with the BIOS
38*57139e12SDerek J. ClarkPerformance mode.
39*57139e12SDerek J. Clark
40*57139e12SDerek J. ClarkFor some newer devices the "Extreme Mode" profile is incomplete in the BIOS
41*57139e12SDerek J. Clarkand setting it will cause undefined behavior. A BIOS bug quirk table is
42*57139e12SDerek J. Clarkprovided to ensure these devices cannot set "Extreme Mode" from the driver.
43*57139e12SDerek J. Clark
44*57139e12SDerek J. ClarkCustom Profile
45*57139e12SDerek J. Clark~~~~~~~~~~~~~~
46*57139e12SDerek J. ClarkThe custom profile represents a hardware mode on Lenovo devices that enables
47*57139e12SDerek J. Clarkuser modifications to Package Power Tracking (PPT) and fan curve settings.
48*57139e12SDerek J. ClarkWhen an attribute exposed by the Other Mode WMI interface is to be modified,
49*57139e12SDerek J. Clarkthe Gamezone driver must first be switched to the "custom" profile manually,
50*57139e12SDerek J. Clarkor the setting will have no effect. If another profile is set from the list
51*57139e12SDerek J. Clarkof supported profiles, the BIOS will override any user PPT settings when
52*57139e12SDerek J. Clarkswitching to that profile.
53*57139e12SDerek J. Clark
54*57139e12SDerek J. ClarkGamezone Thermal Mode Event
55*57139e12SDerek J. Clark---------------------------
56*57139e12SDerek J. Clark
57*57139e12SDerek J. ClarkWMI GUID ``D320289E-8FEA-41E0-86F9-911D83151B5F``
58*57139e12SDerek J. Clark
59*57139e12SDerek J. ClarkThe Gamezone Thermal Mode Event interface notifies the system when the platform
60*57139e12SDerek J. Clarkprofile has changed, either through the hardware event (Fn+Q for laptops or
61*57139e12SDerek J. ClarkLegion + Y for Go Series), or through the Gamezone WMI interface. This event is
62*57139e12SDerek J. Clarkimplemented in the Lenovo WMI Events driver (lenovo-wmi-events).
63*57139e12SDerek J. Clark
64*57139e12SDerek J. Clark
65*57139e12SDerek J. ClarkWMI interface description
66*57139e12SDerek J. Clark=========================
67*57139e12SDerek J. Clark
68*57139e12SDerek J. ClarkThe WMI interface description can be decoded from the embedded binary MOF (bmof)
69*57139e12SDerek J. Clarkdata using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
70*57139e12SDerek J. Clark
71*57139e12SDerek J. Clark::
72*57139e12SDerek J. Clark
73*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO_GAMEZONE_DATA class"), guid("{887B54E3-DDDC-4B2C-8B88-68A26A8835D0}")]
74*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_DATA {
75*57139e12SDerek J. Clark    [key, read] string InstanceName;
76*57139e12SDerek J. Clark    [read] boolean Active;
77*57139e12SDerek J. Clark
78*57139e12SDerek J. Clark    [WmiMethodId(4), Implemented, Description("Is SupportGpu OverClock")] void IsSupportGpuOC([out, Description("Is SupportGpu OverClock")] uint32 Data);
79*57139e12SDerek J. Clark    [WmiMethodId(11), Implemented, Description("Get AslCode Version")] void GetVersion ([out, Description("AslCode version")] UINT32 Data);
80*57139e12SDerek J. Clark    [WmiMethodId(12), Implemented, Description("Fan cooling capability")] void IsSupportFanCooling([out, Description("Fan cooling capability")] UINT32 Data);
81*57139e12SDerek J. Clark    [WmiMethodId(13), Implemented, Description("Set Fan cooling on/off")] void SetFanCooling ([in, Description("Set Fan cooling on/off")] UINT32 Data);
82*57139e12SDerek J. Clark    [WmiMethodId(14), Implemented, Description("cpu oc capability")] void IsSupportCpuOC ([out, Description("cpu oc capability")] UINT32 Data);
83*57139e12SDerek J. Clark    [WmiMethodId(15), Implemented, Description("bios has overclock capability")] void IsBIOSSupportOC ([out, Description("bios has overclock capability")] UINT32 Data);
84*57139e12SDerek J. Clark    [WmiMethodId(16), Implemented, Description("enable or disable overclock in bios")] void SetBIOSOC ([in, Description("enable or disable overclock in bios")] UINT32 Data);
85*57139e12SDerek J. Clark    [WmiMethodId(18), Implemented, Description("Get CPU temperature")] void GetCPUTemp ([out, Description("Get CPU temperature")] UINT32 Data);
86*57139e12SDerek J. Clark    [WmiMethodId(19), Implemented, Description("Get GPU temperature")] void GetGPUTemp ([out, Description("Get GPU temperature")] UINT32 Data);
87*57139e12SDerek J. Clark    [WmiMethodId(20), Implemented, Description("Get Fan cooling on/off status")] void GetFanCoolingStatus ([out, Description("Get Fan cooling on/off status")] UINT32 Data);
88*57139e12SDerek J. Clark    [WmiMethodId(21), Implemented, Description("EC support disable windows key capability")] void IsSupportDisableWinKey ([out, Description("EC support disable windows key capability")] UINT32 Data);
89*57139e12SDerek J. Clark    [WmiMethodId(22), Implemented, Description("Set windows key disable/enable")] void SetWinKeyStatus ([in, Description("Set windows key disable/enable")] UINT32 Data);
90*57139e12SDerek J. Clark    [WmiMethodId(23), Implemented, Description("Get windows key disable/enable status")] void GetWinKeyStatus ([out, Description("Get windows key disable/enable status")] UINT32 Data);
91*57139e12SDerek J. Clark    [WmiMethodId(24), Implemented, Description("EC support disable touchpad capability")] void IsSupportDisableTP ([out, Description("EC support disable touchpad capability")] UINT32 Data);
92*57139e12SDerek J. Clark    [WmiMethodId(25), Implemented, Description("Set touchpad disable/enable")] void SetTPStatus ([in, Description("Set touchpad disable/enable")] UINT32 Data);
93*57139e12SDerek J. Clark    [WmiMethodId(26), Implemented, Description("Get touchpad disable/enable status")] void GetTPStatus ([out, Description("Get touchpad disable/enable status")] UINT32 Data);
94*57139e12SDerek J. Clark    [WmiMethodId(30), Implemented, Description("Get Keyboard feature list")] void GetKeyboardfeaturelist ([out, Description("Get Keyboard feature list")] UINT32 Data);
95*57139e12SDerek J. Clark    [WmiMethodId(31), Implemented, Description("Get Memory OC Information")] void GetMemoryOCInfo ([out, Description("Get Memory OC Information")] UINT32 Data);
96*57139e12SDerek J. Clark    [WmiMethodId(32), Implemented, Description("Water Cooling feature capability")] void IsSupportWaterCooling ([out, Description("Water Cooling feature capability")] UINT32 Data);
97*57139e12SDerek J. Clark    [WmiMethodId(33), Implemented, Description("Set Water Cooling status")] void SetWaterCoolingStatus ([in, Description("Set Water Cooling status")] UINT32 Data);
98*57139e12SDerek J. Clark    [WmiMethodId(34), Implemented, Description("Get Water Cooling status")] void GetWaterCoolingStatus ([out, Description("Get Water Cooling status")] UINT32 Data);
99*57139e12SDerek J. Clark    [WmiMethodId(35), Implemented, Description("Lighting feature capability")] void IsSupportLightingFeature ([out, Description("Lighting feature capability")] UINT32 Data);
100*57139e12SDerek J. Clark    [WmiMethodId(36), Implemented, Description("Set keyboard light off or on to max")] void SetKeyboardLight ([in, Description("keyboard light off or on switch")] UINT32 Data);
101*57139e12SDerek J. Clark    [WmiMethodId(37), Implemented, Description("Get keyboard light on/off status")] void GetKeyboardLight ([out, Description("Get keyboard light on/off status")] UINT32 Data);
102*57139e12SDerek J. Clark    [WmiMethodId(38), Implemented, Description("Get Macrokey scan code")] void GetMacrokeyScancode ([in, Description("Macrokey index")] UINT32 idx, [out, Description("Scan code")] UINT32 scancode);
103*57139e12SDerek J. Clark    [WmiMethodId(39), Implemented, Description("Get Macrokey count")] void GetMacrokeyCount ([out, Description("Macrokey count")] UINT32 Data);
104*57139e12SDerek J. Clark    [WmiMethodId(40), Implemented, Description("Support G-Sync feature")] void IsSupportGSync ([out, Description("Support G-Sync feature")] UINT32 Data);
105*57139e12SDerek J. Clark    [WmiMethodId(41), Implemented, Description("Get G-Sync Status")] void GetGSyncStatus ([out, Description("Get G-Sync Status")] UINT32 Data);
106*57139e12SDerek J. Clark    [WmiMethodId(42), Implemented, Description("Set G-Sync Status")] void SetGSyncStatus ([in, Description("Set G-Sync Status")] UINT32 Data);
107*57139e12SDerek J. Clark    [WmiMethodId(43), Implemented, Description("Support Smart Fan feature")] void IsSupportSmartFan ([out, Description("Support Smart Fan feature")] UINT32 Data);
108*57139e12SDerek J. Clark    [WmiMethodId(44), Implemented, Description("Set Smart Fan Mode")] void SetSmartFanMode ([in, Description("Set Smart Fan Mode")] UINT32 Data);
109*57139e12SDerek J. Clark    [WmiMethodId(45), Implemented, Description("Get Smart Fan Mode")] void GetSmartFanMode ([out, Description("Get Smart Fan Mode")] UINT32 Data);
110*57139e12SDerek J. Clark    [WmiMethodId(46), Implemented, Description("Get Smart Fan Setting Mode")] void GetSmartFanSetting ([out, Description("Get Smart Setting Mode")] UINT32 Data);
111*57139e12SDerek J. Clark    [WmiMethodId(47), Implemented, Description("Get Power Charge Mode")] void GetPowerChargeMode ([out, Description("Get Power Charge Mode")] UINT32 Data);
112*57139e12SDerek J. Clark    [WmiMethodId(48), Implemented, Description("Get Gaming Product Info")] void GetProductInfo ([out, Description("Get Gaming Product Info")] UINT32 Data);
113*57139e12SDerek J. Clark    [WmiMethodId(49), Implemented, Description("Over Drive feature capability")] void IsSupportOD ([out, Description("Over Drive feature capability")] UINT32 Data);
114*57139e12SDerek J. Clark    [WmiMethodId(50), Implemented, Description("Get Over Drive status")] void GetODStatus ([out, Description("Get Over Drive status")] UINT32 Data);
115*57139e12SDerek J. Clark    [WmiMethodId(51), Implemented, Description("Set Over Drive status")] void SetODStatus ([in, Description("Set Over Drive status")] UINT32 Data);
116*57139e12SDerek J. Clark    [WmiMethodId(52), Implemented, Description("Set Light Control Owner")] void SetLightControlOwner ([in, Description("Set Light Control Owner")] UINT32 Data);
117*57139e12SDerek J. Clark    [WmiMethodId(53), Implemented, Description("Set DDS Control Owner")] void SetDDSControlOwner ([in, Description("Set DDS Control Owner")] UINT32 Data);
118*57139e12SDerek J. Clark    [WmiMethodId(54), Implemented, Description("Get the flag of restore OC value")] void IsRestoreOCValue ([in, Description("Clean this flag")] UINT32 idx, [out, Description("Restore oc value flag")] UINT32 Data);
119*57139e12SDerek J. Clark    [WmiMethodId(55), Implemented, Description("Get Real Thremal Mode")] void GetThermalMode ([out, Description("Real Thremal Mode")] UINT32 Data);
120*57139e12SDerek J. Clark    [WmiMethodId(56), Implemented, Description("Get the OC switch status in BIOS")] void GetBIOSOCMode ([out, Description("OC Mode")] UINT32 Data);
121*57139e12SDerek J. Clark    [WmiMethodId(59), Implemented, Description("Get hardware info support version")] void GetHardwareInfoSupportVersion ([out, Description("version")] UINT32 Data);
122*57139e12SDerek J. Clark    [WmiMethodId(60), Implemented, Description("Get Cpu core 0 max frequency")] void GetCpuFrequency ([out, Description("frequency")] UINT32 Data);
123*57139e12SDerek J. Clark    [WmiMethodId(62), Implemented, Description("Check the Adapter type fit for OC")] void IsACFitForOC ([out, Description("AC check result")] UINT32 Data);
124*57139e12SDerek J. Clark    [WmiMethodId(63), Implemented, Description("Is support IGPU mode")] void IsSupportIGPUMode ([out, Description("IGPU modes")] UINT32 Data);
125*57139e12SDerek J. Clark    [WmiMethodId(64), Implemented, Description("Get IGPU Mode Status")] void GetIGPUModeStatus([out, Description("IGPU Mode Status")] UINT32 Data);
126*57139e12SDerek J. Clark    [WmiMethodId(65), Implemented, Description("Set IGPU Mode")] void SetIGPUModeStatus([in, Description("IGPU Mode")] UINT32 mode, [out, Description("return code")] UINT32 Data);
127*57139e12SDerek J. Clark    [WmiMethodId(66), Implemented, Description("Notify DGPU Status")] void NotifyDGPUStatus([in, Description("DGPU status")] UINT32 status, [out, Description("return code")] UINT32 Data);
128*57139e12SDerek J. Clark    [WmiMethodId(67), Implemented, Description("Is changed Y log")] void IsChangedYLog([out, Description("Is changed Y Log")] UINT32 Data);
129*57139e12SDerek J. Clark    [WmiMethodId(68), Implemented, Description("Get DGPU Hardwawre ID")] void GetDGPUHWId([out, Description("Get DGPU Hardware ID")] string Data);
130*57139e12SDerek J. Clark  };
131*57139e12SDerek J. Clark
132*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Definition of CPU OC parameter list"), guid("{B7F3CA0A-ACDC-42D2-9217-77C6C628FBD2}")]
133*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_CPU_OC_DATA {
134*57139e12SDerek J. Clark    [key, read] string InstanceName;
135*57139e12SDerek J. Clark    [read] boolean Active;
136*57139e12SDerek J. Clark
137*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("OC tune id.")] uint32 Tuneid;
138*57139e12SDerek J. Clark    [WmiDataId(2), read, Description("Default value.")] uint32 DefaultValue;
139*57139e12SDerek J. Clark    [WmiDataId(3), read, Description("OC Value.")] uint32 OCValue;
140*57139e12SDerek J. Clark    [WmiDataId(4), read, Description("Min Value.")] uint32 MinValue;
141*57139e12SDerek J. Clark    [WmiDataId(5), read, Description("Max Value.")] uint32 MaxValue;
142*57139e12SDerek J. Clark    [WmiDataId(6), read, Description("Scale Value.")] uint32 ScaleValue;
143*57139e12SDerek J. Clark    [WmiDataId(7), read, Description("OC Order id.")] uint32 OCOrderid;
144*57139e12SDerek J. Clark    [WmiDataId(8), read, Description("NON-OC Order id.")] uint32 NOCOrderid;
145*57139e12SDerek J. Clark    [WmiDataId(9), read, Description("Delay time in ms.")] uint32 Interval;
146*57139e12SDerek J. Clark  };
147*57139e12SDerek J. Clark
148*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Definition of GPU OC parameter list"), guid("{887B54E2-DDDC-4B2C-8B88-68A26A8835D0}")]
149*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_GPU_OC_DATA {
150*57139e12SDerek J. Clark    [key, read] string InstanceName;
151*57139e12SDerek J. Clark    [read] boolean Active;
152*57139e12SDerek J. Clark
153*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("P-State ID.")] uint32 PStateID;
154*57139e12SDerek J. Clark    [WmiDataId(2), read, Description("CLOCK ID.")] uint32 ClockID;
155*57139e12SDerek J. Clark    [WmiDataId(3), read, Description("Default value.")] uint32 defaultvalue;
156*57139e12SDerek J. Clark    [WmiDataId(4), read, Description("OC Offset freqency.")] uint32 OCOffsetFreq;
157*57139e12SDerek J. Clark    [WmiDataId(5), read, Description("OC Min offset value.")] uint32 OCMinOffset;
158*57139e12SDerek J. Clark    [WmiDataId(6), read, Description("OC Max offset value.")] uint32 OCMaxOffset;
159*57139e12SDerek J. Clark    [WmiDataId(7), read, Description("OC Offset Scale.")] uint32 OCOffsetScale;
160*57139e12SDerek J. Clark    [WmiDataId(8), read, Description("OC Order id.")] uint32 OCOrderid;
161*57139e12SDerek J. Clark    [WmiDataId(9), read, Description("NON-OC Order id.")] uint32 NOCOrderid;
162*57139e12SDerek J. Clark  };
163*57139e12SDerek J. Clark
164*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Fancooling finish event"), guid("{BC72A435-E8C1-4275-B3E2-D8B8074ABA59}")]
165*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_FAN_COOLING_EVENT: WMIEvent {
166*57139e12SDerek J. Clark    [key, read] string InstanceName;
167*57139e12SDerek J. Clark    [read] boolean Active;
168*57139e12SDerek J. Clark
169*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("Fancooling clean finish event")] uint32 EventId;
170*57139e12SDerek J. Clark  };
171*57139e12SDerek J. Clark
172*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Smart Fan mode change event"), guid("{D320289E-8FEA-41E0-86F9-611D83151B5F}")]
173*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_SMART_FAN_MODE_EVENT: WMIEvent {
174*57139e12SDerek J. Clark    [key, read] string InstanceName;
175*57139e12SDerek J. Clark    [read] boolean Active;
176*57139e12SDerek J. Clark
177*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("Smart Fan Mode change event")] uint32 mode;
178*57139e12SDerek J. Clark    [WmiDataId(2), read, Description("version of FN+Q")] uint32 version;
179*57139e12SDerek J. Clark  };
180*57139e12SDerek J. Clark
181*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Smart Fan setting mode change event"), guid("{D320289E-8FEA-41E1-86F9-611D83151B5F}")]
182*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_SMART_FAN_SETTING_EVENT: WMIEvent {
183*57139e12SDerek J. Clark    [key, read] string InstanceName;
184*57139e12SDerek J. Clark    [read] boolean Active;
185*57139e12SDerek J. Clark
186*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("Smart Fan Setting mode change event")] uint32 mode;
187*57139e12SDerek J. Clark  };
188*57139e12SDerek J. Clark
189*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("POWER CHARGE MODE Change EVENT"), guid("{D320289E-8FEA-41E0-86F9-711D83151B5F}")]
190*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_POWER_CHARGE_MODE_EVENT: WMIEvent {
191*57139e12SDerek J. Clark    [key, read] string InstanceName;
192*57139e12SDerek J. Clark    [read] boolean Active;
193*57139e12SDerek J. Clark
194*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("POWER CHARGE MODE Change EVENT")] uint32 mode;
195*57139e12SDerek J. Clark  };
196*57139e12SDerek J. Clark
197*57139e12SDerek J. Clark  [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Thermal Mode Real Mode change event"), guid("{D320289E-8FEA-41E0-86F9-911D83151B5F}")]
198*57139e12SDerek J. Clark  class LENOVO_GAMEZONE_THERMAL_MODE_EVENT: WMIEvent {
199*57139e12SDerek J. Clark    [key, read] string InstanceName;
200*57139e12SDerek J. Clark    [read] boolean Active;
201*57139e12SDerek J. Clark
202*57139e12SDerek J. Clark    [WmiDataId(1), read, Description("Thermal Mode Real Mode")] uint32 mode;
203*57139e12SDerek J. Clark  };
204