From 467c84630b284769e555be54f2d47eecc36ed7df Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 23 Feb 2014 11:42:26 +0100 Subject: [PATCH] when forcefully switching to internal mode, check brightness of internal screen and increase it if appropriate --- dsl.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dsl.py b/dsl.py index d05c470..2baca7d 100755 --- a/dsl.py +++ b/dsl.py @@ -236,6 +236,12 @@ if __name__ == "__main__": call += ["--output", name] + connectorArgs[name] print("Call that will be made:",call) subprocess.check_call(call) + + # make sure the internal screen is really, *really* turned on if requested + if cmdArgs.internal_only: + backlight = float(subprocess.check_output(["xbacklight", "-get"]).strip()) + if backlight == 0: # it's completely turned off, we better enable it + subprocess.check_call(["xbacklight", "-set", "100"]) except Exception as e: frontend.error(str(e)) raise -- 2.30.2