Message ID | 20240909223503.1445779-1-bas@basnieuwenhuizen.nl (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | platform/x86: asus-wmi: Disable OOBE experience on Zenbook S 16 | expand |
On Tue, 10 Sep 2024, at 10:35 AM, Bas Nieuwenhuizen wrote: > The OOBE experience fades the keyboard backlight in & out continuously, > and make the backlight uncontrollable using its device. > > Workaround taken from > https://wiki.archlinux.org/index.php?title=ASUS_Zenbook_UM5606&diff=next&oldid=815547 > > Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> > --- > drivers/platform/x86/asus-wmi.c | 10 ++++++++++ > include/linux/platform_data/x86/asus-wmi.h | 1 + > 2 files changed, 11 insertions(+) > > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c > index cc735931f97b..3b333d6076ac 100644 > --- a/drivers/platform/x86/asus-wmi.c > +++ b/drivers/platform/x86/asus-wmi.c > @@ -1779,6 +1779,16 @@ static int asus_wmi_led_init(struct asus_wmi *asus) > goto error; > } > > + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) { > + /* > + * Disable OOBE state, so that e.g. the keyboard backlight > + * works. > + */ > + rv = asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL); > + if (rv) > + goto error; > + } > + > error: > if (rv) > asus_wmi_led_exit(asus); > diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h > index 0aeeae1c1943..ae9bf7479e7b 100644 > --- a/include/linux/platform_data/x86/asus-wmi.h > +++ b/include/linux/platform_data/x86/asus-wmi.h > @@ -62,6 +62,7 @@ > #define ASUS_WMI_DEVID_KBD_BACKLIGHT 0x00050021 > #define ASUS_WMI_DEVID_LIGHT_SENSOR 0x00050022 /* ?? */ > #define ASUS_WMI_DEVID_LIGHTBAR 0x00050025 > +#define ASUS_WMI_DEVID_OOBE 0x0005002F > /* This can only be used to disable the screen, not re-enable */ > #define ASUS_WMI_DEVID_SCREENPAD_POWER 0x00050031 > /* Writing a brightness re-enables the screen if disabled */ > -- > 2.45.2 > > Looks good. Quite an important fix, thanks for taking care of it. Reviewed-by: Luke D. Jones <luke@ljones.dev>
On Tue, 10 Sep 2024 00:35:03 +0200, Bas Nieuwenhuizen wrote: > The OOBE experience fades the keyboard backlight in & out continuously, > and make the backlight uncontrollable using its device. > > Workaround taken from > https://wiki.archlinux.org/index.php?title=ASUS_Zenbook_UM5606&diff=next&oldid=815547 > > > [...] Thank you for your contribution, it has been applied to my local review-ilpo branch. Note it will show up in the public platform-drivers-x86/review-ilpo branch only once I've pushed my local branch there, which might take a while. The list of commits applied: [1/1] platform/x86: asus-wmi: Disable OOBE experience on Zenbook S 16 commit: d6de45e3c6f3713d3825d3e2860c11d24e0f941f -- i.
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index cc735931f97b..3b333d6076ac 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -1779,6 +1779,16 @@ static int asus_wmi_led_init(struct asus_wmi *asus) goto error; } + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) { + /* + * Disable OOBE state, so that e.g. the keyboard backlight + * works. + */ + rv = asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL); + if (rv) + goto error; + } + error: if (rv) asus_wmi_led_exit(asus); diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 0aeeae1c1943..ae9bf7479e7b 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -62,6 +62,7 @@ #define ASUS_WMI_DEVID_KBD_BACKLIGHT 0x00050021 #define ASUS_WMI_DEVID_LIGHT_SENSOR 0x00050022 /* ?? */ #define ASUS_WMI_DEVID_LIGHTBAR 0x00050025 +#define ASUS_WMI_DEVID_OOBE 0x0005002F /* This can only be used to disable the screen, not re-enable */ #define ASUS_WMI_DEVID_SCREENPAD_POWER 0x00050031 /* Writing a brightness re-enables the screen if disabled */
The OOBE experience fades the keyboard backlight in & out continuously, and make the backlight uncontrollable using its device. Workaround taken from https://wiki.archlinux.org/index.php?title=ASUS_Zenbook_UM5606&diff=next&oldid=815547 Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> --- drivers/platform/x86/asus-wmi.c | 10 ++++++++++ include/linux/platform_data/x86/asus-wmi.h | 1 + 2 files changed, 11 insertions(+)