X11 hardware magnification

These notes are old: most newer GNU/Linux boxes can’t do this anymore, and will need a high-DPI setup instead, unless you want to try the “last-resort” approach mentioned below.

(The last computer I had that used X11 hardware magnification was disposed of in 2015 due to space constraints after marriage; our newer equipment was smaller, quieter and less power-hungry, so the old “rattle-bang box” was by then just a standby, except when I needed to use its parallel port for the old laser printer which was degrading beyond modern repair; both pieces of equipment had each given 15+ years’ service to multiple owners but it no longer made sense to keep them going.)

This page is meant for people with low vision who need to zoom in X11.  If your X server is not configurable and/or you’re using it remotely then see my last-resort X11 magnification page instead of this one, or if you’re on a Mac then see Mac magnification setup.

If you’re using X11 and you don’t know about Control-Alt-keypad + try it now.  It should zoom in (multiple zooms may be available) and you can zoom out again with - instead of +.

If it doesn’t work, or if the screen is uncomfortable to look at, the picture is not centred on the screen, or you cannot zoom far enough, then you might need to re-configure your X server (more on this below).  You may be able to manage without zoom by setting even larger fonts, but I recommend configuring the X server if you’re setting up a machine for long-term use, otherwise you could have problems when things don’t fit on the screen or cannot be enlarged.

Warning: Fully-sighted observers may get dizzy if you scroll around quickly, since they often use visual information for balance and they are not in control of the mouse.  Try to avoid or warn about rapid movement when others are watching.

Backdrop: The default checkered X backdrop can be annoying especially when you scroll it.  There are various ways of changing it, one of which is the command xsetroot -solid darkblue (type it at a prompt or put it in a startup file).  On some systems you can set the backdrop to any image using chameleon or a similar program.  Most “desktop environments” do this anyway.

Re-configuring the X server

For maximum benefit, the X server needs to be configured not only to allow low resolutions (so that Control-Alt-keypad + works) but also to display them in the best way that is allowed by your monitor, video card and signal cable.  This will reduce eye strain.  Configuring X requires root access to the machine and is difficult; the exact settings will depend on your particular brand of monitor and video card and getting it wrong could cause damage.

The following advice should work with modern, reasonably large monitors.  If you have a very old monitor then don’t try it unless you really know what you’re doing.  At any rate it’s at your own risk; usual disclaimers apply.  Check that you understand all of these instructions before you begin.

Note: Some motherboards with onboard video do not support the following at all, and their built-in lower resolutions can cause eyestrain on modern displays (unless you can find an LCD monitor whose actual resolution is an exact multiple of the supported resolution). If you cannot configure the X server appropriately then see my last-resort X11 magnification page instead.

1. Use xtiming.sourceforge.net to work out some modelines:

xtiming.sourceforge.net

calculation script

2. Edit your XF86Config or xorg.conf file (you’ll almost certainly need root privileges for this).  It’s probably in /etc/X11 or a similar directory (try locate XF86Config and locate xorg.conf).  If you have a file called XF86Config-4, edit that instead.  Make sure you take a backup of the old file in case something goes wrong.

3. Create a section like this, changing it to suit the settings for your monitor:

Section "Monitor"
   Identifier "whatever you want to call it"
   HorizSync 27-110
   VertRefresh 50-160
   # insert modelines here
EndSection
            

With some newer X servers you also need to add Option "NoDDC" to this section for the modelines to take effect.

4. Find Section "Screen" and change the setting of Monitor to match the "whatever you want to call it" identifier you used above.  If there is more than one Section "Screen" in the file then you need to see which one is referred to in the Section "ServerLayout" (hopefully there’ll only be one of those), or if in doubt do this for each Section "Screen" that you find in the file (as long as your X server will only drive one monitor).

5. You might also need to ensure that the names of your modes (e.g. "1024x768") are listed on all Modes lines within the section.  If there aren’t any, create one like this:

SubSection "Display"
Modes "your mode 1" "your mode 2" ...
EndSubSection

I find it’s useful to delete any frequency annotations (i.e. the @85Hz etc) from the Monitor section to reduce confusion.

6. You may also need to add a Virtual directive to the above subsection(s) and specify the width and height of the highest resolution you want, e.g. Virtual 960 600, to stop the driver from adding higher ones.

7. Save the configuration file and re-start your X server.  Check that you can zoom through all the different zoom levels with Control-Alt-keypad +.  Check especially that you are happy with the zoom level that you’ll use most often.  If your monitor has a menu system that tells you the refresh rate, check that this is what you wanted (85 Hz or 99 Hz or whatever) and check that the monitor is behaving normally.

8. If the mouse pointer in doublescan modes looks squashed and/or in the wrong place, you may have to upgrade your X server to a later version, or change the graphics card, or do without doublescan.

9. If you can switch between modes OK but the lower-resolution modes do not let you scroll around the larger desktop with the mouse (i.e. you are “locked in” to the smaller desktop size), then this *might* be caused by the “configurator” on the display manager GDM; try disabling it by setting Configurator=/bin/true in /etc/gdm/gdm.conf or /etc/gdm/custom.conf, or by using startx instead of GDM.

More things to check (especially for old CRTs): If you will be using your monitor for long periods then it’s best to get the image as stable as possible.  You can check the following things after you have done the above setup.

Legal

All material © Silas S. Brown unless otherwise stated. HDMI is a trademark or registered trademark of HDMI Licensing LLC in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Mac is a trademark of Apple Inc. Raspberry Pi is a trademark of the Raspberry Pi Foundation. VNC is a registered trademark of RealVNC Limited. Any other trademarks I mentioned without realising are trademarks of their respective holders.