Arch: cannot open input layer error
acpid with netlink and input layer support
Brought to you by:
tedfelix
Hi,
on ArchLinux I opened the following bug report https://bugs.archlinux.org/task/39583
I've updated acpid to the latest .23 version but the problem still occur.
Long story short, acpid seems to start too fast so it returns the following error:
acpid[163]: cannot open input layer
acpid[163]: inotify_add_watch() failed: No such file or directory (2)
and so, some events cannot be captured.
If I restart the service (using systemd), everything goes fine and every event is captured
Can you fix it?
Best Regards
Probably not. Problems like this are usually caused by configuration files. In this case, the systemd configuration file for acpid is allowing acpid to come up too early. The workaround in the bug report that you reference (adding "After=multi-user.target" and "Type=simple" to the config file) should fix the issue. Have you tried this?
If that doesn't fix the problem, then I'd have a look at the systemd configuration file for acpid in one of the big name distros. Like Fedora. They've been running acpid under systemd for quite some time now with no problems.
Report back what you find as it might be helpful to others. Thanks.
I can confirm you that by editing the .service file the issue is gone.
The systemd file is shipped with the acpid2 package or every distro has its own?
Thanks a lot
Last edit: Francesco Antonacci 2014-09-03
This is great to hear. Thanks. If this comes up again, we'll know what's going on now. I haven't used systemd yet, so this is all new to me.
Every distro has their own. It's really up to Arch to fix their systemd config file. However, there's a lot of pressure to close bugs in a distro. So, it's not unusual to see a bug being tossed upstream like this one. acpid isn't very popular, so you're probably the first to notice this issue in Arch. I would recommend either re-opening the original bug report against Arch or opening a new one and including a patch to fix the systemd .service file. That should get their attention and get this fixed for you and everyone else using Arch. Good luck. And thanks again for the bug report.
Add After=multi-user.target to acpid.service as no sense, as acpid is pulled by multi-user.target.
So to reach this target, you need to have a service which have to be started after the target is reached.
We use Type=forking, because acpid using a socket and systemd, consider unit started as soon as it as forked in simple mode. The correct way is to used sd_notify (not supported by acpid) or use forking mode. Anyway, that seems unrelated to the bug report.
Could you tell me which layer is missing, to find out how we can delay systemd execution properly?
Why acpid doesn't exit if it cannot open be started correctly?
Last edit: Sebastien Luttringer 2014-10-11
from acpid2 code acpid2 expect /dev/input/event* being populated before it starts. I added systemd-udev-settle.service to the list of systemd required unit.
That should fix the issue properly.
Hi Sebastien,
I confirm you the new package fixes the issue.
Thanks a lot.
Regards
-f
On 10/25/2014 02:02 AM, Sebastien Luttringer wrote:
Related
Tickets:
#3