Monday, November 12, 2018

Panning a double high 4k screen with xrandr

I wanted to see if I could make a double high 4k screen and pan up and down.


xrandr --output HDMI-1 --panning 3840x4320+1920+0 --fb $((1920+3840))x$((2160*2))

I've got a 1920x1080 regular HD monitor on the left and a 4k monitor on the right.

The screen size gives me 3840x4320 (double high 3840x2160) with an offset of +1920+0 to position it to the right of the 1920x1080 monitor.

Then we set the size of the framebuffer to 5760x4320 using bash to do a little math for us, but putting a math expression in between a dollar sign and double parenthesis $(( )).

After I execute this, xrandr reports these stats, I guess I could go up to a maximum 8192x8192 framebuffer size.

xrandr
Screen 0: minimum 320 x 200, current 5760 x 4320, maximum 8192 x 8192
VGA-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.00*+
...
HDMI-1 connected 3840x4320+1920+0 (normal left inverted right x axis y axis) 1096mm x 616mm panning 3840x4320+1920+0
1920x1080 60.00 59.94 24.00 23.98
1920x1080i 60.00 59.94
3840x2160_24.00_rb 24.00*
...

It's interesting to see the output lines in ccsm, they get updated to reflect the new size when detect outputs is checked.



https://sfxpt.wordpress.com/2011/02/02/panning-using-xrandr/

No comments:

Post a Comment