From nobody Tue Sep 05 19:29:34 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RgFvH4rd1z4s5hx for ; Tue, 5 Sep 2023 19:29:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RgFvG6JJGz4WXl for ; Tue, 5 Sep 2023 19:29:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51e28cac164so369369a12.1 for ; Tue, 05 Sep 2023 12:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1693942185; x=1694546985; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=VOaz1eUBKdQRDNpYesu3HSPwDQMMYSOJdPbSAfbLZ4g=; b=b0YVzOcGZsUhXpmB8aunveobHsfLQzjAHxiFpSMegIcl3+7cgeKpLEc162IOf2T9NU tW7qGTq8wbW9ghLkcAOE2CHLLwPMLlMeixftvUX7WyAzBd07ocXR2Vp4UQ4/ltjOsavt sttnnOMvQuobFF7rqE8158pPpo2lrRyrffl/9YrX/4FrvfMIyGNjuCEQFNmNKhyefrAW lfyboCqCCpf0tfH7R1uI5VYby5OENiRgFCQliX8eCZ7HTLQx3cPwic+kMIr9O5vRnBa+ 2mvhlbCvtgIqPkLs622Kmj97HCr2yvmXpLVFfDsVvvegD4ueY2o4/5t7KXfcFjXuQW+H 6mpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693942185; x=1694546985; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VOaz1eUBKdQRDNpYesu3HSPwDQMMYSOJdPbSAfbLZ4g=; b=LIs9nnJze7NME7lT6bqOQHMznmtWOAMwWwYV+NLGkWOC1s/E5q3xpY1z/UTASQ9+Gy a/n0FllqB97k/TeuyxYutEXeKBQT9I9iZ9nGoMSwxjn6jFeZ/HWb1smlVvqhSHI8z1Ol 2BMgH/zxFidZ7M/AJKqYv3YmqU3t7eEmwbBtAbPjsr6F79DzY3eSSRnOQAnELPoFt9P0 CZ7QfQ/Je7lFw6fdob8ktc5qHLI/SzI8PawXPi8UR1fUBElFwMKOLHRHraawlrjPXB8G 28X/FB+rHC8iwjgRseGI9RGfXZtB61TOzCvGFFQPMrQuFh+fmQ3ut4vI6eH+nT4cYMfa hErA== X-Gm-Message-State: AOJu0YxE9/Zi2/GTSuhUmA9ubWllhcK6DF2DzXsyovQJIl1dMyXcbQSf KntHg1m8XzomZJZtwnUCiNTuKTVvoglYW76mMMJ6Tg== X-Google-Smtp-Source: AGHT+IFLHJm8Eel4ImV97m/N5WeqZfwENJtZzp/LJVD07zXrQObs3FCE0m+ghv7kL7YlV7Gs9aNdVLQg8tnJifytPx8= X-Received: by 2002:a17:906:9754:b0:9a5:9b93:d60d with SMTP id o20-20020a170906975400b009a59b93d60dmr707403ejy.36.1693942185476; Tue, 05 Sep 2023 12:29:45 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <58E9D0C9-747F-4DEB-9DC7-5A2E8C54EABF@freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 5 Sep 2023 13:29:34 -0600 Message-ID: Subject: Re: 14.0-CURRENT boots fine but keyboard does not work To: Matthias Apitz , Warner Losh , Michael Gmelin , Alexander Motin , FreeBSD Current Content-Type: multipart/alternative; boundary="0000000000003c5c670604a1a6d4" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RgFvG6JJGz4WXl --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 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
Can you try this patch? (it's cut and paste inlin= e, so if it fails, can you apply it by hand... it's pretty straight for= ward)...

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_ge= tquirks(void)
=C2=A0 =C2=A0 =C2=A0char *maker =3D kern_getenv("smbi= os.system.maker");
=C2=A0 =C2=A0 =C2=A0char *product =3D kern_geten= v("smbios.system.product");
=C2=A0 =C2=A0 =C2=A0char *version = =3D kern_getenv("smbios.bios.version");
+ =C2=A0 =C2=A0char *r= eldate =3D kern_getenv("smbios.bios.reldate");
=C2=A0
=C2= =A0 =C2=A0 =C2=A0for (i =3D 0; i < nitems(quirks); i++)
=C2=A0 =C2=A0= =C2=A0 =C2=A0 if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) &= ;&
@@ -154,6 +155,16 @@ atkbdc_getquirks(void)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 QUIRK_STR_EQUAL(quirks[i].product, product) &&= amp;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 QUIRK_STR_MATCH(quirks[i]= .version, version))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 return (quirks[i].quirk);
+ =C2=A0 =C2=A0/*
+ =C2=A0 =C2=A0 * Som= e Chromebooks don't confirm to the google comment above so do the
+ = =C2=A0 =C2=A0 * Chromebook workaround for all <=3D 2018 coreboot systems= that have a
+ =C2=A0 =C2=A0 * 'blank' version.=C2=A0 At least o= nce Acer "Peppy" chromebook has this issue,
+ =C2=A0 =C2=A0 * = with a reldate of 08/13/2014.
+ =C2=A0 =C2=A0 */
+ =C2=A0 =C2=A0if (Q= UIRK_STR_EQUAL("coreboot", bios_vendor) &&
+ =C2=A0 = =C2=A0 =C2=A0 (version !=3D NULL && *version =3D=3D ' ') &a= mp;&
+ =C2=A0 =C2=A0 =C2=A0 (reldate !=3D NULL && strlen(rel= date) >=3D 10 && strcmp(reldate + 6, "2018") <=3D 0= ))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (CHROMEBOOK_WORKAROUND);<= br>=C2=A0
=C2=A0 =C2=A0 =C2=A0return (0);
=C2=A0}

= --0000000000003c5c670604a1a6d4--