-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call xrandr individually for each display #163
base: master
Are you sure you want to change the base?
Conversation
The way autorandr previously used to generate one gigantic xrandr call with multiple --outputs wouldn't work reliably. In some setups, I'd consistently get: "xrandr: Configure crtc 1 failed" whereas running two xrandr calls, one for each display, works. This patch simply dispatches one xrandr call per-display. Signed-off-by: martin f. krafft <[email protected]>
I just ran into the same issue. This branch fixed the xrandr errors! |
@@ -780,8 +780,8 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False) | |||
|
|||
# Enable the remaining outputs in pairs of two operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the comment
for index in range(0, len(operations), 2): | ||
argv = base_argv + list(chain.from_iterable(operations[index:index + 2])) | ||
for op in operations: | ||
argv = base_argv + list(op) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going one by one is an issue if there's still an output to disable, because then the first call would disable the last output. You'll have to add code like
if disable_outputs:
do a single call that disables the remaining outputs and enables the first output
and then handles the remaining ones one by one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand what you're saying, but I don't see the problem. XRandR works fine if there's not a single output active. So even if all outputs get disabled, the fact that there are calls queued that will enable them again, should make this a safe operation, no?
There's drivers that'll automatically reenable one output, and also window managers unhappy about having everything disabled. |
Okay, I'll see when I can take another look at the code. I'm now travelling with just a single screen, so… |
The way autorandr previously used to generate one gigantic
xrandr
call with multiple--output
s wouldn't work reliably. In some setups, I'd consistently get:whereas running two
xrandr
calls, one for each display, works.This patch simply dispatches one
xrandr
call per display.