]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
Explain why we enable outputs in pairs of two
[deb_pkgs/autorandr.git] / autorandr.py
index 19f1a5e2e2242f43097f12346364413fc5441e8d..b288e41f914b9ed97e81e176fbb2ac105d9740d8 100755 (executable)
@@ -328,6 +328,8 @@ def parse_xrandr_output():
 
     # Split at output boundaries and instanciate an XrandrOutput per output
     split_xrandr_output = re.split("(?m)^([^ ]+ (?:(?:dis)?connected|unknown connection).*)$", xrandr_output)
+    if len(split_xrandr_output) < 2:
+        raise RuntimeError("No output boundaries found")
     outputs = OrderedDict()
     modes = OrderedDict()
     for i in range(1, len(split_xrandr_output), 2):
@@ -447,6 +449,10 @@ def apply_configuration(configuration, dry_run=False):
             disable_argv = []
 
     # Enable remaining outputs in pairs of two
+    # This is required because some drivers can't handle enabling many outputs
+    # in one call. See
+    # https://github.com/phillipberndt/autorandr/pull/6
+    # and commits f4cce4d and 8429886.
     remaining_outputs = [ x for x in outputs if configuration[x].edid ]
     for index in range(0, len(remaining_outputs), 2):
         argv = base_argv[:]