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
--0000000000003c5c670604a1a6d4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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 =3D kern_getenv("smbios.system.maker");
     char *product =3D kern_getenv("smbios.system.product");
     char *version =3D kern_getenv("smbios.bios.version");
+    char *reldate =3D kern_getenv("smbios.bios.reldate");

     for (i =3D 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 th=
e
+     * Chromebook workaround for all <=3D 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 !=3D NULL && *version =3D=3D ' ') &&
+       (reldate !=3D NULL && strlen(reldate) >=3D 10 && strcmp(reldate + 6=
,
"2018") <=3D 0))
+           return (CHROMEBOOK_WORKAROUND);

     return (0);
 }

On Tue, Sep 5, 2023 at 11:56=E2=80=AFAM Matthias Apitz <guru@unixarea.de> w=
rote:

> El d=C3=ADa martes, septiembre 05, 2023 a las 11:07:07a. m. -0600, Warner=
 Losh
> escribi=C3=B3:
>
> > >
> https://cgit.freebsd.org/src/commit/?id=3D319d2bf407b3762da6f1c67ffe8dce2=
fee587aaf
> > > > >
> > > > > 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, =E2=9C=89 guru@unixarea.de, http://www.unixarea.de/
> +49-176-38902045
> Public GnuPG key: http://www.unixarea.de/key.pub
>

--0000000000003c5c670604a1a6d4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Can you try this patch? (it&#39;s cut and paste inlin=
e, so if it fails, can you apply it by hand... it&#39;s pretty straight for=
ward)...</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=3D"ht=
tps://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_ge=
tquirks(void)<br>=C2=A0 =C2=A0 =C2=A0char *maker =3D kern_getenv(&quot;smbi=
os.system.maker&quot;);<br>=C2=A0 =C2=A0 =C2=A0char *product =3D kern_geten=
v(&quot;smbios.system.product&quot;);<br>=C2=A0 =C2=A0 =C2=A0char *version =
=3D kern_getenv(&quot;smbios.bios.version&quot;);<br>+ =C2=A0 =C2=A0char *r=
eldate =3D kern_getenv(&quot;smbios.bios.reldate&quot;);<br>=C2=A0<br>=C2=
=A0 =C2=A0 =C2=A0for (i =3D 0; i &lt; nitems(quirks); i++)<br>=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) &amp=
;&amp;<br>@@ -154,6 +155,16 @@ atkbdc_getquirks(void)<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 QUIRK_STR_EQUAL(quirks[i].product, product) &amp;&=
amp;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 QUIRK_STR_MATCH(quirks[i]=
.version, version))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 return (quirks[i].quirk);<br>+ =C2=A0 =C2=A0/*<br>+ =C2=A0 =C2=A0 * Som=
e Chromebooks don&#39;t confirm to the google comment above so do the<br>+ =
=C2=A0 =C2=A0 * Chromebook workaround for all &lt;=3D 2018 coreboot systems=
 that have a<br>+ =C2=A0 =C2=A0 * &#39;blank&#39; version.=C2=A0 At least o=
nce Acer &quot;Peppy&quot; chromebook has this issue,<br>+ =C2=A0 =C2=A0 * =
with a reldate of 08/13/2014.<br>+ =C2=A0 =C2=A0 */<br>+ =C2=A0 =C2=A0if (Q=
UIRK_STR_EQUAL(&quot;coreboot&quot;, bios_vendor) &amp;&amp;<br>+ =C2=A0 =
=C2=A0 =C2=A0 (version !=3D NULL &amp;&amp; *version =3D=3D &#39; &#39;) &a=
mp;&amp;<br>+ =C2=A0 =C2=A0 =C2=A0 (reldate !=3D NULL &amp;&amp; strlen(rel=
date) &gt;=3D 10 &amp;&amp; strcmp(reldate + 6, &quot;2018&quot;) &lt;=3D 0=
))<br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (CHROMEBOOK_WORKAROUND);<=
br>=C2=A0<br>=C2=A0 =C2=A0 =C2=A0return (0);<br>=C2=A0}<br></div></div><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Se=
p 5, 2023 at 11:56=E2=80=AFAM Matthias Apitz &lt;<a href=3D"mailto:guru@uni=
xarea.de">guru@unixarea.de</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">El d=C3=ADa martes, septiembre 05, 2023 a las 11:=
07:07a. m. -0600, Warner Losh escribi=C3=B3:<br>
<br>
&gt; &gt; <a href=3D"https://cgit.freebsd.org/src/commit/?id=3D319d2bf407b3=
762da6f1c67ffe8dce2fee587aaf" rel=3D"noreferrer" target=3D"_blank">https://=
cgit.freebsd.org/src/commit/?id=3D319d2bf407b3762da6f1c67ffe8dce2fee587aaf<=
/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>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 matthias<br>
<br>
-- <br>
Matthias Apitz, =E2=9C=89 <a href=3D"mailto:guru@unixarea.de" target=3D"_bl=
ank">guru@unixarea.de</a>, <a href=3D"http://www.unixarea.de/" rel=3D"noref=
errer" target=3D"_blank">http://www.unixarea.de/</a>; +49-176-38902045<br>
Public GnuPG key: <a href=3D"http://www.unixarea.de/key.pub" rel=3D"norefer=
rer" target=3D"_blank">http://www.unixarea.de/key.pub</a><br>;
</blockquote></div>

--0000000000003c5c670604a1a6d4--



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