qtile: [SOLVED] Libinput does not work as expected on wayland

The issue:

Libinput is not working as expected for qtile (no issues on manjaro-gnome-liveusb). I expected e.g. my touchpad to work (enabling tap), but nothing happened and defaults were loaded. I think this is a bug.

The bug / logs:

  • In the tty after closing qtile (not in the qtile log) I can see the same as in this discussion as the very first message libinput error: failed to load the device quirks from /usr/share/libinput and /etc/libinput/local-overrides.quirks. However my qtile starts normally and everything else works.
  • in the qtile log there is a relevant line: ERROR libqtile inputs.py:_configure_pointer():L251 Qtile was not built with libinput configuration support. For support, pywlroots must be installed at build time.

What I did (reproducability):

  • installed from source (pip install --user .) following the correct order of package installs and running make run-ffibuild after installing dependencies and before pip install
  • default config

I have no idea what is wrong and where this issue even originates (my debugging efforts were fruitless, nothing in pywlroots or pywayland). Any help is welcome.

System Details

  • Asus Vivobook M4103QA
  • Linux: 5.15.59-gentoo-dist
  • qtile version: 0.21.1.dev87+g2ecbb5fd
  • wlroots: 0.15.1
  • pywlroots: 0.15.19
  • cairocffi: 1.3.0
  • cffi: 1.15.1
  • xcffib: 0.11.1

Required:

  • I have searched past issues to see if this bug has already been reported.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

@clotodex Maybe try to link libinput in the same way? Maybe more libs are broken.

Please re-open if still an issue with the latest release

@clotodex i indeed have all those installed

EDIT: wlroots package on arch is out of date

It’s excellent that you’ve found a solution. I think I can reproduce the issue though instead of the error you get, the whole process exits silently when it tries to set a keyboard’s keymap at startup, inside a pywlroots cffi function. Similarly your allpatch.sh script executed on pywlroots’ and pywayland’s .lib folders fixes the issue.

Normally it works without issue for me because I run all the python deps from source. The issue persists when installing deps with pip, either into user folders in .local or into a venv.

This is definitely a huge issue, and I don’t really know where it’s coming from, whether it’s us (probably) or some part of the build machinery. In the meantime I’ll re-open this because as far as I can tell, pip install qtile is therefore completely non-functional.

SOLVED! My latest update to the install script reproducibly solves the issue.

Reason for the issue: cffi is a bit finicky. The trick:

  • patch all libraries, especially ffi libraries in the python environment (as discussed in the beginning of the thread)
  • BEFORE pip install . you need to manually build qtile with python setup.py build --build-scripts=scripts install.

While the make run-ffibuild executes correctly and builds the c files etc, none of it is later transferred to the virtualenv (or user packages) => no _libinput => no libinput support.

@m-col I don’t know if this can be fixed in the setup.py script or with other installation advice.

In any case I see this issue as solved for now.

@oddlama seems to have found a workaround for the quirks issue. Logs from the chatroom (thanks @oddlama):

[ 18:10 ] oddlama : I had the same issue
[ 18:10 ] oddlama : The solution is quite simple
[ 18:13 ] oddlama : dannycolin: You need to remove libxkbcommon-de59cad2.so.0.0.0 from wherever it was installed to (in case of pip probably .local/lib/python3.10/site-packages/pywlroots.libs/libxkbcommon-de59cad2.so.0.0.0) and replace it with a link to your system's libxkbcommon
[ 18:13 ] oddlama : for me it was ln -s /usr/lib64/libxkbcommon.so path/to/libxkbcommon-de59cad2.so.0.0.0

I’m not sure what the underlying cause is, be it build steps in qtile, pywlroots or python-xkbcommon, but perhaps this workaround will do in the meantime until a proper fix is determined?