Hi, On 3/29/24 3:32 PM, Gwendal Grignou wrote: > While qualifying ASUS VivoBook Flip 14 (TP401NAS) for ChromeOS Plex, > we notice it always boot in tablet mode, with the keyboard and touchpad > disabled. We have to rotate its lid over 180 degree and back to get into > clamshell mode, or put it into sleep and wake it up. > > Disassembling the ACPI table, the virtual button/switch ACPI device is > implemented as follow: > > Device (VGBI) > { > Name (_HID, EisaId ("INT33D6") /* Intel Virtual Buttons Device */) // _HID: Hardware ID > Name (VBDS, Zero) > Method (_STA, 0, Serialized) // _STA: Status > { > PB1E |= 0x20 > If ((OSYS >= 0x07DD)) > { > Return (0x0F) > } > > Return (Zero) > } > > Method (VBDL, 0, Serialized) > { > PB1E |= 0x20 > VBDS |= 0x40 > } > > Method (VGBS, 0, Serialized) > { > Return (VBDS) /* \_SB_.PCI0.SBRG.EC0_.VGBI.VBDS */ > } > > Method (UPBT, 2, Serialized) > { > Local0 = (One << Arg0) > If (Arg1) > { > VBDS |= Local0 > } > Else > { > VBDS &= ~Local0 > } > } > } > > Method UBPT is called when lid angle cross 180 degree boundary or when > the device is woken up. > > At boot, VBDS is set to 0 ("tablet mode") until UBPT or VBDL are called. > > VBDL used to be evaluated before VGBS by the intel-vbtn driver probe > routine, but since commit 26173179fae1 ("platform/x86: intel-vbtn: Eval VBDL after registering our notifier"), > call to VGBS is delayed until after the notifier is register. > > To bring back the expected behavior (device booting in clamshell > mode), make sure we evaluate VGBS after VBDL. > > While at it, use function acpi_has_method() when we only need to know if a > method exist, as commit 26173179fae1 does. > > Gwendal Grignou (2): > platform/x86: intel-vbtn: Use acpi_has_method to check for switch > platform/x86: intel-vbtn: Update tablet mode switch at end of probe Thanks, the entire series looks good to me: Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx> for the series. Ilpo I consider this series a bugfix so can you pick this up as a fix for the 6.9 cycle please ? Regards, Hans