diff --git a/black_screen_dim.py b/black_screen_dim.py index 66e16df..8bde989 100644 --- a/black_screen_dim.py +++ b/black_screen_dim.py @@ -129,7 +129,7 @@ class BrightnessController: else: idx = t[1] try: - v = sbc.get_brightness(display=idx) + v = sbc.get_brightness(display=idx, method="wmi") except Exception as e: LOG.warning("wmi get display %d failed: %r", idx, e) v = None @@ -149,7 +149,7 @@ class BrightnessController: else: idx = t[1] try: - sbc.set_brightness(0, display=idx) + sbc.set_brightness(0, display=idx, method="wmi") LOG.info("wmi dim display %d", idx) except Exception as e: LOG.warning("wmi dim display %d failed: %r", idx, e) @@ -168,7 +168,7 @@ class BrightnessController: else: idx = t[1] try: - sbc.set_brightness(int(val), display=idx) + sbc.set_brightness(int(val), display=idx, method="wmi") LOG.info("wmi restore display %d -> %s", idx, val) except Exception as e: LOG.warning("wmi restore display %d failed: %r", idx, e)