You are not logged in.

#1 2020-04-22 13:55:37

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

kbdrate.service active (exited) but not taking effect

I followed these instructions to create and enable the service. The only difference is my command:

ExecStart=/usr/bin/kbdrate -s -d 1000 -r 15

I tried playing with the order just in case as well as removing the -s and it does spit out the message right before the login screen in the console. If I issue the command even from within an X session, and then switch to a tty I am not logged into, the command has taken effect. If I issue the command from the console it takes effect. The active service does not seem to take effect in the console.

Here is the status:

$ systemctl status kbdrate
----
● kbdrate.service - Keyboard repeat rate in tty.
     Loaded: loaded (/etc/systemd/system/kbdrate.service; enabled; vendor preset: disabled)
     Active: active (exited) since Wed 2020-04-22 06:38:53 MST; 8min ago
    Process: 826 ExecStart=/usr/bin/kbdrate -s -d 1000 -r 15 (code=exited, status=0/SUCCESS)
   Main PID: 826 (code=exited, status=0/SUCCESS)

Apr 22 06:38:53 X390 systemd[1]: Starting Keyboard repeat rate in tty....
Apr 22 06:38:53 X390 systemd[1]: Finished Keyboard repeat rate in tty..

Here is the journalctl output.

Update:
If my laptop dies, it takes effect on the next boot.

[5.29.20] It seems to work with my laptop's keyboard, but I use an external keyboard on which it does not take effect. If I run the command explicitly in the shell, it takes effect with my external keyboard. Is there something I have to add to the service to make it work with my external keeb?

Last edited by ThinkPad (2020-05-29 13:10:50)

Offline

#2 2020-04-24 09:18:34

andym
Member
From: France
Registered: 2019-01-16
Posts: 49

Re: kbdrate.service active (exited) but not taking effect

Does this answer your question?

The typematic delay indicates the amount of time (typically in milliseconds) a key needs to be pressed and held in order for the repeating process to begin. After the repeating process has been triggered, the character will be repeated with a certain frequency (usually given in Hz) specified by the typematic rate. These values can be changed using the kbdrate command. Note that these settings are configured separately for the virtual console and for Xorg.

From the Keyboard Configuration wiki

Offline

#3 2020-04-24 12:38:33

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: kbdrate.service active (exited) but not taking effect

It does not. These are the instructions for the console and I want them to take effect in the console.

Offline

#4 2020-04-25 07:28:13

andym
Member
From: France
Registered: 2019-01-16
Posts: 49

Re: kbdrate.service active (exited) but not taking effect

May be this has the answer?

If it is, please post the answer here for fellow users.

Offline

#5 2020-04-25 13:48:40

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: kbdrate.service active (exited) but not taking effect

That's very interesting but I'm not sure why putting a sleep before makes it work. Doesn't sleep halt all cpu processes (I'm thinking in C). This might work but doesn't seem like an elegant solution. Could it be that I have to add a hook to make it run before I get to the shell?


What also makes me not jump on that solution is that once logged in the status is active, but when I go to another console it has not taken effect. I login to that console and it still has not. I check status in that console and it's active (exited) as before with the timestamp from boot.

Offline

#6 2020-04-25 18:56:39

andym
Member
From: France
Registered: 2019-01-16
Posts: 49

Re: kbdrate.service active (exited) but not taking effect

In bash sleep just  indicates wait for a short while before executing the next command.

Offline

#7 2020-04-25 23:33:39

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: kbdrate.service active (exited) but not taking effect

Still, if the issue is that the command needs to execute at a certain time, isn't there a more elegant way to write that into the service? I would prefer something that specifies this service should be started when the console is reached on boot.

Offline

#8 2020-05-29 13:07:39

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: kbdrate.service active (exited) but not taking effect

See update in original post.

Offline

Board footer

Powered by FluxBB