Re: [PATCH v4 1/2] i8042: Add forcenorestore quirk to leave controller untouched even on s3

From: Werner Sembach
Date: Wed Jan 10 2024 - 08:52:22 EST



Am 09.01.24 um 22:48 schrieb Dmitry Torokhov:
Hi Werner,

On Thu, Jan 04, 2024 at 07:31:17PM +0100, Werner Sembach wrote:
On s3 resume the i8042 driver tries to restore the controller to a known
state by reinitializing things, however this can confuse the controller
with different effects. Mostly occasionally unresponsive keyboards after
resume.

These issues do not rise on s0ix resume as here the controller is assumed
to preserved its state from before suspend.

This patch adds a quirk for devices where the reinitialization on s3 resume
is not needed and might be harmful as described above. It does this by
using the s0ix resume code path at selected locations.

This new quirk goes beyond what the preexisting reset=never quirk does,
which only skips some reinitialization steps.
I think the original change mentioned not only issues on resume, but
also after boot, which this one does not address, at least directly, so
I am not sure if this patch is the proper replacement.

The original change introduced issues after boot and fixed issues after resume.

The new quirk fixes the issues after resume without introducing issues after boot.

The issues after boot where only affecting the NHxxRZQ and the N1xxCU iirc.


I would also like to understand better what exact step is troublesome,
as I would be surprised if any interaction with the keyboard
controller while suspending causes the issue to manifest. Is it enough,
by chance, to skip restoring MUX mode and reset?

SERIO_QUIRK_NOMUX and SERIO_QUIRK_RESET_ALWAYS are required in the old fix for the resume issues to go away (I don't know if SERIO_QUIRK_NOLOOP and SERIO_QUIRK_NOPNP are required, I threw them in just in case because we were running them already on the device, so they where somewhat "field proven" to not break things).

However while SERIO_QUIRK_NOMUX and SERIO_QUIRK_RESET_ALWAYS for themself did not individually introduce the boot problem, in combination they did.

That was all I was able to find out back when I tested the old quirks.


Also, shoudl this system use s2idle by chance?
N1xxCU is s3 only (intel 10th gen clevo)

Thanks.