-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keyd: Verify current udevd process is supervised by runit #38467
Conversation
keyboard can become unresponsive. |
rvaiya/keyd#263 (comment) |
I'm not sure either @akhiljalagam . I'm hoping a void maintainer can chime in here. |
Because udevd is needed early for early initialization at a point where runit services are not running. Its replaced by the runit service so its supervised by runit and not just some random daemon in the background.
The whole description of the problem and what the check does. |
The problem boils down to a race condition. Sometimes, but not always, the keyd program is launched but the keyboard is unresponsive until the process is terminated. Based on the linked issue, the reason for this is because keyd process launched after the early udevd process, but before the udevd runit service. So, when the runit service starts for udevd, it kills the early udevd process causing keyd to stop working as expected. This PR adds a check to ensure that keyd doesn't launch until the the udevd runit service has launched. |
This should be mentioned in the services, otherwise the "check" makes no sense at all. |
Are you suggesting that I should merely leave a comment in the service file about this issue? Won't peoples custom solutions be overwritten on updates then? The check verifies that the supervised udevd process is the current running udevd process. I thought it was pretty self-explanatory. |
No there should be a comment to why this check exist.
nobody will know why this check exists in the first place without having to track down the PR where it has been introduced. |
OK, thank you, this makes much more sense.
This also makes much more sense. Will it be sufficient to edit the commit message in addition to a comment? |
Should probably be in both, because its not clear from just the command compared to |
Sounds good.
|
Sometimes when starting the keyd service, the keyboard can become unresponsive. This is the result of keyd starting when the early udevd process is still running but before the udevd runit service has started. The udevd runit service kills the early udevd process causing the keyboard to become unresponsive until the keyd process has been terminated. The below code verifies that the supervised udevd process is the same as the currently running udevd process. Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit.
@Duncaen I think this is all set? Let me know if I missed something. |
Testing the changes
This PR adds a check to the runit service for
keyd
. Sometimes, when starting thekeyd
service, the keyboard can become unresponsive. This was the result of theudevd
process being replaced whilekeyd
was launching. See here for more details.