Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2023 13:29:34 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Matthias Apitz <guru@unixarea.de>, Warner Losh <imp@bsdimp.com>,  Michael Gmelin <grembo@freebsd.org>, Alexander Motin <mav@freebsd.org>,  FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: 14.0-CURRENT boots fine but keyboard does not work
Message-ID:  <CANCZdfpUTBtSQKQSqXyw%2BcWMSsyKSaMsUCwDyLM2nNhGiS1gvA@mail.gmail.com>
In-Reply-To: <ZPdr57eg92ykqGg1@c720-r368166>
References:  <ZPYVKL74wlue%2BOuu@c720-r368166> <58E9D0C9-747F-4DEB-9DC7-5A2E8C54EABF@freebsd.org> <CANCZdfre5vW%2BQinsUXuwrROS_70iR%2Bpyz9Y7BWcWXxYuZEakxQ@mail.gmail.com> <ZPbG8qXfoWIHvMW3@c720-r368166> <CANCZdfow6imSy%2BxrCsrt0wSFfnWRLWtj7tuV6TO0Ci0oP1eRAQ@mail.gmail.com> <ZPdr57eg92ykqGg1@c720-r368166>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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
>

[-- Attachment #2 --]
<div dir="ltr"><div>Can you try this patch? (it&#39;s cut and paste inline, so if it fails, can you apply it by hand... it&#39;s pretty straight forward)...</div><div><br></div><div>The reason is in the comments... Not 100% sure about using the version being all spaces, though...</div><div>Nor the year 2018, honestly, but it beats having a longish list (see <a href="https://mrchromebox.tech/#devices">https://mrchromebox.tech/#devices</a></div><div>for the list I worry about).</div><div><br></div><div>Warner<br></div><div><br></div><div>diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c<br>index 6168b389841b..ee7c6cf59da6 100644<br>--- a/sys/dev/atkbdc/atkbdc.c<br>+++ b/sys/dev/atkbdc/atkbdc.c<br>@@ -147,6 +147,7 @@ atkbdc_getquirks(void)<br>     char *maker = kern_getenv(&quot;smbios.system.maker&quot;);<br>     char *product = kern_getenv(&quot;smbios.system.product&quot;);<br>     char *version = kern_getenv(&quot;smbios.bios.version&quot;);<br>+    char *reldate = kern_getenv(&quot;smbios.bios.reldate&quot;);<br> <br>     for (i = 0; i &lt; nitems(quirks); i++)<br>        if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) &amp;&amp;<br>@@ -154,6 +155,16 @@ atkbdc_getquirks(void)<br>            QUIRK_STR_EQUAL(quirks[i].product, product) &amp;&amp;<br>            QUIRK_STR_MATCH(quirks[i].version, version))<br>                return (quirks[i].quirk);<br>+    /*<br>+     * Some Chromebooks don&#39;t confirm to the google comment above so do the<br>+     * Chromebook workaround for all &lt;= 2018 coreboot systems that have a<br>+     * &#39;blank&#39; version.  At least once Acer &quot;Peppy&quot; chromebook has this issue,<br>+     * with a reldate of 08/13/2014.<br>+     */<br>+    if (QUIRK_STR_EQUAL(&quot;coreboot&quot;, bios_vendor) &amp;&amp;<br>+       (version != NULL &amp;&amp; *version == &#39; &#39;) &amp;&amp;<br>+       (reldate != NULL &amp;&amp; strlen(reldate) &gt;= 10 &amp;&amp; strcmp(reldate + 6, &quot;2018&quot;) &lt;= 0))<br>+           return (CHROMEBOOK_WORKAROUND);<br> <br>     return (0);<br> }<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 5, 2023 at 11:56 AM Matthias Apitz &lt;<a href="mailto:guru@unixarea.de">guru@unixarea.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">El día martes, septiembre 05, 2023 a las 11:07:07a. m. -0600, Warner Losh escribió:<br>
<br>
&gt; &gt; <a href="https://cgit.freebsd.org/src/commit/?id=319d2bf407b3762da6f1c67ffe8dce2fee587aaf" rel="noreferrer" target="_blank">https://cgit.freebsd.org/src/commit/?id=319d2bf407b3762da6f1c67ffe8dce2fee587aaf</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; You could try to undo that patch and build a new kernel.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; ...<br>
&gt; <br>
&gt; No. Let&#39;s see if I can puzzle out what went awry here.<br>
&gt; <br>
&gt; First up: can you report what &#39;kenv&#39; on a boot system returns?<br>
<br>
Please find attached the output of kenv<br>
<br>
        matthias<br>
<br>
-- <br>
Matthias Apitz, ✉ <a href="mailto:guru@unixarea.de" target="_blank">guru@unixarea.de</a>, <a href="http://www.unixarea.de/" rel="noreferrer" target="_blank">http://www.unixarea.de/</a>; +49-176-38902045<br>
Public GnuPG key: <a href="http://www.unixarea.de/key.pub" rel="noreferrer" target="_blank">http://www.unixarea.de/key.pub</a><br>;
</blockquote></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpUTBtSQKQSqXyw%2BcWMSsyKSaMsUCwDyLM2nNhGiS1gvA>