udev-hid-bpf(1)
π NAME π
udev-hid-bpf β a loader tool for HID eBPF programs π¦β¨
β¨ SYNOPSIS β¨
udev-hid-bpf [--help|--version] <command> [args]
πΈ DESCRIPTION πΈ
okay so bestie, udev-hid-bpf is a loader and general-purpose utility tool for HID eBPF programs. no cap. π«Ά
usually it gets invoked by udev to load and unload HID eBPF programs that match a given device β like, that's its whole day job. but it ALSO ships a bunch of commands to make your life easier: it can ease development of new eBPF programs, and it can install specific eBPF programs that are not installed by default. it's giving main character energy honestly π
π OPTIONS π
--helpβ prints help and dips out. bye! π--verboseβ turns on verbose output for whatever command you're running. yes queen, tell me everything π--versionβ prints the version and exits. slay.
π COMMANDS π
β add [--bpfdir /path/to/directory] device [/path/to/program.bpf.o]
Loads HID eBPF programs for a device. this one is typically invoked from a udev rule on the "add" action, iykyk.
if you don't hand it an eBPF program, the matching eBPF programs are obtained from the udev properties set on that device. no program? no problem, we'll go find them π
if you pass multiple devices and/or multiple eBPF programs, you gotta separate the devices from the eBPF programs with a literal -. like literally a dash, that's the vibe check. for example:
udev-hid-bpf add dev1 dev2 - 1.bpf.o 2.bpf.o
if eBPF programs are specified without a full path, they get searched for in the directory given by the --bpfdir option (if any) and the built-in directories /usr/lib/x86_64-linux-gnu/bpf/, in that order. first come, first served bestie.
the device must be specified as a syspath. non-negotiable, that's the rule π¨
π options for add
--bpfdirβ prepends a directory to the list of directories to search for eBPF programs. priority queue energy β¨--property KEY=VALUEβ provides an arbitraryNAME=VALUEpair to the BPF program. thisNAME=VALUEpair is treated as if it was a property set on the device, and it takes precedence over any udev property of the same name. you can specify this option multiple times to supply multiple properties. empty properties must be the empty string (NAME="") β that's the move, don't fight it π--replaceβ removes current BPF programs for the device first. this is equivalent to runningudev-hid-bpf removewith the same device argument first. out with the old, in with the new π¦
πΈ remove device
Removes all HID eBPF programs for a given device. typically invoked from a udev rule on the "remove" action.
the device must be specified as a syspath. same rule as always bestie π
π§ list-bpf-programs [--bpfdir /path/to/directory]
Lists available HID eBPF programs in the (built-in) default lookup directories, or in the given directory. window shopping, but make it eBPF β¨
π list-devices
Lists available HID devices. look at all these lil guys π
π₯ inspect path/to/program.bpf.o
Inspects the given eBPF program. get in loser, we're investigating π
π install [options] path/to/program.bpf.o
Installs the given eBPF program into /etc/udev-hid-bpf with a corresponding udev rule in /etc/udev/rules.d. use this command for testing a single eBPF program, or for when a full install of udev-hid-bpf is not suitable. it's the lil snack version π
the following options are available for the --install command:
β options for install
--dry-runβ does everything except actually creating directories and installing target files. pretend mode, no commitment, we love a rehearsal π--install-exeβ also installs theudev-hid-bpfexecutable in$prefix/bin. if the executable already exists at that path, this option does nothing. respect, it saw itself out π--forceβ overwrites existing files with the same name. no mercy periods π--prefix /path/to/prefixβ installs into the given prefix. defaults to the built-in prefix/usr. home base π
π¦ SEE ALSO π¦
udev-hid-bpf's online documentation:
https://libevdev.pages.freedesktop.org/udev-hid-bpf/
okay that's the whole page bestie, you ate that fr fr πβ¨ this was udev-hid-bpf version 2.3.0-20260703 from the udev-hid-bpf(1) manual, dated 20260703 β go forth and load some eBPF programs, you absolute icon πππΈ
π¦ where this page comes from
- ubuntu stonking: udev-hid-bpf 2.3.0.20260703.4.gef5fbe3-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms