You are not logged in.
I have setup full disk encryption with LUKS/dm-crypt and sd-encrypt.
The keyboard repeat rate is really fast and it's difficult to input the password.
I tried adding a systemd service as described here https://wiki.archlinux.org/index.php/Ke … y_and_rate
but it seems to run too late to make a difference.
How can I lower the keyboard repeat rate before the encryption password input?
Offline
I would suggest trying Before=cryptsetup.target or Before=cryptsetup-pre.target and try installing it in the initrd as /etc/systemd/system/cryptsetup.target.wants/kbdrate.service
Offline
I tried the following service, but got "ordering cycle".
[Unit]
Description=Keyboard repeat rate in tty.
Before=cryptsetup.target
[Service]
Type=oneshot
RemainAfterExit=yes
StandardInput=tty
StandardOutput=tty
ExecStart=/usr/bin/kbdrate -s -d 660 -r 25
[Install]
WantedBy=cryptsetup.target
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Found ordering cycle on cryptsetup.target/start
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Found dependency on kbdrate.service/start
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Found dependency on basic.target/start
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Found dependency on sockets.target/start
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Found dependency on dbus.socket/start
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Found dependency on sysinit.target/start
Aug 17 13:40:24 arkki systemd[1]: sysinit.target: Job cryptsetup.target/start deleted to break ordering cycle starting with sysinit.target/start
if i try cryptsetup-pre.target instead, there's no ordering cycle, but nothing happens anyway
service is saved as symlink in /etc/systemd/system/cryptsetup.target.wants/kbdrate.service
Offline
How are you including the service file in the initrd?
Offline
How are you including the service file in the initrd?
how do i do that exactly?
all i did was run systemctl enable kbdrate and it made symlink
/etc/systemd/system/kbdrate.service -> /etc/systemd/system/cryptsetup.target.wants/kbdrate.service
Offline
You should be able to check if it is with
bsdcpio -it < /boot/initramfs-linux.img
If it is note you could try the files array of mkinitcpio.conf to add both the service and symlink.
Offline
I have the same problem and none of the ways described above works. Has anybody solve this problem?
Offline
What do you mean "none of" - there's only one approach discussed and it remained open whether the OP actually added the service to his initramfs. Did you?
Output of
lsinitcpio /boot/initramfs-linux.img | grep cryptsetup
?
Offline
You could create a kbdrate hook. Similar to the keymap hook.
/etc/initcpio/install/kbdrate
#!/bin/bash
build() {
add_binary "kbdrate"
add_runscript
}
help() {
cat <<HELPEOF
Set keyboard repeat rate. (Edit hooks/kbdrate to adapt values.)
HELPEOF
}
/etc/initcpio/hooks/kbdrate
#!/usr/bin/ash
run_hook() {
kbdrate -s -d 1000 -r 10
}
Then add kbdrate to mkinitcpio.conf :: HOOKS after keyboard/keymap hook.
This is not systemd specific so if systemd also sets the repeat rate, it might not work.
If there is a kernel parameter to set the default value, you might not need the hook at all, but if there is one I don't remember...
Offline
I thought add_runscript did not work under systemd due to the script never being called by systemd.
Offline
Oh, sure. I don't use systemd in initramfs, sorry about that.
For a systemd hook, you only need the install file, and add_systemd_unit instead of add_runscript, and of course - a systemd unit which in turn then runs kbdrate, before you start typing the passphrase.
If you look at existing systemd hooks (/lib/initcpio/install/sd-*) you should ge the general idea.
Offline