{"id":19061974,"url":"https://github.com/wulf7/libudev-devd","last_synced_at":"2025-04-18T01:31:57.321Z","repository":{"id":45505301,"uuid":"44179726","full_name":"wulf7/libudev-devd","owner":"wulf7","description":"libudev-compatible interface for devd","archived":false,"fork":false,"pushed_at":"2024-08-03T00:17:23.000Z","size":276,"stargazers_count":9,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T00:47:09.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wulf7.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-13T13:53:56.000Z","updated_at":"2024-08-04T00:47:09.156Z","dependencies_parsed_at":"2024-06-13T15:04:20.116Z","dependency_job_id":"fc96bf9e-9d1c-46aa-bb22-1390839decbd","html_url":"https://github.com/wulf7/libudev-devd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulf7%2Flibudev-devd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulf7%2Flibudev-devd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulf7%2Flibudev-devd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wulf7%2Flibudev-devd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wulf7","download_url":"https://codeload.github.com/wulf7/libudev-devd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223770454,"owners_count":17199685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T00:23:59.178Z","updated_at":"2024-11-09T00:24:05.518Z","avatar_url":"https://github.com/wulf7.png","language":"C","readme":"libudev-compatible interface for devd\n=====================================\n\nIntended to work with xorg-server and libinput\n\nInstallation:\n\n1. Install multimedia/v4l_compat port. In case of evdev-enabled kernels it\n   can be patched to use system evdev headers instead of webcamd-supplied\n\n\n2. Build and install libudev-devd\n\nexport CFLAGS=-I/usr/local/include\nexport CPPFLAGS=-I/usr/local/include\ncd libudev-devd\n./autogen.sh\n./configure\nmake \u0026\u0026 sudo make install\n\n\n3. recompile x11-servers/xorg-server with DEVD port option disabled and\nfollowing configure args added: --enable-config-udev=yes \\\n    --disable-config-udev-kms --disable-systemd-logind\n\nIf you are going to use /dev/kbdmux0 as keyboard input device patch[1] should\nbe applied to config/udev.c file in xorg distribution\n\n\n4. Apply changes to xorg.conf\n\nRemove all InputDevice from \"ServerLayout\" section of xorg.conf\n\nFor gsoc2014 evdev-enabled kernels add following lines to xorg.conf\n\n\u003c\u003c\u003c CUT\n\n# Use the libinput driver for all event devices\nSection \"InputClass\"\n\tIdentifier\t\"evdev\"\n\tDriver\t\t\"libinput\"\n#\tDriver\t\t\"evdev\"\n\tMatchDevicePath\t\"/dev/input/event*\"\nEndSection\n\n# Explicitly set xkb_rules to evdev for keyboards\nSection \"InputClass\"\n\tIdentifier\t\"evdev keyboard\"\n\tMatchIsKeyboard\t\"on\"\n\tMatchDevicePath\t\"/dev/input/event*\"\n        Option\t\t\"XkbRules\" \"evdev\"\nEndSection\n\n# Disable kbdmux to not receive keyboard events twice\nSection \"InputClass\"\n\tIdentifier\t\"evdev disable kbdmux\"\n\tMatchIsKeyboard\t\"on\"\n\tMatchProduct\t\"System keyboard multiplexer\"\n\tMatchDevicePath\t\"/dev/input/event*\"\n\tOption\t\t\"Ignore\" \"true\"\nEndSection\n\n\u003c\u003c\u003cCUT\n\nFor stock kernels add following lines to xorg.conf\n\n\u003c\u003c\u003cCUT\n\n# Use the libinput driver for all event devices\nSection \"InputClass\"\n\tIdentifier\t\"evdev\"\n\tMatchDevicePath\t\"/dev/input/event*\"\n\tDriver\t\t\"evdev\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"kbdmux\"\n\tMatchDevicePath\t\"/dev/kbdmux*\"\n\tDriver\t\t\"kbd\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"System mouse\"\n\tMatchDevicePath\t\"/dev/sysmouse\"\n\tDriver\t\t\"mouse\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"PS/2 mouse\"\n\tMatchDevicePath\t\"/dev/psm*\"\n\tDriver\t\t\"mouse\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"USB mouses\"\n\tMatchDevicePath\t\"/dev/ums*\"\n\tDriver\t\t\"mouse\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"Joystick\"\n\tMatchDevicePath \"/dev/joy*\"\n\tDriver\t\t\"mouse\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"Apple touchpad\"\n\tMatchDevicePath\t\"/dev/atp*\"\n\tDriver\t\t\"mouse\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"Wellspring touchpad\"\n\tMatchDevicePath\t\"/dev/wsp*\"\n\tDriver\t\t\"mouse\"\nEndSection\n\nSection \"InputClass\"\n\tIdentifier\t\"eGalax touchscreen\"\n\tMatchDevicePath\t\"/dev/uep*\"\n\tDriver\t\t\"egalax\"\nEndSection\n\n\u003c\u003c\u003cCUT\n\n\n5. Fetch and install libinput port by Jan Kokemuller???\n\nFor gsoc2014 evdev-enabled kernels only:\n\nfetch https://github.com/wulf7/libinput/archive/master.tar.gz\ntar zxvf master.tar.gz\ncd libinput-master\n./autogen.sh\nmake \u0026\u0026 sudo make install\n\n\n6. Fetch and install xf86-input-libinput\n\nFor gsoc2014 evdev-enabled kernels only:\n\nfetch http://xorg.freedesktop.org/releases/individual/driver/xf86-input-libinput-0.14.0.tar.bz2\n..\n..\n..\n\n\n7. Build and install libudev-devd for Linuxolator\n\ninstall devel/linux-c7-devtools, devel/autoconf and devel/automake\nthan compile libudev.so library and install it somewhere under /compat/linux.\n\nTo build and install 64-bit library:\n\ncd libudev-devd\n./autogen.sh\nenv CC=\"/compat/linux/bin/gcc\" CFLAGS=\"--sysroot /compat/linux\" ./configure --libdir=/usr/lib64/shims\nmake\nsudo make install-exec DESTDIR=/compat/linux\n\nTo build and install 32-bit library:\n\ncd libudev-devd\n./autogen.sh\nenv CC=\"/compat/linux/bin/gcc\" CFLAGS=\"--sysroot /compat/linux -m32\" ./configure --libdir=/usr/lib/shims\nmake\nsudo make install-exec DESTDIR=/compat/linux\n\nTo run my_64bit_app or my_32bit_app with libudev overloaded with libudev-devd use\n\nLD_PRELOAD=/usr/lib64/shims/libudev.so my_64bit_app\n\nor\n\nLD_PRELOAD=/usr/lib/shims/libudev.so my_32bit_app\n\n\n8. Appendix\n\n[1] config/udev.c patch. Just place content between two \u003c\u003c\u003cCUTs as\n/usr/ports/x11-servers/xorg-server/files/patch-config_udev.c file\n\n\u003c\u003c\u003cCUT\n+--- config/udev.c.orig\t2015-05-21 17:23:54.000000000 +0300\n++++ config/udev.c\t2015-10-13 17:37:05.063290000 +0300\n+@@ -29,6 +29,7 @@\n+ \n+ #include \u003clibudev.h\u003e\n+ #include \u003cctype.h\u003e\n++#include \u003cfcntl.h\u003e\n+ #include \u003cunistd.h\u003e\n+ \n+ #include \"input.h\"\n+@@ -188,6 +189,20 @@ device_added(struct udev_device *udev_de\n+         attrs.product = strdup(name);\n+     input_options = input_option_new(input_options, \"name\", name);\n+     input_options = input_option_new(input_options, \"path\", path);\n++    if(strstr(path, \"kbdmux\") != NULL) {\n++        /*\n++         * Don't pass \"device\" option if the keyboard is already attached\n++         * to the console (ie. open() fails). This would activate a special\n++         * logic in xf86-input-keyboard. Prevent any other attached to console\n++         * keyboards being processed. There can be only one such device.\n++         */\n++        int fd = open(path, O_RDONLY);\n++        if (fd \u003e -1) {\n++            close(fd);\n++            input_options = input_option_new(input_options, \"device\", path);\n++        }\n++    }\n++    else\n+     input_options = input_option_new(input_options, \"device\", path);\n+     input_options = input_option_new(input_options, \"major\", itoa(major(devnum)));\n+     input_options = input_option_new(input_options, \"minor\", itoa(minor(devnum)));\n\u003c\u003c\u003cCUT\n","funding_links":[],"categories":["systemd-udev"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwulf7%2Flibudev-devd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwulf7%2Flibudev-devd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwulf7%2Flibudev-devd/lists"}