pm2fb_blank(9)
π 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
- 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