For test purposes I installed alpine on my laptop. (It contains pretty much only the minimal default packages and wayland/sway.)

When I try to run sway everything looks fine, but mouse and keyboard do not work. sway uses wayland which uses libinput. Therefore I tried libinput list-devices which does not give any output, which explains the behavior of sway.

Any idea why libinput does not recognize any input devices?

Do I need to configure libinput in any way? Do I maybe miss some additional package?

(Any hint to suitable documentation would be great, too.)

Just double checked it again: if I boot the install image of arch linux, libinput lists all devices fine. If I boot from the alpine image, the output is emtpty. (In both cases /var/input/event* is present.)

1 Answer 1


I am not sure which documentation gives details but if you were to try and compile libinput on Alpine linux you would notice that it requires udev. udev has been borged by systemd but the eudev project (Gentoo to the rescue) will provide what you need. To begin you must install eudev and start the udev service (and you might want to add it to the default runlevel):

/etc/init.d/udev start

Now udev is ready and listening but does not know about any input devices. Check to see if you have the appropriate udev rules file, it should be called 80-libinput-device-groups.rules in /etc/udev/rules.d or /lib/udev/rules.d this file is very important!! Now trigger those rules by receiving events from the kernel with udevadm:

udevadm trigger

There is a file in /etc/init.d called udev-trigger... this is probably related somehow. Now to see a list of devices:

libinput list-devices

You should see a list of devices.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .