lwmi_om_fan_get_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lwmi_om_fan_get_set β€” a Kernel API Manual moment ✨

okay so bestie, welcome to the lwmi_om_fan_get_set(9) page, straight out of the Kernel API Manual ✨ this one's short and sweet and honestly it's giving "little function, big job" energy πŸŒ€


🌸 NAME 🌸

lwmi_om_fan_get_set β€” literally just: get the fan RPM, or set the fan RPM, for whichever fan you point at πŸ“


✨ SYNOPSIS ✨

int lwmi_om_fan_get_set (struct lwmi_om_priv *priv , int channel , u32 *val , bool set );

like, that's the whole signature, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • priv β€” the driver's private data structure. the backstage pass, the VIP lanyard, the whole personality holder 🫢
  • channel β€” which fan we're talking about. it's a fan channel index and yes it's 0-based, so the first one is 0, not 1, okay bestie 😭
  • val β€” a pointer to the value. it's an input when you're setting, and an output when you're getting. one pointer, two jobs, main character energy πŸ‘‘
  • set β€” true to set the value, false to get the value. that's it, that's the switch 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

so what actually happens? the function talks to the WMI interface and does one of two things: either it retrieves the current fan RPM, or it sets the target fan RPM. that's the entire vibe check πŸ”₯

which one you get depends on that set bool β€” true means you're pushing a value in, false means you're pulling the current one out. pick your fighter πŸ’€


⭐ RETURN ⭐

0 on success, or an error code. so if it hands you back a 0, slay, you're done πŸŽ‰ anything else means something went sideways and you should go look at that error code, fr fr πŸ™ˆ


🌈 SEE ALSO 🌈

the kernel file lives right here, go read it when you're feeling brave:

./drivers/platform/x86/lenovo/wmi-other.c

and here's the whole friend group, all present and accounted for πŸ’–


ngl this page is tiny but it ate πŸ’… get your RPM, set your RPM, respect the 0-based index, and go touch some grass (or, y'know, read wmi-other.c) 🧚

kisses, this gem comes to you from ./drivers/platform/x86/lenovo, dated October 2026 β€” screenshot it, tattoo it, whatever, it's iconic β­πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from