Skip to content

Commit 8390f1f

Browse files
Pavel NikulinSasha Levin
authored andcommitted
platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
[ Upstream commit 77bdac7 ] ASUS firmware resets OOBE state during S4 suspend, so the keyboard blinks during resume from hibernation. This patch disables OOBE state after resume from hibernation. Signed-off-by: Pavel Nikulin <pavel@noa-labs.com> Link: https://lore.kernel.org/r/20250418140706.1691-1-pavel@noa-labs.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0eadd84 commit 8390f1f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/platform/x86/asus-wmi.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ struct asus_wmi {
304304

305305
u32 kbd_rgb_dev;
306306
bool kbd_rgb_state_available;
307+
bool oobe_state_available;
307308

308309
u8 throttle_thermal_policy_mode;
309310
u32 throttle_thermal_policy_dev;
@@ -1826,7 +1827,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
18261827
goto error;
18271828
}
18281829

1829-
if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) {
1830+
if (asus->oobe_state_available) {
18301831
/*
18311832
* Disable OOBE state, so that e.g. the keyboard backlight
18321833
* works.
@@ -4723,6 +4724,7 @@ static int asus_wmi_add(struct platform_device *pdev)
47234724
asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
47244725
asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
47254726
asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
4727+
asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
47264728
asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
47274729
&& dmi_check_system(asus_ally_mcu_quirk);
47284730

@@ -4971,6 +4973,13 @@ static int asus_hotk_restore(struct device *device)
49714973
}
49724974
if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
49734975
kbd_led_update(asus);
4976+
if (asus->oobe_state_available) {
4977+
/*
4978+
* Disable OOBE state, so that e.g. the keyboard backlight
4979+
* works.
4980+
*/
4981+
asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
4982+
}
49744983

49754984
if (asus_wmi_has_fnlock_key(asus))
49764985
asus_wmi_fnlock_update(asus);

0 commit comments

Comments
 (0)