3

I want to troubleshoot why the graphic tables is active only if it is connected when Xorg is started (and stops working with spamming of Xorg.0.log if I reconnect it).

As far as I know, udev-based hotplugging works by Xorg somehow staying connected with udev after start.

  • Where are details of this? What mechanism of Xorg keeping in touch with udev? Direct socket connection? D-Bus?
  • What messages to look in udev or Xorg logs for missing connection between udev and Xorg?
  • How to manually trigger Xorg's re-enumerating of input devices?
Vi.
  • 16,755
  • 32
  • 111
  • 189

1 Answers1

3

It is using mechanisms exposed by libudev.

By digging into the Xorg source code, we can see in udev.c that it is calling udev_monitor_new_from_netlink.

Then, by looking into udev source code, we can see in libudev-monitor.c that this function eventually creates a netlink socket.

I don't know of an easy way to "sniff" netlink sockets; but there is probably some example code in udev that you can compile and run to subscribe to the same source of events and display some verbose information.

In your situation, I would try this:

  • can I disconnect/reconnect other input devices? (e.g. any USB mouse or keyboard)
  • what do I see in udev logs when I disconnect/reconnect the tablet?

And, by the way, what kind of messages are spammed in X logs?

jpetazzo
  • 249
  • 2
  • 6
  • Something about inaccessibility of the respective input device. Udev and Xorg were running in separate network namespaces and only path-based UNIX sockets pierce though network namespace bordres transparently. – Vi. May 19 '14 at 21:49
  • Is there a tool like socat, but for AF_NETLINK so sockets? (I though NETLINK is for kernel<->userspace, not for userspace<->userspace...) – Vi. May 19 '14 at 21:49
  • @Vi. Maybe [`udevadm monitor`](http://man7.org/linux/man-pages/man8/udevadm.8.html) is what you're looking for? – Olaf Dietsche May 17 '20 at 14:23