Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp334423rdg; Thu, 12 Oct 2023 07:06:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5Aanx40jaijHQAtYZNaFwxwACeZR+kxKq2jKW4+Lvpb4ghHeL8ViSz6fLvqYmTC8sDVPN X-Received: by 2002:a17:90b:30ca:b0:27d:1df4:2920 with SMTP id hi10-20020a17090b30ca00b0027d1df42920mr2468187pjb.34.1697119578667; Thu, 12 Oct 2023 07:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697119578; cv=none; d=google.com; s=arc-20160816; b=EqmC+nsS8jz5PfNGDggtBoSNk2lkWBaD+yjqJecSCSLmb+CHud2WZUXptlS4K90lAq Q3vsi/gpVkuNJH34DGwjRwQhEqNg75ZCRtxz5BsHe1QR8Zf9t2TDBLNmvGu1LcVRnR4j XYo+go8HBMoGdFA6+a+v6VZut0xRh1/TqPx+2bIZGUzgwivv0Sb4i5PsrPxdDJKY8qfP 4oEK9HYakqq/Dd38qIc7LeIuF15DuZIpAKjOlgp31s9sTH09s/viYmTmDwQlWi/OxaPl AArEFrmCwm5w7tinMVCgux9WNiH4ICtGLzmo3xqHX6rfnYSfYjMIr3fsoYWTcXeHHWh0 7IkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=inB6K2CE4naGequ0gk0UEnbCsOf+8IaxK5+AmjGjuUc=; fh=QrV9MZy0/YrJalD8437vBY0BvOZFF8W0iYTXWGcYwlo=; b=bbNagKnVrvg7OVRJCMdby4Y1j34DHoHWvnjZ+1X6qzKDe/VCuu6fRRMqvyHklCJIYV fXQlScJeiB+vOLW97UUlhAM+Gv7CZ1o54UDNapd49UhYJDQePFnzEVVZttOMEHHB8N83 va4Jl+WETNuT6QmOKqb99T7QolwAOrX8q0FWiRLvUxfylNiG5QHzGHHeUkbMw8m//IjE +frSlBH1Zh+eOqD8R6XrsCQekr+uAIO5E89RDvGIcIR28/AQ6YADjatSH+1g3r39fq/A Q5QoMyoStm9WbF8VnqYuZ0mlco9jBZ3b68YJDQtDPPkiWsn1s9gECJl5vxTHJ59PGW2f i9aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=YyQR21Ot; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bk4-20020a17090b080400b00276c4e7b5e2si2374136pjb.146.2023.10.12.07.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 07:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=YyQR21Ot; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 63E6E81822D6; Thu, 12 Oct 2023 07:06:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344014AbjJLOGD (ORCPT + 99 others); Thu, 12 Oct 2023 10:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347196AbjJLOGB (ORCPT ); Thu, 12 Oct 2023 10:06:01 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79AF891; Thu, 12 Oct 2023 07:05:57 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 3A7351C0050; Thu, 12 Oct 2023 16:05:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1697119555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=inB6K2CE4naGequ0gk0UEnbCsOf+8IaxK5+AmjGjuUc=; b=YyQR21OtwY8naDHAxRH2uNMw3rKiw2R8OKu+ASfY5piekasLQD3IoEiGTTjCag4c8XkpXT UwDDArzHw3rvLkJEJj1CqhYM8lyKCNxfprM4Q3WET7RTHnvGXKUrrsVJMPRIJW8bjOR32y gI5FFpxReu8FVF7p0LGpIfz9ssHzEKQ= Date: Thu, 12 Oct 2023 16:05:54 +0200 From: Pavel Machek To: Werner Sembach Cc: Lee Jones , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH] leds: rgb: Implement per-key keyboard backlight for several TUXEDO devices Message-ID: References: <20231011190017.1230898-1-wse@tuxedocomputers.com> <0440ed38-c53b-4aa1-8899-969e5193cfef@tuxedocomputers.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aFNhJsV8yyrqsqyP" Content-Disposition: inline In-Reply-To: <0440ed38-c53b-4aa1-8899-969e5193cfef@tuxedocomputers.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 12 Oct 2023 07:06:15 -0700 (PDT) --aFNhJsV8yyrqsqyP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > There are however some known short comings: > > > - The sysfs leds interface does only allow to write one key at a time= =2E The > > > controller however can only update row wise or the whole keyboard at = once > > > (whole keyboard update is currently not implemented). This means that= even > > > when you want to updated a whole row, the whole row is actually updat= ed > > > once for each key. So you actually write up to 18x as much as would be > > > required. > > > - When you want to update the brightness of the whole keyboard you ha= ve to > > > write 126 sysfs entries, which inherently is somewhat slow, especiall= y when > > > using a slider that is live updating the brightness. > > > - While the controller manages up to 126 leds, not all are actually > > > populated. However the unused are not grouped at the end but also in > > > between. To not have dead sysfs entries, this would require manual te= sting > > > for each implemented device to see which leds are used and some kind = of > > > bitmap in the driver to sort out the unconnected ones. > > > - It is not communicated to userspace which led entry controls which = key > > > exactly > > Sooner or later, we'll need to support these keyboards. > >=20 > > But this has way too many shortcomings (and we'd be stuck with the > > interface forever). >=20 > I had some thoughts on how the current userspace api could be expanded to > better reflect the capabilities of RGB keyboards. What would be required = for > such an expansion to be considered? You submit a proposal. =20 > I'm in contact with the KDE folks. Plasma already has a keyboard brightne= ss > slider, that soon > https://gitlab.freedesktop.org/upower/upower/-/merge_requests/203 will wo= rk > with multiple kbd_backlight. However the slowness of 126 sysfs entries ma= kes > it a little bit janky still. >=20 > They are also thinking about expanding desktop accent colors to the keybo= ard > backlight when it supports RGB. >=20 > I have not reached out to the OpenRGB project yet, but is it alive and we= ll > and under constant development: https://gitlab.com/CalcProgrammer1/OpenRG= B. > Afaik it is currently a userspace only driver interacting directly with > hidraw mostly and has not yet implemented the sysfs leds interface. >=20 > Just listing this to show that there is definitely interest in this. Yep, there's definitely interest. > > These days, displays with weird shapes are common. Like rounded > > corners and holes in them. Perhaps this should be better modelled as a > > weird display? >=20 > I'm not sure if I can follow you here. Where would this be implemented? A= lso > I asume displays asume equal distance between pixels and that columns are > straight lines perpendicular to rows, which the key backlights have and a= re > not. Yes, I know displays are a bit different from RGB LEDs. Gamma is another issue. Yes, it is quite weird display. But 6x22 display may be better approximation of keyboard than ... 126 unrelated files. Or you could do 6x66 sparse display, I guess, to express the shifts. But I believe 6x22 would be better. It would go to drivers/auxdisplay, most probably. I checked https://www.tuxedocomputers.com/en/Linux-Hardware/Zubehoer-USB-Co./USB-Zube= hoer.tuxedo , but you don't seem to have stand-alone keyboard with such RGB capability.= =2E.? Best regards, Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --aFNhJsV8yyrqsqyP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCZSf9QgAKCRAw5/Bqldv6 8iBuAJwO/B7tRyK17+LfywKkRYaL9/c9jwCfaqw4BvVM3rR9X370LIYbVUhFic8= =GGyX -----END PGP SIGNATURE----- --aFNhJsV8yyrqsqyP--