From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SOZsCrKDimCVTgEAgWs5BA (envelope-from ) for ; Thu, 29 Apr 2021 12:00:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kGIbBrKDimBhKAAAbx9fmQ (envelope-from ) for ; Thu, 29 Apr 2021 10:00:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 969CA22519 for ; Thu, 29 Apr 2021 12:00:17 +0200 (CEST) Received: from localhost ([::1]:58168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc3Sx-0001bt-H6 for larch@yhetil.org; Thu, 29 Apr 2021 06:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc3Sk-0001aD-F9 for bug-guix@gnu.org; Thu, 29 Apr 2021 06:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lc3Sk-0003DB-68 for bug-guix@gnu.org; Thu, 29 Apr 2021 06:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lc3Sk-0007Py-38 for bug-guix@gnu.org; Thu, 29 Apr 2021 06:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#39341: Installer using 100% of a CPU core Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 29 Apr 2021 10:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39341 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mathieu Othacehe Received: via spool by 39341-submit@debbugs.gnu.org id=B39341.161969036428432 (code B ref 39341); Thu, 29 Apr 2021 10:00:02 +0000 Received: (at 39341) by debbugs.gnu.org; 29 Apr 2021 09:59:24 +0000 Received: from localhost ([127.0.0.1]:54862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lc3S7-0007OR-LT for submit@debbugs.gnu.org; Thu, 29 Apr 2021 05:59:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lc3S5-0007O6-Cf; Thu, 29 Apr 2021 05:59:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39186) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc3Rz-0002qU-O5; Thu, 29 Apr 2021 05:59:15 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=32908 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lc3Rq-0000hV-RX; Thu, 29 Apr 2021 05:59:07 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a766u9et.fsf@gmail.com> <87h7juf3dk.fsf@gnu.org> <20210426143225.fljn47jmgj5hhmra@pelzflorian.localdomain> <87fszdav22.fsf@gnu.org> <20210426161459.rfgxir2n5ya73vmv@pelzflorian.localdomain> <878s546mhs.fsf@gnu.org> <20210427123209.jyqw77edsbt5qhdj@pelzflorian.localdomain> <8735vbwh9q.fsf@gnu.org> <20210428070210.g3lntjoek5y6hyi7@pelzflorian.localdomain> <87sg3asexh.fsf@gnu.org> <8735v91llu.fsf@gnu.org> Date: Thu, 29 Apr 2021 11:59:05 +0200 In-Reply-To: <8735v91llu.fsf@gnu.org> (Mathieu Othacehe's message of "Thu, 29 Apr 2021 11:33:17 +0200") Message-ID: <875z05mmxi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 39341@debbugs.gnu.org, 39341-done@debbugs.gnu.org, Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619690417; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=JYC5B9Ti2j9TusX1yqm8Z/O2WFvh/AahMg8ZRCukVTQ=; b=AZ6XugAZ+efwlzFD4ElbhiNCTaRtn/SZqW9dZOXhbkj4sQ+PpXacCb2dP1tayHxsfAOHkT ZzA++ADQ72DeeHiRlOsuLC6l+Hh1ax7I/Sx5ymqSUmO2Pm01CY3Z+ERTixpqNN7PUk8t8j k7ss4E5M+UdaBTc38861xDMyjuVXnkPD8msPBVHB/qP7dXDDrlY5Wqs2L5vT47ERJLadaz u+Fer43sTnIztaCoYuErl7YWnFXv6dsPTEst2vLm32KuIQv+FYgTD1PGTlSKKD+S1QEzYi QkUh3PZ6XzZyiKvim46Dk/0w4wXyKkq+k2Vj2V+zYJBnp8yvufUIH94Pju92iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619690417; a=rsa-sha256; cv=none; b=idSFz2EOkHwTaXeEJ2B43UHB8P/EVZqQIV6oIK39qmc12fRJR7NcMfv4kYpZUny4WjSBvN dHA3R3o9hHDjrrK69B9uOszeRicKlrDTMpa+1vAPAyt9VDCvLIdquzvbH4pXle1MxRzwS+ oJXN6GIQ1xjcdi2blua0EN63cJbcO4b5v9kHhdj1hbAIEWY08So+9wvIyDQR8bp5lnreCv TepHjyIDd3GRjw9ZpExMnVHVbkdDB8h1TDYC23o3Bh5vv+AXNDXsspPsfHTh+Luk5LF3rf 8GXn4k7p7zY4TxTXUCaAfeOBZNH6itzJr1bLWYgqy24+j9z7wU318nea0+v9bw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 969CA22519 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9QzQohF/fVGS Hello! Mathieu Othacehe skribis: > Your recent patch is just revealing an issue we always had with this > Kmscon patch. Basically, without the "unlink" called you introduced, the > FIFO fd was added only to the first discovered input and the keyboard > layout was only applied to that very input. > > Conveniently, that input was always the main user keyboard I guess. The > attached patch fixes that issue by registering the FIFO on the first > input, but applying the keyboard layout to all the inputs. Oh, fun (indeed I tested on a laptop with an external USB keyboard). >>>From 1a0fddd844ced62c802db0d6d133af45880435f0 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Thu, 29 Apr 2021 11:11:32 +0200 > Subject: [PATCH] gnu: kmscon: Fix layout setup. > > Kmscon may discover multiple inputs, corresponding to multiple devices. T= his > means that the uxkb_dev_keymap_update function may be called multiple tim= es, > and the FIFO is registered on each input poll loop. > > When a new layout is written on the FIFO by the installer, the first input > picking up the message, will apply the new layout. However, that input ma= y not > be the input that the user is currently using. > > To fix it, register the FIFO on the first input poll loop, but apply the = new > layout on all the inputs in the uxkb_keymap_update_handler function. > > * gnu/packages/patches/kmscon-runtime-keymap-switch.patch > (uxkb_keymap_update_handler): Apply the new layout to all the inputs. > (uxkb_dev_keymap_update): Register the FIFO fd only on the first input po= ll loop. Tested in a VM: it switches layouts like crazy, doesn=E2=80=99t leak a sing= le FD, and generally behaves as expected. Thumbs up! Thanks, Ludo=E2=80=99.