Skip to content
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

Framebuffer size can be too small for all screens in intermediate steps #404

Open
TobiasDummschat opened this issue Jan 8, 2025 · 1 comment

Comments

@TobiasDummschat
Copy link

I'm running into an issue when applying a configuration if the current configuration has an output outside the framebuffer of the target configuration. I'll illustrate with ARandR screenshots and show the offending commands afterwards:

Screenshots

Initial configuration:

Initial configuration

Target configuration:

Target configuration

The first xrandr command autorandr attempts to run targets only the two upper to screens, but already resizes the framebuffer to the final size even though this will leave the lower screen outside the framebuffer like this:

arandr inbetween

XRandR commands

A --dry-run shows me that autorandr wants to run these three xrandr commands:

xrandr --fb 6560x2560 --output HDMI-0 --gamma 1.0:1.0:1.0 --mode 2560x1440 --pos 0x0 --rate 59.94 --reflect normal --rotate left --set non-desktop 0 --output DP-3 --gamma 1.0:1.0:1.0 --mode 2560x1440 --pos 1440x560 --primary --rate 59.94 --reflect normal --rotate normal --set non-desktop 0 
xrandr --fb 6560x2560 --output DP-4 --gamma 1.0:1.0:1.0 --mode 2560x1600 --pos 4000x560 --rate 60.01 --reflect normal --rotate normal --set non-desktop 0 
xrandr --fb 6560x2560

The first one fails with this error:

xrandr: specified screen 6560x2560 not large enough for output DP-4 (2560x1600+0+2560)
xrandr: Configure crtc 1 failed

Possible solution

I think the value --fb argument should not be the size of the target configuration, but should be large enough to include all outputs that will be adjusted in later xrandr calls, but have not yet been adjusted. In my case, everything works fine, if I replace the --fb 6560x2560 in the first command with --fb 4000x4160 which is just large enough to hold every output.

I'm guessing that the single-pass option referenced in #88 would also work, but if it doesn't work for many drivers, that's probably not the best solution.

@phillipberndt
Copy link
Owner

Agreed, using a framebuffer size that fits both old and new configuration for everything but the last command seems like the best approach here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants