Ubuntu – Font corruption: lines through characters

10.1012.04fontsintel graphicsxorg

I have a problem where a one-pixel high white line is displayed through certain letters of text. Almost always only a single character type is affected at once, and only in one font size (though that size can change over time). Most of the time things are fine, but this happens several times a day. It happens frequently in Firefox, but system dialogs, menus, etc. can also be affected.
It's been happening ever since I upgraded to 10.10. Only restarting seems to fix it.

Two examples (in the first, only the larger "r" is corrupted):
rs

os

Any help would be appreciated, thanks.

Edit: I've since noticed that I can (sometimes) make the fonts appear correctly by zooming in/out all the way and returning to the default in Firefox (one or two steps, then going back, does nothing) seems to make the problem go away temporarily.

Edit 2: I figure it's worth noting that the solution below doesn't fully work for me any longer (I'm now using Ubuntu 11.10). It does significantly reduce the frequency of this problem occurring.

Edit 3: Still around in 12.04. The fix provided by Vanni works perfectly now for me, but apparently doesn't for some.

Edit 4: This seems to be an xorg problem, with Vanni's answer fixing it for many Intel video cards. I've had this occasionally happen with AMD graphics cards in 13.10 and 14.04, but very rarely (only two or three times).

Best Answer

Probably related to this xserver-xorg-video-intel bug on Launchpad.

Workaround:

  1. Open a terminal (CTRL+ALT+t);
  2. type sudo gedit /etc/xorg.conf and hit ENTER;
  3. type your user password and hit ENTER;
  4. copy & paste this into the just opened (hopefully empty) gedit window:

    Section "Device"
        Identifier "Intel"
        Driver "intel"
        Option "DebugWait" "true"
    EndSection
    
  5. save the file and close gedit;
  6. restart the PC (or restart X).

Hope it works for you too.