pm2fb_blank(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ pm2fb_blank(9) β€” like, the Kernel API Manual page you didn't know you needed πŸ’œ

okay bestie, sit down, because today we're talking about pm2fb_blank β€” a little function from the Kernel API Manual that literally just blanks your display. yes, that's the whole gig. main character energy of "turn the screen off and take a nap." 😴✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int pm2fb_blank (int blank_mode , struct fb_info *info );

look at that signature, so clean, so iconic. two arguments, one int coming back at you. periodt. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • blank_mode β€” the blank mode we want. that's it, that's the whole description ngl, it's the vibe you're requesting 🫢
  • info β€” the frame buffer structure that represents a single frame buffer. your one and only fb, the star of the show ✨

🌸 DESCRIPTION 🌸

so here's the tea, bestie: this thing blanks the screen if blank_mode != 0, else it unblanks. that's the whole conditional and honestly it ate. πŸ”₯

it returns 0 if blanking succeeded, and != 0 if un-/blanking failed β€” like, say, because of a video mode which doesn't support it. rude, but okay. 😭

it also implements VESA suspend and powerdown modes on hardware that supports disabling hsync/vsync. and the mapping is very specific, so pay attention:

  • blank_mode == 2: suspend vsync πŸ¦‹
  • blank_mode == 3: suspend hsync πŸ¦‹
  • blank_mode == 4: powerdown πŸ’€

and the return situation, one more time because it matters: returns negative errno on error, or zero on success. we love a clear success condition. πŸ‘‘

not me emphasizing this twice, but for real β€” keep your errno handling correct or it's giving "segfault at 3am." πŸ™ˆ

🌈 SEE ALSO 🌈

the kernel file lives over at ./drivers/video/fbdev/pm2fb.c, and if you're going down the pm2fb rabbit hole (and you should, the lore is deep), go hang out with the whole friend group:


and that's the page!! mwah πŸ’–

cute little sign-off: this iconic piece of documentation comes from ./drivers/video/fbdev, dated October 2026, and it's filed under pm2fb_blank(9) in case you need to find it again. iykyk πŸŽ€πŸ’…πŸ«Ά

πŸ“¦ where this page comes from