Re: [PATCH] platform/x86: lenovo-ymc: Only bind on machines with a convertible DMI chassis-type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 12, 2023 at 7:48 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> The lenovo-ymc driver is causing the keyboard + touchpad to stop working
> on some regular laptop models such as the Lenovo ThinkBook 13s G2 ITL 20V9.
>
> The problem is that there are YMC WMI GUID methods in the ACPI tables
> of these laptops, despite them not being Yogas and lenovo-ymc loading
> causes libinput to see a SW_TABLET_MODE switch with state 1.
>
> This in turn causes libinput to ignore events from the builtin keyboard
> and touchpad, since it filters those out for a Yoga in tablet mode.
>
> Similar issues with false-positive SW_TABLET_MODE=1 reporting have
> been seen with the intel-hid driver.
>
> Copy the intel-hid driver approach to fix this and only bind to the WMI
> device on machines where the DMI chassis-type indicates the machine
> is a convertible.
>
> Add a 'force' module parameter to allow overriding the chassis-type check
> so that users can easily test if the YMC interface works on models which
> report an unexpected chassis-type.
>
> Fixes: e82882cdd241 ("platform/x86: Add driver for Yoga Tablet Mode switch")
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2229373
> Cc: Gergo Koteles <soyer@xxxxxx>
> Cc: Andrew Kallmeyer <kallmeyeras@xxxxxxxxx>
> Cc: André Apitzsch <git@xxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Too bad that this caused problems for some people. Thank you for
getting it fixed Hans!

While I had trouble applying this patch as is (maybe the code has
changed a bit since my patch), I was able to manually add these lines
and test this fix on my laptop (Yoga 7 14AIL7). The new device was
found and everything worked as expected.

Tested-by: Andrew Kallmeyer <kallmeyeras@xxxxxxxxx>

> Note: The chassis-type can be checked by doing:
> cat /sys/class/dmi/id/chassis_type
> if this reports 31 or 32 then this patch should not have any impact
> on your machine.

My laptop (Yoga 7 14AIL7) has chassis_type 31, just to add more info.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux