From f69cf5a056121bc1ac756ea9b70a23c6a2db54bc Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 30 Aug 2022 08:26:33 +0200 Subject: [PATCH] i3-companion: force DPMS level to 0 only if > 0 Otherwise, it seems we may trigger screen blanking. --- bin/i3-companion | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/i3-companion b/bin/i3-companion index bdf712b..c04a7cd 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -1006,8 +1006,9 @@ async def on_resume(i3, event, path, sleeping): if not sleeping: logger.info("resume from sleep") dpms = i3.x11(xcffib.dpms.key) - dpms.ForceLevel(0) - i3.x11.flush() + if dpms.Info().reply().power_level != 0: + dpms.ForceLevel(0) + i3.x11.flush() # Main function