Subject: bug#53329: Integrated keyboard doesn't work (Lenovo N22)

From: Leo Famulari <[email-masked]>
Date: Mon, 17 Jan 2022 18:15:50 -0500

On Mon, Jan 17, 2022 at 09:36:55PM +0000, Jack Ridehalgh via Bug reports for GNU Guix wrote:
> Due to the bug mentioned here on the Nix tracker
> (https://github.com/NixOS/nixpkgs/issues/143223) and elsewhere it is not
> possible to use the integrated keyboard on some Braswell laptops.

Thanks for bringing this report to Guix. There is also this discussion
upstream:

https://bugzilla.kernel.org/show_bug.cgi?id=194945

The upstream bug report suggests that this functionality worked until
Linux 4.9. Could you try with linux-libre-4.4? We have it packaged. I
don't recommend planning to stick with 4.4, but it would be interesting
as a test.

> Would it be possible to include CONFIG_PINCTRL_CHERRYVIEW=y in the kernel
> configuration so the keyboard functions correctly on these machines?

Yes, we can do that.

As shown here, this model is currently built as a module, although the
Bay Trail pinctrl stuff is built-in:

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/aux-files/linux-libre/5.15-x86_64.conf?id=2c7f2b40e2dbee48075147a87c6cd9b611dc5ba9#n4704

It's been like that for several years.

> Sadly the kernel module does not work when trying to load via modprobe
> and these machines are so low powered it's difficult to compile my own kernel.

As the upstream discussion says, it would be great to understand why
this stuff doesn't work when built as a module. But, Debian builds all
of them into the kernel, and there must be a reason for that.

I'll make a Git branch in our repo that you can pull from to test the
fix.