You are not logged in.

#1 2013-01-26 20:58:56

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Setting keyboard repeat rate for tty at boot

I've written a small service file to change my keyboard repeat rate - my default repeat rate with this keyboard is so fast I can only successfully enter my password about 50% of the time

[Unit]
Description=Configure keyboard repeat rate in tty
 
[Service]
Type=oneshot
ExecStart=/usr/bin/kbdrate -d 600 -r 30
 
[Install]
WantedBy=multi-user.target

The problem is that this seems to be causing problems and delaying my boot, seems to make ntpd take much longer

# Without keyboard-repeat-rate-tty.service
Startup finished in 1537ms (kernel) + 1525ms (userspace) = 3063ms
   289ms network.service
   234ms systemd-udev-trigger.service
   197ms systemd-remount-fs.service
   183ms tmp.mount
   177ms systemd-modules-load.service
   167ms dev-hugepages.mount
   142ms store.mount
   132ms bak.mount
   129ms systemd-vconsole-setup.service
   110ms systemd-udevd.service
   103ms lm_sensors.service
    93ms dev-mqueue.mount
    91ms systemd-logind.service
    86ms cpupower.service
    76ms systemd-sysctl.service
    53ms systemd-user-sessions.service
    51ms var.mount
    43ms sys-kernel-debug.mount
    30ms ntpd.service
    26ms home.mount
    20ms systemd-tmpfiles-setup.service
    18ms dnsmasq.service

# With keyboard-repeat-rate-tty.service
Startup finished in 1517ms (kernel) + 2235ms (userspace) = 3753ms
   695ms ntpd.service
   293ms network.service
   284ms bak.mount
   196ms systemd-udev-trigger.service
   186ms store.mount
   170ms systemd-remount-fs.service
   161ms tmp.mount
   153ms lm_sensors.service
   137ms systemd-modules-load.service
   128ms systemd-logind.service
   113ms dev-hugepages.mount
   106ms cpupower.service
    99ms systemd-vconsole-setup.service
    87ms dev-mqueue.mount
    76ms systemd-udevd.service
    63ms systemd-sysctl.service
    50ms var.mount
    50ms home.mount
    49ms sys-kernel-debug.mount
    39ms systemd-user-sessions.service
    33ms systemd-tmpfiles-setup.service
    22ms dnsmasq.service

I've spotted this in journalctl

Jan 26 20:25:51 Meyithi-PC kernel: atkbd serio0: Spurious ACK on isa0060/serio0. Some program might be trying to access hardware directly.

Anybody know if there is a better way of setting my keyboard repeat rate or if the service file is wrong? Cheers.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#2 2013-01-27 14:21:27

mich41
Member
Registered: 2012-06-22
Posts: 553

Re: Setting keyboard repeat rate for tty at boot

This "Spurious ACK" is fine, it's just keyboard driver complaining that the keyboard acknowledges some command although the driver hasn't issued any.

I don't know why kbdrate delays boot, though. So far I've "upgraded" to systemd only one of my machines and I think I'll be looking for some distro which doesn't use it smile

Last edited by mich41 (2013-01-27 14:22:36)

Offline

#3 2013-01-27 14:35:10

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: Setting keyboard repeat rate for tty at boot

I edited the service file so I could see how long it took and also tried to start it after the network was up

[Unit]
Description=Configure keyboard repeat rate in tty
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/kbdrate -d 600 -r 30
 
[Install]
WantedBy=multi-user.target

And it shows the following

Startup finished in 1517ms (kernel) + 2656ms (userspace) = 4173ms
  1009ms keyboard-repeat-rate-tty.service
   276ms network.service
   192ms systemd-remount-fs.service
   179ms tmp.mount
   173ms systemd-modules-load.service
   150ms systemd-udev-trigger.service
   133ms dev-hugepages.mount
    96ms systemd-vconsole-setup.service
    90ms var.mount
    89ms systemd-sysctl.service
    86ms dev-mqueue.mount
    85ms store.mount
    83ms lm_sensors.service
    68ms bak.mount
    66ms systemd-udevd.service
    66ms sys-kernel-debug.mount
    63ms cpupower.service
    55ms home.mount
    51ms systemd-logind.service
    43ms ntpd.service
    43ms systemd-tmpfiles-setup.service
    36ms systemd-user-sessions.service
    35ms dnsmasq.service

Even slower, command executes immediately running manually in tty, have no idea why it takes so long when ran as a service, it's annoying hmm


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

Board footer

Powered by FluxBB