@@ -304,6 +304,7 @@ struct asus_wmi {
304
304
305
305
u32 kbd_rgb_dev ;
306
306
bool kbd_rgb_state_available ;
307
+ bool oobe_state_available ;
307
308
308
309
u8 throttle_thermal_policy_mode ;
309
310
u32 throttle_thermal_policy_dev ;
@@ -1826,7 +1827,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
1826
1827
goto error ;
1827
1828
}
1828
1829
1829
- if (asus_wmi_dev_is_present ( asus , ASUS_WMI_DEVID_OOBE ) ) {
1830
+ if (asus -> oobe_state_available ) {
1830
1831
/*
1831
1832
* Disable OOBE state, so that e.g. the keyboard backlight
1832
1833
* works.
@@ -4741,6 +4742,7 @@ static int asus_wmi_add(struct platform_device *pdev)
4741
4742
asus -> egpu_enable_available = asus_wmi_dev_is_present (asus , ASUS_WMI_DEVID_EGPU );
4742
4743
asus -> dgpu_disable_available = asus_wmi_dev_is_present (asus , ASUS_WMI_DEVID_DGPU );
4743
4744
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 );
4744
4746
asus -> ally_mcu_usb_switch = acpi_has_method (NULL , ASUS_USB0_PWR_EC0_CSEE )
4745
4747
&& dmi_check_system (asus_ally_mcu_quirk );
4746
4748
@@ -4994,6 +4996,13 @@ static int asus_hotk_restore(struct device *device)
4994
4996
}
4995
4997
if (!IS_ERR_OR_NULL (asus -> kbd_led .dev ))
4996
4998
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
+ }
4997
5006
4998
5007
if (asus_wmi_has_fnlock_key (asus ))
4999
5008
asus_wmi_fnlock_update (asus );
0 commit comments