Re: 14.0-CURRENT boots fine but keyboard does not work

From: Warner Losh <imp_at_bsdimp.com>
Date: Tue, 05 Sep 2023 19:29:34 UTC
Can you try this patch? (it's cut and paste inline, so if it fails, can you
apply it by hand... it's pretty straight forward)...

The reason is in the comments... Not 100% sure about using the version
being all spaces, though...
Nor the year 2018, honestly, but it beats having a longish list (see
https://mrchromebox.tech/#devices
for the list I worry about).

Warner

diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c
index 6168b389841b..ee7c6cf59da6 100644
--- a/sys/dev/atkbdc/atkbdc.c
+++ b/sys/dev/atkbdc/atkbdc.c
@@ -147,6 +147,7 @@ atkbdc_getquirks(void)
     char *maker = kern_getenv("smbios.system.maker");
     char *product = kern_getenv("smbios.system.product");
     char *version = kern_getenv("smbios.bios.version");
+    char *reldate = kern_getenv("smbios.bios.reldate");

     for (i = 0; i < nitems(quirks); i++)
        if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) &&
@@ -154,6 +155,16 @@ atkbdc_getquirks(void)
            QUIRK_STR_EQUAL(quirks[i].product, product) &&
            QUIRK_STR_MATCH(quirks[i].version, version))
                return (quirks[i].quirk);
+    /*
+     * Some Chromebooks don't confirm to the google comment above so do the
+     * Chromebook workaround for all <= 2018 coreboot systems that have a
+     * 'blank' version.  At least once Acer "Peppy" chromebook has this
issue,
+     * with a reldate of 08/13/2014.
+     */
+    if (QUIRK_STR_EQUAL("coreboot", bios_vendor) &&
+       (version != NULL && *version == ' ') &&
+       (reldate != NULL && strlen(reldate) >= 10 && strcmp(reldate + 6,
"2018") <= 0))
+           return (CHROMEBOOK_WORKAROUND);

     return (0);
 }

On Tue, Sep 5, 2023 at 11:56 AM Matthias Apitz <guru@unixarea.de> wrote:

> El día martes, septiembre 05, 2023 a las 11:07:07a. m. -0600, Warner Losh
> escribió:
>
> > >
> https://cgit.freebsd.org/src/commit/?id=319d2bf407b3762da6f1c67ffe8dce2fee587aaf
> > > > >
> > > > > You could try to undo that patch and build a new kernel.
> > > > >
> > > > ...
> >
> > No. Let's see if I can puzzle out what went awry here.
> >
> > First up: can you report what 'kenv' on a boot system returns?
>
> Please find attached the output of kenv
>
>         matthias
>
> --
> Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/
> +49-176-38902045
> Public GnuPG key: http://www.unixarea.de/key.pub
>