Error: Screen cannot be larger than …

The Problem:
If you are reading this blog post, it is probably because you are getting one of the below errors when you setup dual monitors or increase your screen resolution.

xrandr: screen cannot be larger than 1920x1920 (desired size 3840x1080)

Check what your maximum screen resolution is. In your terminal execute, "xrandr". This should display text similar to:

james@linux001:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 1920 x 1920
DFP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1920x1080      61.1*+
   1776x1000      60.0 +
   1680x1050      61.0 +   60.0 
[continues with more monitor stuff]
What is highlighted is the maximum size of your "virtual screen". This is the maximum size that all monitors combined cannot exceed. Meaning if you want dual 1920x1080 monitors to display side by side, you will need a virtual screen size of 3840x1080.

To increase the maximum virtual screen size, we will need to modify xorg.conf. If you are using Xubuntu, you can find xorg.conf in /etc/X11/xorg.conf

The Fix:
1.  Backup your xorg.conf. To make a copy of the file, in the terminal execute:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.confbackup

If you break X windows and you are using Ubuntu variants, you can press CTRL-ALT-F2 to get to a terminal. Press CTRL-ALT-F7 to return to your default terminal. To restore your backup execute:

sudo cp /etc/X11/xorg.confbackup /etc/X11/xorg.conf

2.  Open xorg.conf.  You can use whatever text editor you want.

sudo leafpad /etc/X11/xorg.conf

My xorg.conf looked like this:

Section "Screen"
    Identifier  "Default Screen"
    DefaultDepth    24
EndSection

Section "Module"
    Load    "glx"
EndSection

3.  Add the following to 'Section "Screen"':

SubSection "Display"
    Virtual 3840 1920
EndSubSection

The 'Virtual 3840 1920' is the critical part. Set the 3840 1920 to whatever max resolution you need.

My final xorg.conf looked like this:

Section "Screen"
    Identifier  "Default Screen"
    DefaultDepth    24
    SubSection "Display"
        Virtual 3840 1920
    EndSubSection
EndSection

Section "Module"
    Load    "glx"
EndSection

4.  Restart X windows i.e. reboot your computer.  If you computer comes back completely hosed and has no graphics. Restore that backup we made.

If you run execute "xrandr" now it should show the new screen maximum.

Conclusion:
Remember to clean up your backups after you are sure that your system is stable.

For further explanation of virtual screens visit this site. They explain it fairly well.
For those who prefer to read the manual, this is some nice bedtime reading.

Did this post help you? Is this post no longer accurate or just wrong? Please comment.