[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39341: Installer using 100% of a CPU core
From: |
Ludovic Courtès |
Subject: |
bug#39341: Installer using 100% of a CPU core |
Date: |
Thu, 29 Apr 2021 11:59:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello!
Mathieu Othacehe <othacehe@gnu.org> 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 <othacehe@gnu.org>
> 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. This
> means that the uxkb_dev_keymap_update function may be called multiple times,
> 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 may 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 poll
> loop.
Tested in a VM: it switches layouts like crazy, doesn’t leak a single
FD, and generally behaves as expected.
Thumbs up!
Thanks,
Ludo’.
- bug#39341: Installer using 100% of a CPU core, (continued)
- bug#39341: Installer using 100% of a CPU core, Ludovic Courtès, 2021/04/27
- bug#39341: Installer using 100% of a CPU core, pelzflorian (Florian Pelz), 2021/04/28
- bug#39341: Installer using 100% of a CPU core, pelzflorian (Florian Pelz), 2021/04/28
- bug#39341: Installer using 100% of a CPU core, Ludovic Courtès, 2021/04/28
- bug#39341: Installer using 100% of a CPU core, pelzflorian (Florian Pelz), 2021/04/28
- bug#39341: Installer using 100% of a CPU core, Mathieu Othacehe, 2021/04/29
- bug#39341: Installer using 100% of a CPU core,
Ludovic Courtès <=
- bug#39341: Installer using 100% of a CPU core, Mathieu Othacehe, 2021/04/29
- bug#39341: Installer using 100% of a CPU core, pelzflorian (Florian Pelz), 2021/04/29
- bug#39341: Installer using 100% of a CPU core, Ludovic Courtès, 2021/04/28