Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wulf7/libudev-devd
libudev-compatible interface for devd
https://github.com/wulf7/libudev-devd
Last synced: 5 days ago
JSON representation
libudev-compatible interface for devd
- Host: GitHub
- URL: https://github.com/wulf7/libudev-devd
- Owner: wulf7
- Created: 2015-10-13T13:53:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T00:17:23.000Z (3 months ago)
- Last Synced: 2024-08-04T00:47:09.156Z (3 months ago)
- Language: C
- Homepage:
- Size: 270 KB
- Stars: 9
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome-systemd - libudev-devd - compatible (systemd-udev)
- awesome-systemd - libudev-devd - compatible (systemd-udev)
README
libudev-compatible interface for devd
=====================================Intended to work with xorg-server and libinput
Installation:
1. Install multimedia/v4l_compat port. In case of evdev-enabled kernels it
can be patched to use system evdev headers instead of webcamd-supplied2. Build and install libudev-devd
export CFLAGS=-I/usr/local/include
export CPPFLAGS=-I/usr/local/include
cd libudev-devd
./autogen.sh
./configure
make && sudo make install3. recompile x11-servers/xorg-server with DEVD port option disabled and
following configure args added: --enable-config-udev=yes \
--disable-config-udev-kms --disable-systemd-logindIf you are going to use /dev/kbdmux0 as keyboard input device patch[1] should
be applied to config/udev.c file in xorg distribution4. Apply changes to xorg.conf
Remove all InputDevice from "ServerLayout" section of xorg.conf
For gsoc2014 evdev-enabled kernels add following lines to xorg.conf
<<< CUT
# Use the libinput driver for all event devices
Section "InputClass"
Identifier "evdev"
Driver "libinput"
# Driver "evdev"
MatchDevicePath "/dev/input/event*"
EndSection# Explicitly set xkb_rules to evdev for keyboards
Section "InputClass"
Identifier "evdev keyboard"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Option "XkbRules" "evdev"
EndSection# Disable kbdmux to not receive keyboard events twice
Section "InputClass"
Identifier "evdev disable kbdmux"
MatchIsKeyboard "on"
MatchProduct "System keyboard multiplexer"
MatchDevicePath "/dev/input/event*"
Option "Ignore" "true"
EndSection<<
+ #include
++#include
+ #include
+
+ #include "input.h"
+@@ -188,6 +189,20 @@ device_added(struct udev_device *udev_de
+ attrs.product = strdup(name);
+ input_options = input_option_new(input_options, "name", name);
+ input_options = input_option_new(input_options, "path", path);
++ if(strstr(path, "kbdmux") != NULL) {
++ /*
++ * Don't pass "device" option if the keyboard is already attached
++ * to the console (ie. open() fails). This would activate a special
++ * logic in xf86-input-keyboard. Prevent any other attached to console
++ * keyboards being processed. There can be only one such device.
++ */
++ int fd = open(path, O_RDONLY);
++ if (fd > -1) {
++ close(fd);
++ input_options = input_option_new(input_options, "device", path);
++ }
++ }
++ else
+ input_options = input_option_new(input_options, "device", path);
+ input_options = input_option_new(input_options, "major", itoa(major(devnum)));
+ input_options = input_option_new(input_options, "minor", itoa(minor(devnum)));
<<