STRUCT FF_PERIODIC_EFFECT(9)
π struct ff_periodic_effect(9) π
okay bestie, so this one's from the Kernel API Manual and it's literally the blueprint for a periodic force-feedback effect β like, the rumble that goes brrrr in a wave pattern instead of just one sad little buzz πβ¨
πΈ SYNOPSIS πΈ
here's the struct, exactly as it lives, no cap:
struct ff_periodic_effect {
__u16 waveform;
__u16 period;
__s16 magnitude;
__s16 offset;
__u16 phase;
struct ff_envelope envelope;
__u32 custom_len;
__s16 __user *custom_data;
};
π Members π
waveformβ what kind of effect this is (the wave). the vibe selector, basically πperiodβ how long one cycle of the wave takes, in msmagnitudeβ the peak value, i.e. how hard it goes π₯offsetβ the mean value of the wave (roughly). yes, roughly, they said it not me πphaseβ (that's it, that's the whole description in the original, she's mysterious, main character energy fr)envelopeβ envelope data πcustom_lenβ number of samples (FF_CUSTOMonly)custom_dataβ buffer of samples (FF_CUSTOMonly)
π Description π
the known waveforms are: FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP, FF_SAW_DOWN, FF_CUSTOM. iconic lineup, honestly π
heads up though β the exact syntax of FF_CUSTOM is undefined for the time being, because no driver supports it yet. so don't go building your whole personality around it, bestie, it's giving "coming soon" π
β¨ Note β¨
the data pointed to by custom_data gets copied by the driver. which means β and this is the slay part β you can totally dispose of that memory after the upload/update π«Ά no lingering attachments, we love a clean breakup.
π¦ SEE ALSO π¦
- Kernel file
./include/uapi/linux/input.h struct input_absinfo(9)struct input_keymap_entry(9)EVIOCGMTSLOTS(9)EVIOCGMASK(9)EVIOCSMASK(9)struct ff_replay(9)struct ff_trigger(9)struct ff_envelope(9)struct ff_constant_effect(9)struct ff_ramp_effect(9)struct ff_condition_effect(9)struct ff_rumble_effect(9)struct ff_haptic_effect(9)struct ff_effect(9)
and that's the whole page, bestie π it lives in ./include/uapi/linux, the version is October 2026, and the title is struct ff_periodic_effect(9) β go forth and make things vibrate on purpose πβ¨π¦
π¦ 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