-- Leo's gemini proxy

-- Connecting to tilde.pink:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;

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

For resolutions, try 1152x864, 1024x768, 800x600, 640x480 and 320x240 (calculate a separate modeline for each). The highest resolution gives good desktop area; you can then zoom in to the lower resolutions. You probably don’t want to make the highest resolution’s first number any larger than 1.6 or 1.8 times that of the resolution you usually work in, otherwise you may “get lost” since even a full-screen window can disappear too easily.

For LCD and other flat-screen monitors:

You should check the manufacturers’ preferred refresh rate (probably 60 Hz) and preferred resolution.

Sadly, if you set a lower resolution, some flat screens will anti-alias the picture in a bad way that causes eyestrain.

However, taking the preferred resolution and halving both numbers gives some magnification and usually results in no compromise on crispness.

And many flat screens can be brought closer to the eye than is practical with CRTs (although a few models do cause eyestrain at close range so choose carefully).

But some of the newer “16x9” widescreen LCDs won’t work well with xtimings’ calculations and you’ll need to tweak the sync pulses manually. For example, when connecting an old video card to an energy-saving Philips 192EL2, the only low-res modeline I found that worked anywhere near OK is Modeline "680x384" 42.75 680 720 792 896 384 392 396 404 doublescan (here is the calculation script)

calculation script

And some newer graphics hardware, such as the Broadcom VideoCore IV in the Raspberry Pi, performs its own anti-aliasing on the HDMI/DVI output (especially in a vertical direction) whenever the resolution is less than the monitor’s *even by an integer factor* (and irrespective of the doublescan setting); I don’t yet have a way around this.

For CRT monitors (and for TFTs that are more flexible, e.g. on some laptops):

You might like to work out and include your “optimal” resolution(s). To do this, you need to know Let F be the pixel size of the bitmap fonts you have (the configuration files on this site use 20-pixel bitmap fonts, so that number is 20), D be your monitor size in inches (measure across the diagonal if you don’t know), P be your on-screen pont size, and H and V be the horizontal and vertical parts of your monitor’s aspect ratio (this is normally 4 and 3, but it can be 8 and 5 on some wide-screen laptops). Take the square of (F*D*72/P), divide it by (H*H + V*V), take the square root, take the nearest whole number, and use a resolution of H times that number by V times that number.

For CRT monitors, refresh rates should be between 85 Hz and 100 Hz; higher rates are more risky and lower rates can tire the eyes. Start with 85 Hz and change it if the monitor starts making an unbearable high-pitched noise (you won’t know this until you’ve finished setting up, so you might have to come back later and adjust things). For 320x240 you might have to drop the refresh rate to around 75 Hz.

For CRTs, enable doublescan for all resolutions up to 800x600 (disable it again if xtimings warns about too high a frequency). High-resolution CRT monitors can show gaps between scan lines at lower resolutions, and this can tire your eyes even if you don’t notice them, but doublescan can reduce the problem. At 320x240 it might not solve the problem completely but you probably still need it to get the timings within range.

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.

Some newer Linux distributions don’t use xorg.conf at all. You might be able to generate one by doing Xorg :1 -configure (the :1 is necessary if you’re already running an X server on :0) and save it to /etc/X11/xorg.conf; if that doesn’t work then you could try starting with an empty file and creating just the Monitor, Screen and ServerLayout sections as specified below (each needs an Identifier, and you might want to include things like Option "DPMS" "true" and Option "Backingstore" "true" in the Screen section).

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.

On some setups (e.g. Raspberry Pi) neither mode-switching nor scrolling works; you might have to fall back to a high-resolution non-scrollable desktop with larger fonts, or if you are on reasonably-capable hardware you could try setting one low-resolution mode and obtaining a larger virtual desktop by following the instructions on last-resort X11 magnification (the x11vnc method) but omit the scaling options because your hardware is doing the scaling. (As you are omitting these, you can cut out x11vnc altogether and just connect the vncviewer directly to the vncserver on :2. If nobody else can access your system then you might want to use TightVNC Server and do echo | tightvncpasswd -f > .vnc/passwd for an empty VNC password, although the prompt may still be displayed. Alternatively some clients can be set to read the password file directly by putting -passwd .vnc/passwd on the command line.)

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.

For each zoom level, you may need to re-adjust the monitor’s horizontal and vertical position and horizontal and vertical size. Try to get the display’s image as large as possible (don’t waste any of the screen to a black border). With good monitors you should only have to do this once after you have configured the X server, but you may need to do it again if you change the configuration of the X server.

You may also want to turn Contrast to maximum and set Brightness fairly low but not too low, depending on the lighting in the room.

Put lots of text on a black background in the centre of the screen, and examine it with a powerful magnifier to make sure none of the phosphor dots at the edges of letters are flickering. If they are then perhaps the horizontal frequency is too high for your signal cable; it may help to reduce the refresh rate, but don’t set it too low or you’ll get another kind of flicker. It can also help to ensure the monitor signal cable is straight, firmly plugged in, and held away from other cables such as power cables, and don’t set the brightness too high.

If you see the mouse cursor flicker when the window under it is changing (particularly noticeable in xaos), it’s probably because your (older?) graphics card doesn’t properly support the mouse in doublescan modes, so X is having to emulate it in software, which is not so good. Normally you can just move the mouse out of the way of anything that’s moving or changing, but if that’s sometimes unavoidable (e.g. you use xaos) then you might want to temporarily switch into a non-doublescan mode for that particular task. You could make both doublescan and non-doublescan versions of your most frequently used mode and include both of them in the Monitor and Screen sections of XF86Config (see instructions above), so you can switch between them using the Control-Alt-keypad +/- keys. In this case you need to give the modes different names even though they have the same resolutions, so instead of saying "640x480" you need to say "640x480d" or "640x480s" for example, and make sure both are listed in the Modes lists under Screen.

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.

-- Response ended

-- Page fetched on Sun May 5 22:00:05 2024