DPMSForceLevel(3)
π DPMSForceLevel β the "go to sleep bestie" button for your monitor π
okay so real talk, this one lives in the X FUNCTIONS part of the X world, and it's like... the most direct way to tell a screen "hey. power level. now." No negotiating, no waiting, just vibes deployed immediately. β¨
πΈ NAME πΈ
DPMSForceLevel β forces a DPMS capable display into the specified power level
like literally forces it. not a suggestion. a demand. π
π SYNOPSIS π
cc [ flag ... ] file ... -lXext [ library ... ]
#include <X11/extensions/dpms.h>
Status DPMSForceLevel ( Display *display, CARD16 level );
yes bestie you gotta link -lXext and yes you gotta pull in <X11/extensions/dpms.h> or it's giving nothing. π«Ά
β¨ ARGUMENTS β¨
displayβ the connection to the X server, aka your little hotline to the display situation. πlevelβ the power level you wanna force it to. pick wisely, queen. π
π« DESCRIPTION π«
so the DPMSForceLevel function forces a DPMS capable display into the specified power level. That's the whole assignment. π
the level you pass has to be one of these four states, no substitutes:
DPMSModeOnDPMSModeStandbyDPMSModeSuspendDPMSModeOff
anything other than those four? that's a BadValue error, bestie. the server said no. π
and one more thing β if DPMS is disabled on the display, trying to set the power level on the display will result in a BadMatch protocol error. so like, if DPMS isn't even turned on, don't come for it. it's not gonna work. π
π₯ RETURN VALUES π₯
TRUEβ theDPMSForceLevelfunction always returnsTRUE.
ngl that's it. that's the whole return value list. it's an overachiever with exactly one answer and honestly? iconic. π
π ERRORS π
BadValueβ alevelother thanDPMSModeOn,DPMSModeStandby,DPMSModeSuspend, orDPMSModeOffwas specified. you colored outside the lines. πBadMatchβ DPMS is disabled on the specifieddisplay. the door was locked the whole time fr fr. πͺ
π SEE ALSO π
the rest of the DPMS friend group, go say hi:
that's the page bestie, go forth and dim responsibly β¨
this whole thing comes to you from X Version 11, libXext 1.3.6 β mwah, thanks for reading, ily, bye ππ¦π
π¦ where this page comes from
- alpine 3.22: libxext-doc 1.3.6-r2 Β· MIT
- alpine 3.23: libxext-doc 1.3.6-r2 Β· MIT
- centos-stream 10: libXext-devel 1.3.6-3.el10 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 43: libXext-devel 1.3.6-4.fc43 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 43: libXext-devel 1.3.6-4.fc43 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 44: libXext-devel 1.3.6-5.fc44 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 44: libXext-devel 1.3.6-5.fc44 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- Copyright (c) 1999, 2005, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms