19

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).

1
  • Seems like this isn't possible yet (no software solution). See this for something related. Dec 12, 2015 at 6:31

2 Answers 2

6
+50

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

4
  • I'm adding the steps on how to do it. But lets hope someone comes with an awesome way to do what you need. Dec 13, 2015 at 16:09
  • Seems like I too have hit a block. Although I can specify different fontpaths in Xorg.conf but it doesn't seem to pick paths for different font.conf files. :( Dec 13, 2015 at 17:26
  • You're overstating the troubles with a spanned desktop. For example, when two monitors have a different DPI configured (which is trivially possible) dragging a window from one screen to the other causes it to jump from large to small when the center passes the separation. When >50%of the window is on the high DPI screen, the part on the other screen is double in size, and vice versa. This shows that X knows fully well on which monitor each window resides, even if <50% on another screen. May 6, 2020 at 22:06
  • the consequences of rendering a window with the wrong subpixel order are far more severe than wrong DPI. it's ok to render half a window slightly larger/smaller than it should be, but if part of it has wrong subpixel order the text will look very bad;
    – 12Me21
    Nov 7, 2021 at 15:16
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .