Bug 199310 - [TTM][DRM]Artifact in graphic/Font rendering problem(artifact/gaps/missing characters/black line instead text) with radeon on 10.2/10.3-RC2/3-RELEASE/10-STABLE
Summary: [TTM][DRM]Artifact in graphic/Font rendering problem(artifact/gaps/missing ch...
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2015-04-09 13:24 UTC by sasamotikomi
Modified: 2017-06-18 15:11 UTC (History)
5 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments
font problem (27.51 KB, image/png)
2015-04-09 13:24 UTC, sasamotikomi
no flags Details
pkg version (45.42 KB, text/plain)
2015-04-12 02:20 UTC, sasamotikomi
no flags Details
fc-list (130.36 KB, text/plain)
2015-04-12 02:25 UTC, sasamotikomi
no flags Details
xset q (2.20 KB, text/plain)
2015-04-12 02:28 UTC, sasamotikomi
no flags Details
Kate (58.84 KB, image/png)
2015-05-26 20:29 UTC, sasamotikomi
no flags Details
thunderbird (38.70 KB, image/png)
2015-05-26 20:32 UTC, sasamotikomi
no flags Details
mlterm (90.42 KB, image/png)
2015-05-26 20:34 UTC, sasamotikomi
no flags Details
Firefox FreeBSD-10.2-BETA2 (153.69 KB, image/png)
2015-07-18 15:00 UTC, sasamotikomi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasamotikomi 2015-04-09 13:24:15 UTC
Created attachment 155361 [details]
font problem

Problem repeatable on FreeBSD 10.1 -STABLE (r281276) screenshot Firefox rendering for example,  problem affected not only Firefox but repeat when Firefox is running.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-10 05:53:46 UTC
Thank you for your report. 

To assist isolation, please provide as much additional information as you can, including:

* When did it start happening? After an upgrade? If so, from which version to which version?
* List of other applications are being affected, including screenshots if possible
* Are the symptoms limited to some sites? All sites? Some times? All the time?

Additionally, please provide (as an attachment)

 * pkg version -v output
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-04-10 19:02:27 UTC
Looking at the screenshot it appears only certain glyphs are missing e.g., d e i m n p r S. However, the pattern differs as font type changes (regular vs. bold). To figure out the font select a text with missing glyphs, press "Inspect Element" in context menu, then select "Fonts" tab in the box where CSS rules are showed. Usually, when a glyph is missing in a font Pango tries to substitute it with one from different font and failing that shows a white-box with Unicode code point. The issue may arise if a bad/quirky font provides glyphs only for certain letters but has high priority or fails to render with certain locale, Freetype version, etc.

Here are a few more ideas to diagnose the issue:
- Can you show the output of fc-list and xset q? Try removing most fonts and disable all but "built-ins". Maybe also regen /var/db/fontconfig from scratch.
- Do you have a composite manager running? Try without.
- Is firefox built against GTK2 or GTK3? Try different theme e.g., HighContrast
- Which X11 video driver do you use? Try gfx.xrender.enabled -> false in about:config
Comment 3 sasamotikomi 2015-04-12 02:09:21 UTC
(In reply to Kubilay Kocak from comment #1)
I have found this bug when I tried stable snapshot iso (2015 from Jan 25) 3 months ago after TTM AGP backend got MFC to 10 stable(At first I think it because I start server without any setting but look like it's not it). https://svnweb.freebsd.org/base/stable/10/sys/dev/drm2/radeon/radeon_device.c?revision=275408&view=markup   
  
I tried update to 10.1 -STABLE r281276 and got this but bug, I replace my kernel back to 10.1-RELEASE-p10 and font rendering back to acceptable level.  
i3status from start look fine but after 20-30  min looks exactly the same as firefox. 
Ksnapshot from start. 
Xterm not same but random black stripes between text. 
Glxgears rare dark window with only half of blue gear...

Yes, all site affected, font rendered but painful slowly 5-40 min to one site. 
(In reply to Jan Beich from comment #2)
I use I3MW it this moment.
I use default package should be GTK-2.
I use xf86-video-ati.
Comment 4 sasamotikomi 2015-04-12 02:20:39 UTC
Created attachment 155493 [details]
pkg version
Comment 5 sasamotikomi 2015-04-12 02:25:07 UTC
Created attachment 155494 [details]
fc-list
Comment 6 sasamotikomi 2015-04-12 02:28:02 UTC
Created attachment 155495 [details]
xset q
Comment 7 sasamotikomi 2015-05-26 20:29:05 UTC
Created attachment 157178 [details]
Kate

Black stripe
Comment 8 sasamotikomi 2015-05-26 20:32:10 UTC
(In reply to sasamotikomi from comment #7)
Also same stripes have xterm with running top or glxgears.
Comment 9 sasamotikomi 2015-05-26 20:32:59 UTC
Created attachment 157179 [details]
thunderbird
Comment 10 sasamotikomi 2015-05-26 20:34:39 UTC
Created attachment 157180 [details]
mlterm
Comment 11 sasamotikomi 2015-07-18 15:00:01 UTC
Created attachment 158942 [details]
Firefox FreeBSD-10.2-BETA2
Comment 12 sasamotikomi 2015-07-18 15:15:53 UTC
(In reply to sasamotikomi from comment #11)
Update to FreeBSD-10.2-BETA 2 change nothing even a little worse font rendering and now graphical objects render same as fonts.
Comment 13 Koop Mast freebsd_committer freebsd_triage 2015-07-18 16:18:47 UTC
Hi, might be interesting to see what the font situation is if you revert freetype2 to the 2.5.5 version. I have one report that after the update to 2.6 some fonts are a bit "funky".
Comment 14 sasamotikomi 2016-03-24 02:38:23 UTC
(In reply to Koop Mast from comment #13)
This isn't font or firefox(gecko) it's cleanly TTM/DRM regression, same situation reported with even more powerful graphic but intel(HD4000) on @freebsd-x11 (with faster acceleration method SNA instead EXA font rendering back again to normal state) :
1) Some commit to TTM broke it but due problem repeatable on intel graphic too  it's possibly not TTM itself but AGP in TTM. 
2) Some commit to DRM broke it due I found it before long TTM AGP patch landed this look reasonable. 
3) No AGP-speed support in sysctl https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202408
4) Alternative acceleration method Glamor currently disabled https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207705
Possible solutions:
1) Update TTM/DRM code to last on (sync with kernel 4.5) due kernel before ~3.18-4.X contains many problems with old GPU.
2) Get to work Glamor.
3) Add sysctl for AGP.
Comment 15 Matthew Rezny freebsd_committer freebsd_triage 2017-04-15 15:52:11 UTC
(In reply to sasamotikomi from comment #14)

I have not seen any such problems using the radeon drivers. I have seen glitches in the form of horizontal lines across the screen with the intel drivers and many users report similar problems on Linux as well regardless of the acceleration method. Note that there is zero overlap, intel uses UXA and SNA whereas others use EXA, Glamor, and/or none. I believe this is the first that I've heard of a font rendering issue, all the other reports of artifacts are lines or boxes over the image. It does sound more like it would a problem with font rendering code than drivers since you say it occurs on both intel and radeon.

Can you give steps to reliably reproduce the problem?