From owner-freebsd-hardware@freebsd.org Tue Jul 14 14:55:58 2020 Return-Path: Delivered-To: freebsd-hardware@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEB37365277; Tue, 14 Jul 2020 14:55:58 +0000 (UTC) (envelope-from laszlo.janszky@gmail.com) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5k9B1zxmz4JbB; Tue, 14 Jul 2020 14:55:57 +0000 (UTC) (envelope-from laszlo.janszky@gmail.com) Received: by mail-lj1-x22e.google.com with SMTP id q4so23168607lji.2; Tue, 14 Jul 2020 07:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xOvWoEzJaHOKOuWM4Qx8jXx16Qufb7vCXfqJ0hZvENo=; b=eRJAhm5si4QetloIYBrNPIsjHVQrM+PLoe5W3wlAD9E/UDJSi0Z2sN4x8f454h7qGz FnewkdPAOOnjtgJmpnUGuwfrFDWK4oyZg0cbc80pwLmhUNy8Bs+YlugnX0f1lVFSzuvJ fE8Hb4Iz2T6+LquS1USmBRvXcfDgONdf+tFOZYM1CtcKwYfZAqDXF6W9+S8gi+Eyt1nd NAojQWVA1F2q5a7VMFkLSf6wljDN97fzSsDiKVV2XfIxxXH9t4Khx5Kv6o9EteFLZ8tI PCQ1Ai0NllZEyit8V6QMOmd+nxcSI0I1hAdLkzTj8VDQjdyaaF0VN7QOVlD3HQewxFZT cRFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xOvWoEzJaHOKOuWM4Qx8jXx16Qufb7vCXfqJ0hZvENo=; b=c7hWwK3C/ud36cWVQ2Orh1LdKoFi7agJoIzAFqbIibugeP2OirMH+Tva/sV6BQCE9n Pj/NzDeuj2ipt91JzfzMEOgha5s0MKy+8Ty9P1s3KCrHh6tdU2J77chbOxaiqFAF2pcb l0Ulaq9zeexk/y0i0kMhnnPVc0yHeaabeVM3pqaC155p2eOf/w0ZBYO3ZKm9MeiU9nUs nrqMibDokjyB7vxZ531RRAMU6NnZMYEqrZoNm+TaTEsmBiNux1ixPyoJsLQUaKNbjQ9b YJNv9PuT2bHfCda6Uor/0ENZUCjK9dMTeujeLw57XlbnZUojVgykmkwtop1jwZ9VSOrz 2zYQ== X-Gm-Message-State: AOAM531mNmEh6eswinwQpveUg07QTOHWbOcRbhZ4Ap+03xk6GX6owlYu GIWQp7lryqIL080YFPtnjvECV7mGlLikDvY8g2bHCKEP X-Google-Smtp-Source: ABdhPJyT4189cQYpJ3hvcrKl3KCfNoI4txW6EcYRvXJbX6IDvVKQf3xDwgtiv6WqdG2pqtuIsQH1muaapHT+g6x9jjk= X-Received: by 2002:a2e:961a:: with SMTP id v26mr2717427ljh.467.1594738555362; Tue, 14 Jul 2020 07:55:55 -0700 (PDT) MIME-Version: 1.0 References: <4EA5D9EF-4205-49AD-9AC9-1B381EDAA473@patpro.net> In-Reply-To: From: =?UTF-8?B?TMOhc3psw7MgTGFqb3MgSsOhbnN6a3k=?= Date: Tue, 14 Jul 2020 16:55:42 +0200 Message-ID: Subject: Re: keyboard has a weird layout after boot To: lev@freebsd.org Cc: Patrick Proniewski , freebsd-hardware@freebsd.org, freebsd-usb@freebsd.org X-Rspamd-Queue-Id: 4B5k9B1zxmz4JbB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 14:55:58 -0000 Thanks Lev! I can do further debugging if you send the instructions. Lev Serebryakov ezt =C3=ADrta (id=C5=91pont: 2020. j=C3= =BAl. 14., K, 16:37): > On 14.07.2020 16:48, L=C3=A1szl=C3=B3 Lajos J=C3=A1nszky wrote: > > >>>>> I have an Obins Anne Pro keyboard, which is a 60% mechanical NKRO > >>>>> keyboard > >>>>> http://en.obins.net/anne-pro It works properly in the UEFI and in > the > >>>>> rescue shell when I quit the boot menu, but after FreeBSD booted up > >>>>> and I got the login screen it changes layout to something weird. Fo= r > example > >>>>> I got "a" when pressing backspace or "w". Most of the keys stop > working. > >>>>> anything about it in the manual, so probably this keyboard is NKRO > >>>>> only... > >>>>> Any idea how to make it work with FreeBSD or what causes this > problem? > > As far as I know, NKRO USB keyboards could work in two modes: "Legacy" > and "Bitmap/NKRO". > > HID (and each USB Keyboard is HID device) is very flexible standard, and > it allows several ways to report pressed/released buttons: as event with = 8 > modifier keys and up to 6 "simple" keys per event, or by transferring > bitmap with bit for each button (pretends that all buttons are modifier > ones, which allows NKRO). > > "Standard" events could have only 6 different keys reported due to packe= t > size constrains. But this way was historically first and "standard" > keyboards work this way to this day. > > "Bitmap" reporting could transmit any state of keyboard with as many > pressed keys as there are keys total (NKRO!), but requires additional > support from drirver. > > NKRO keyboards start in "Legacy"/"Boot" mode because many BIOSes/EFI can > not understand "bitmap" reporting. Conditions to switch to "bitmap" > reporting are different for different NKRO keyboards. > > You could read more here: https://www.devever.net/~hl/usbnkro > > Looks like, FreeBSD HID/kbd driver has problem with "bitmap" reporting > and this keyboard switch to NKRO mode after boot regardless. > > I've CC: this message to usb@ mailing list, as it looks like USB problem > on FreeBSD side, in HID driver. > > -- > // Lev Serebryakov > >