[systemd-devel] systemd service freeze my keyboard and mouse for few seconds in gdm screen

Ahmad Ismail ismail783 at gmail.com
Sat Jul 29 14:21:18 UTC 2023


I have a service like:

sudo tee /etc/systemd/system/index-directories.service << END
[Unit]
Description=Index Directories Using Plocate
RequiresMountsFor=/media/ismail/8TBRaid0
RequiresMountsFor=/media/ismail/SSDWorking

[Service]
ExecStart=/home/ismail/.dotfiles/.resources/bash-scripts-rofi/index-directories
User=ismail
Group=ismail
Type=exec
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
END

I run it using:

sudo systemctl daemon-reload
sudo systemctl start index-directories.service
sudo systemctl enable index-directories.service

Its simple job is to run the script index-directories at startup once.
(This is because for the first run the script takes some time. Afterwards
it does not take that much time. So I thought it would be better if I ran
it in the background once.)

Now the issue is when i enable the service, after reboot it freeze the
keyboard and mouse for ~10sec in gdm screen. Then it unfreeze the keyboard
and mouse. I mean, it seems like until the service is finished i can not
use my keyboard or mouse.

Why is this happening? How to run the service so that it does not freeze my
keyboard and mouse.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230729/16514302/attachment.htm>


More information about the systemd-devel mailing list