You are not logged in.

#1 2019-05-09 17:45:45

berg
Member
Registered: 2019-05-09
Posts: 2

Duplicate keystrokes during LUKS passphrase on Linux-CK

Hello friends, hope anyone of you you can help me with this issue.
Thanks in advance. Let's get to it smile

Problem

I have random problems getting past the LUKS passphrase when booting into the CK-Kernel.
Once i got past entering the passphrase the system works like a charm.
The safest way to get past this so far was to monitor the amount of registered keystrokes "*" vs. "**" and deleting the redundant ones.

This only happens when booting into one of the CK patch sets. Entering the LUKS passphrase on the LTS kernel works like a charm every time.

Noticed

- Keyboard is randomly registering duplicate keystrokes, this only happens when booting into one of the the CK-images (generic or ivybridge)

Suspected causes

- Keyboard frequency or keystroke registration.
Maybe with the frequency/tick increase from the CK patchset a problem that is not noticed on the normal kernel surfaces as also keypress registrations get more "sensitive" that it requires "perfect" timing when entering the passphrase?!

Backstory

I got a working installation of ARCH with the LTS Kernel on a Desktop System.
System is fully encrypted via LUKS and LVM. It's been working great in terms of stability.
Reason for the change to CK patchset is the optimized responsiveness.

Opinion

So far i think it's save to say that the general system setup is working fine and we can search for a solution around the switched kernel (?with emphasis on the keyboard?).

What was done so far in order to fix it

- System update: pacman -Syu
- Tried different CK kernel variants (generic & cpu optimized)
- Rearranged order of HOOKS in mkinitcpio.conf (and regenerated kernel image every time via mkintcpio -p imagename)
- Used the atkbd module with bios set to PS/2 emulation
- Changed out the keyboard (From Logitech to Cherry) as i read similar problems with faulty keyboards (Both USB).

Info

CK-Kernel: 5.0.14-1-ck-ivybridge #1 SMP PREEMPT Wed May 8 16:10:11 EDT 2019 x86_64 GNU/Linux (via Unofficial user repositories/Repo-ck)
LTS-Kernel: 4.19.40-1-lts
Booting: system.d-boot + system.d
cat /boot/loader/entries/arch_ck_micro.conf:

title Arch Linux (ENCRYPTED) - CK(IvyBridge) - Microcode
linux /vmlinuz-linux-ck-ivybridge
initrd /intel-ucode.img
initrd /initramfs-linux-ck-ivybridge.img
options luks.uuid=8d1d4880-05cf-42a8-a173-63afe0474711 luks.name=lvm root=/dev/mapper/vg0-root rw

cat /boot/loader/entries/arch_ck_micro.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=(atkbd)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
COMPRESSION_OPTIONS=(-9)

Please let me know if there are additional information needed.

Last edited by berg (2019-05-09 17:46:47)

Offline

#2 2019-06-01 19:16:02

fsyyy
Member
Registered: 2019-01-06
Posts: 3

Re: Duplicate keystrokes during LUKS passphrase on Linux-CK

Hi,

i have the same issue.

And also no fix yet.

Last edited by fsyyy (2019-06-01 19:17:53)

Offline

#3 2019-06-02 08:49:26

frostschutz
Member
Registered: 2013-11-15
Posts: 1,418

Re: Duplicate keystrokes during LUKS passphrase on Linux-CK

Does the issue persist if you continue with the boot process? LUKS allows adding multiple passphrases, so as a workaround, you could just add one that works when every letter is duplicated. same concept as dealing with other keyboard layout issues during early boot: https://unix.stackexchange.com/a/174657/30851

If the issue persists you won't be able to login unless you create a user 'aallff' password 'iieeaattccaattss'...

Last edited by frostschutz (2019-06-02 08:51:48)

Offline

#4 2019-06-07 08:29:28

berg
Member
Registered: 2019-05-09
Posts: 2

Re: Duplicate keystrokes during LUKS passphrase on Linux-CK

The issue with duplicated key presses vanishes once i get past the LUKS passphrase. No issues what so ever in X11.
The duplication happens at random keys and it duplicates 2-3 chars. You will notice it when watching carefully how many * will be created at each keystroke.
Doing so and deleting the duplicates by pressing backspace gets you past LUKS even on the CK-Kernel but that horribly tedious.

@frostschutz: re: Adding multiple passphrases
Read the articles covering that solution. Think it wont work due to the random nature. One would need to add every password permutation.
I'm ok with that as a fallback measure for different keyboard layouts with country specific characters.

Does anybody of you know if there is a chance to adjust the keyboard frequency at this early stage of booting?

Thank you all for the replies, lets keep digging smile
Somehow i still have my hopes up for this to vanish with future kernel updates / patches. No luck so far.

Offline

Board footer

Powered by FluxBB