acpi_video_device_EDID(9)
π acpi_video_device_EDID β¨
okay so bestie, gather round, because today we're reading a function from the Kernel API Manual and honestly? it's iconic. it's giving "small function, big job" energy. it lives in the kernel, it talks to your monitor, and it's literally just trying to find out what kind of screen you plugged in π₯οΈπΈ
β¨ SYNOPSIS β¨
int acpi_video_device_EDID (struct acpi_video_device *device , void
**edid , int length );
that's the whole signature, no cap. three arguments, one int coming back at you π«Ά
π ARGUMENTS π
deviceβ the video output device, bestie. like your LCD, your CRT, whatever..means here (yes the original literally saysLCD, CRT, ..and we're keeping it exactly like that π ). it's the thing you're asking about.edidβ this is the address where the returned EDID pointer gets dropped off. think of it as a lil mailbox π¬ and the function is the mail carrier.lengthβ the_DDClength you wanna request. and listen, this one's important: it must be a multiple of 128. not vibing with 128? the function's not vibing with you. no exceptions π
πΈ DESCRIPTION πΈ
so what does it actually do? it gets the EDID from ACPI _DDC. that's it, that's the whole plot π¦
on success, a pointer to the EDID data gets written to the edid address, and the length of the EDID is returned. and here's the part where you have to be a responsible main character: the caller is responsible for freeing the edid pointer. don't just walk away from it, bestie, that's a memory leak and we don't do those here π§
the return value is giving very clear vibes:
- a positive value means success, and that value is the length of the EDID π
- a negative value means error π
so like, genuinely, keep track of that pointer. the function hands you the EDID and then it's your problem. iconique, but also: free it. please. π
π SEE ALSO π
- Kernel file
./drivers/acpi/acpi_video.cβ go read the source, iykyk β
and that's the whole page, bestie! sourced from ./drivers/acpi, dated October 2026, and yeah β this absolutely ate π
β¨π₯
π¦ 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