Skip to content

Commit 0c719de

Browse files
Pavel Nikulinjfvogel
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> (cherry picked from commit 2418bf5d383fa52b54560f3a91a0a8c2ab0d848f) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent 67d6096 commit 0c719de

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.
@@ -4741,6 +4742,7 @@ static int asus_wmi_add(struct platform_device *pdev)
47414742
asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
47424743
asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
47434744
asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
4745+
asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
47444746
asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
47454747
&& dmi_check_system(asus_ally_mcu_quirk);
47464748

@@ -4994,6 +4996,13 @@ static int asus_hotk_restore(struct device *device)
49944996
}
49954997
if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
49964998
kbd_led_update(asus);
4999+
if (asus->oobe_state_available) {
5000+
/*
5001+
* Disable OOBE state, so that e.g. the keyboard backlight
5002+
* works.
5003+
*/
5004+
asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
5005+
}
49975006

49985007
if (asus_wmi_has_fnlock_key(asus))
49995008
asus_wmi_fnlock_update(asus);

0 commit comments

Comments
 (0)