2

I have a widescreen monitor and want to split it in two virtual screens. xrandr says:

Screen 0: minimum 8 x 8, current 3840 x 1600, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 connected 3840x1600+0+0 (normal left inverted right x axis y axis) 880mm x 367mm
   3840x1600     60.00*+  30.00  
   3840x2160     59.94    50.00    29.97    25.00    23.98    23.98  
   3840x800      59.99  
   1920x1600     59.95  
   1920x1200     59.88  
   1920x1080     60.00    59.94    50.00  
   1920x800      59.88  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.93    59.94  

..and I followed the instructions in this 10 years old post:

Split monitor in two

and made this script:

xrandr --setmonitor A 1920/440x1600/367+0+0 HDMI-0
xrandr --setmonitor B 1920/440x1600/367+1920+0 none

xrandr --listactivemonitors returns:

Monitors: 2
 0: A 1920/440x1600/367+0+0  HDMI-0
 1: B 1920/440x1600/367+1920+0 

so it seems to have accepted the command. But xrandr --fb does not work and I have still the same one 3840x1600 display:

~$ sudo xrandr --fb 1920x1600
xrandr: specified screen 1920x1600 not large enough for output HDMI-0 (3840x1600+0+0)
xrandr: Configure crtc 0 failed
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  21 (RRSetCrtcConfig)
  Value in failed request:  0x0
  Serial number of failed request:  33
  Current serial number in output stream:  33

What's wrong? I use Ubuntu 21.10 with MATE.

Geom
  • 161
  • 5
  • 1
    In the older answer you have linked, he is doing one column higher than the actual screen size with the first `--fb` command then the actual screen size as the second one. `xrandr --fb 3841x1600` then `xrandr --fb 3840x1600`. He is also splitting a 1920x1080 screen to 960x1080. – Terrance Mar 21 '22 at 13:06
  • Still no success. xrandr --fb makes the screen disappear for a second, then it re-appears in the same original resolution. – Geom Mar 21 '22 at 20:21

1 Answers1

2

This is an answer to my own question. I hope that it will save someone time. Yesterday I used NVidia drivers for my GT1030 card and its single HDMI port was named HDMI-0. Today I have removed the proprietary drivers and now the port's name is HDMI-1 and it works.

I have made two scripts for the 3840x1600 monitor. The first splits 1:1 (it skips one pixel to create a thin vertical line between the virtual screens)

#!/bin/bash
xrandr --setmonitor A 1920/440x1600/367+0+0 HDMI-1
xrandr --setmonitor B 1919/440x1600/367+1921+0 none

the other one creates 3 virtual screens, it splits (0.5+0.5):2

#!/bin/bash
xrandr --setmonitor A 1280/293x800/184+0+0 HDMI-1
xrandr --setmonitor B 1280/293x800/183+0+800 none
xrandr --setmonitor C 2559/587x1600/367+1281+0 none

and that's my prefered setting for software development now. To revert the above use:

#!/bin/bash
xrandr --delmonitor A
xrandr --delmonitor B
xrandr --delmonitor C
xrandr --listactivemonitors

The xrandr --fb command of the linked (very old) post is not required anymore.

Geom
  • 161
  • 5