# 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):
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[:]