Setting different subpixel rendering on different monitors

I am using dual monitors, one of them rotated by 90 degrees. Font antialising does not look right in the rotated monitor (i.e., there are rainbow borders around characters).

I believe this is because X is using the same subpixel rendering order on both monitors. Is there a way to configure different subpixel rendering orders for each monitor? (i.e., monitor 1 = RGB, and monitor 2 = vRGB).


You'd have to configure your displays as separate X screens, not a shared desktop. Ubuntu should then let you adjust the sub-pixel order for individual X screens.

Otherwise, what would happen with a window that spans two display devices with differing sub-pixel orders? Or even trickier, two displays in clone mode with different physical orders (RGB vs BGR).

This is a known limitation for all the operating systems right now and would need a major redesign to get it fixed. Dynamic adjustment isn't feasible because the library doing the rendering would have to know which screen you are on and adjust dynamically. Plus, suppose you have half of a window on one screen and half on another - it wouldn't know which to choose.

Setting up multiple X screens:

  1. Boot up and reconfigure X. sudo dpkg-reconfigure -phigh xserver-xorg Follow the steps to set up the primary display. (I don't know of a way to do this particular step from CLI)
  2. Open up a terminal and
    lspci
    This should give you a list of your devices and their bus ids. Find the graphics card and write down their bus id's.
  3. Make a copy of your xorg.conf as xorg.conf.orig maybe and open it: sudo vi /etc/X11/xorg.conf
  4. Read this BEFORE proceeding to make sure you can customize it as much as you want.
  5. Now make two Device sections and list the BusID of the card to be shared and also list the driver like this:

    Section "Device"
        Identifier  "nvidia0"
        # Your preferred driver
        Driver      "nvidia"
        # Edit the BusID with the location of your graphics card
        BusID       "PCI:2:0:0"
        Screen      0
    EndSection
    
    Section "Device"
        Identifier  "nvidia1"
        # Your preferred driver
        Driver      "nvidia"
        # Edit the BusID with the location of your graphics card
        BusId       "PCI:2:0:0"
        Screen      1
    EndSection
    
  6. Now create two Screen sections (with the parameters of your choice of course, the only thing that needs to match is the Device in this section to the Identifier in previous one) as:

    Section "Screen"
        Identifier  "Screen0"
        Device      "nvidia0"
        Monitor     "Monitor0"
        DefaultDepth 24
        Subsection "Display"
            Depth       24
            Modes       "1600x1200" "1024x768" "800x600" "640x480" 
        EndSubsection
    EndSection
    
    Section "Screen"
        Identifier  "Screen1"
        Device      "nvidia1"
        Monitor     "Monitor1"
        DefaultDepth 24
        Subsection "Display"
            Depth       24
            Modes       "1600x1200" "1024x768" "800x600" "640x480" 
        EndSubsection
    EndSection
    
  7. Now make a Monitor section for each monitor as:

    Section "Monitor"
        Identifier "monitor name here"
    EndSection
    
    Section "Monitor"
        Identifier "monitor name here"
        # Rotate as you want (your question says one is rotated)
        Rotate "left"
    EndSection
    
  8. Finally, update the ServerLayout section to use and position both Screen sections:

    Section "ServerLayout"
        ...
        Screen         0 "Screen0" 
        Screen         1 "Screen1" leftOf "Screen0"
        ...
    EndSection
    
  9. Restart X and cross your fingers! If it does work then go on fine tuning it as much as you like.

NOW FOR THE SUBPIXEL RENDERING ORDER Do this change in font.conf either in ~/font.conf or /etc/X11/font.conf`. bgr


Another solution is to set the antialiasing to grayscale instead of subpixel given all your LCD screens no longer have the same pixel orientation.

I did that with gnome-tweaks -> fonts -> antialiasing -> standard. Works ok for me. You can also set it to "None" if you prefer sharpness.