LM(4)

πŸ“¦
version 11.0 Β· 2 versions
, in nixpkgs unstable

πŸŽ€ LM(4) β€” the hardware monitor girlies πŸŽ€

okay so this is the manual page for lm, aka the National Semiconductor LM78, LM79 and compatible hardware monitors driver. it's a kernel interfaces manual, and i'm gonna walk you through it like we're texting at 1am πŸ’…


✨ SYNOPSIS ✨

like, here's how you attach these things. copy-paste energy, no cap:

lm0 at isa? port 0x280 flags 0x00
lm1 at isa? port 0x290 flags 0x00
lm2 at isa? port 0x310 flags 0x00
lm3 at isa? port 0xa00 flags 0x00
lm0 at pnpbios0 index ? flags 0x00
lm0 at iic? addr 0x2e flags 0x00
lm* at wbsio?

that's it. that's the whole vibe check πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

so the lm driver is the one that provides support for the National Semiconductor LM series hardware monitors and register-compatible chips, and it hooks them up to the envsys(4) API. bestie, it's literally how your machine tells you its temperatures and voltages 🫢

the og LM78 hardware monitor supports 11 sensors. and yes, i'm listing every single one because i am obsessed with completeness:

  • IN0 β€” uV DC β€” Core voltage
  • IN1 β€” uV DC β€” unknown (mystery sensor, main character energy honestly)
  • IN2 β€” uV DC β€” +3.3V
  • IN3 β€” uV DC β€” +5V
  • IN4 β€” uV DC β€” +12V
  • IN5 β€” uV DC β€” -12V
  • IN6 β€” uV DC β€” -5V
  • Temp β€” uK β€” Motherboard Temperature
  • Fan0 β€” RPM β€” Fan
  • Fan1 β€” RPM β€” Chassis Fan
  • Fan2 β€” RPM β€” Fan

for other devices, the sensors' names and numbers will be different. so don't come for me when your IN3 isn't doing what you thought 😭

also, lowkey important: due to hardware limitations, fresh sensor data is only available every 2 seconds. so if you're refreshing faster than that expecting new numbers… she's not gonna give them to you πŸ’€

🌸 HARDWARE 🌸

the chips that the lm driver supports include, in no particular order because they're all iconic:

  • National Semiconductor LM78, LM78-J, LM79, and LM81.
  • Nuvoton NCT5104D, NCT6775F, NCT6776F, NCT6102D, NCT6104D, NCT6106D, NCT6779D and NCT679[12356789]D.
  • Winbond W83627HF*, W83627THF*, W83627EHF*, W83627DHG*, W83637HF*, W83697HF*, W83781D, W83782D*, W83783S*, W83791D*, W83791SD, and W83792D.
  • ASUS AS99127F.

the little asterisk ✨

okay so for most of the Winbond chips (the ones with a * above, iykyk), you can specify the flags configuration option to pick which type of temperature sensor it is:

  • flags 0 β€” Thermistor diode (Power-On default)
  • flags 1 β€” Pentium-II diode
  • flags 2 β€” 2N3904 Bipolar
  • flags 4 β€” Thermistor diode

that's the whole list, don't skip any of them, they all matter πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're the friend group:


πŸ‘‘ HISTORY πŸ‘‘

the lm device appeared in NetBSD 1.5. she's been around. she's a legacy icon. periodt.


🌈 CAVEATS 🌈

ngl this is the part where you gotta be careful:

some vendors connect these chips to non-standard thermal diodes and resistors. and that will result in bogus sensor values. like, completely made-up numbers. so if your temps look unhinged, it might not be your fault, it's the wiring 🫠

πŸ’€ BUGS πŸ’€

the honest-to-god tea:

  • Interrupt support is unimplemented. yeah. it's just not there 😭
  • there are currently no known pnpbios IDs assigned to LM chips. so that's a thing.

okay bestie that's the whole page, you ate it, i'm so proud of you πŸ’…βœ¨

this one's from the Debian fam, dated December 15, 2022, and it's the LM(4) page β€” go forth and read your sensors responsibly πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from