UI_ABS_SETUP(9)
πΈ UI_ABS_SETUP β the kernel API manual, but make it make sense πΈ
okay so bestie, welcome to the Kernel API Manual page for UI_ABS_SETUP π
this one's a kernel-level ioctl situation, so grab your iced coffee and let's get into it β¨
β¨ NAME β¨
UI_ABS_SETUP β literally just: set absolute axis information for the device you're about to set up π
β¨ SYNOPSIS β¨
UI_ABS_SETUP
that's it. that's the whole synopsis. iconic, honestly π
β¨ DESCRIPTION β¨
okay so this ioctl sets one absolute axis information for the input device that's about to be created π¦ it supersedes the old struct uinput_user_dev method β you know, the ancient one that wrote part of this data plus the content of UI_DEV_SETUP via write. we've moved on, we're thriving π
The ioctl takes a struct uinput_abs_setup object as its argument, no cap. The fields of that object are:
codeβ the corresponding input code associated with this axis (ABS_X,ABS_Y, etc...) πabsinfoβ seestruct input_absinfofor the description of this field. This field gets copied unchanged into the kernel for the specified axis, fr fr. And here's the slay part: if the axis isn't enabled viaUI_SET_ABSBIT, this ioctl will enable it for you π
This ioctl can be called multiple times and it will just overwrite previous values. no drama, no hard feelings πΈ
β οΈ if this ioctl fails with-EINVAL, it's recommended that you use the olduinput_user_devmethod viawriteas a fallback β that's for when you're running on an old kernel that doesn't support this ioctl. backwards compatibility queen π«Ά
And now the error vibes, because we respect them:
-EINVALβ if it's not supported, or if you passed incorrect values π-ENOMEMβ if the kernel runs out of memory π-EFAULTβ if the passeduinput_setupobject cannot be read/written π
β οΈ big one: if this call fails, partial data may have already been applied to the internal device. so like... not a clean rollback. be aware, bestie.
β¨ SEE ALSO β¨
- Kernel file
./include/uapi/linux/uinput.h UI_DEV_SETUP(9)UI_GET_SYSNAME(9)UI_GET_VERSION(9)
and that's the page!! π§ from the kernel files at ./include/uapi/linux, dated October 2026 β go forth and set those absolute axes, you absolute main character πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms