Subpixel/Lcd mode with VRGB/VBGR makes qt4 applications on Jaunty unreadable

Bug #334657 reported by duendetuc on 2009-02-26
178
This bug affects 16 people
Affects Status Importance Assigned to Milestone
qt4-x11 (Fedora)
Fix Released
Medium
qt4-x11 (Ubuntu)
Medium
Jonathan Thomas
Jaunty
Undecided
Jonathan Thomas
Karmic
Medium
Jonathan Thomas

Bug Description

*Below added by Jonathan Thomas*
   Stable Release Update (SRU) infos:
   -Impact: Many Gnome users who have VRGB or VBGR hinting enabled will be hit with completely corrupted fonts in Qt apps
   -Addressed by: This bug has been addressed by adding a patch from OpenSuse that disables the new, buggy font filter and falls back to the old method.
   -Testcase: In Gnome, open System>Preferences>Appearance>Fonts. Choose vertical RGB or BGR LCD hinting. Qt applications using this fonting scheme will now sport corrupted fonts.
   -Patch/regression potential: None. Fonts are completely broken otherwise, so falling back to the old hinting method can't make it any worse. A proper fix has been made in Qt 4.5.1, but we are not ready to backport that version at this time.
 #######################################################################
I have corrupted fonts in some programs like smplayer, ktorrent and amarok. I have a fresh install of Jaunty 9.04.

I've attached some screenshots of the problem.

[update from Caspar Clemens Mierau / damokles]

This bug is about a problem with using Gnome's lcd/subpixel mode in System>Preferences>Appearance>Fonts. When this is enabled in conjunction with VRGB or VBGR, qt4 applications are not readable any more. Please note, that you need to close all qt4 applications before changing this, so the change gets applied to next opened qt4 application.

duendetuc (elduendemirande) wrote :
gds (gds-chartertn) wrote :

Same thing on update of Jaunty (Kubuntu). Ok for several weeks until today. Not sure if today's apt-get upgrade did it or install of gtk-gnutella did it. Removal of gtk-gnutella and reboot did not help. Only on KDE apps. Non KDE apps are ok (firefox, tbird, oOO etc.) Was also adjusting the anti-alias settings in KDE today but put them back to default (system setting) before I noticed this (now KDE setting page has these bad "fonts" so can't check).

Moving to package qt4-x11 and confirming as having the same problems with an up to date Jaunty.

Neither removing .kde nor .qt did solve the problem for me. Also changed the nvidia driver on my system back to 173 and switched of Compiz without any change in the qt app behaviour.

Changing the rendering of the fonts solves the problem. The bug appears when you select Suavizado Subpixel (LCD) [spanish].

Hi duendetuc, I cannot yet confirm your workaround yet. Do you mean the Gnome "Appearance" menu? Changing the font rendering has no effect at all for me for qt4 applications.

2009/3/3 Caspar Clemens Mierau <email address hidden>:
> Hi duendetuc, I cannot yet confirm your workaround yet. Do you mean the
> Gnome "Appearance" menu? Changing the font rendering has no effect at
> all for me for qt4 applications.
for qt4 applicaiton, you need set it with qtconfig

The problem is, that qtconfig is a qt-application and therefore wasn't usable, too. Writing "wasn't" as for me the updates from today seemed to solve this issue. Can anybody confirm this please?

Cleber Santz (clebersantz) wrote :

Well, changing rendering of the fonts works for me. But i get bad fonts than with LCD mode.

Tks.

duendetuc (elduendemirande) wrote :

Close your qt4 apps, go to System>Preferences>Appearance, at fonts select better shapes and close, open any qt4 app. That works for me.

Thanks for your comments. Now I can cleary reproduce and work around this - still existing - bug.

For reproduction:

- close all qt4 apps
- change font display to lcd mode in System>Preferences>Appearance>Fonts

As a work around

- select "better shapes" in System>Preferences>Appearance>Fonts

description: updated

Created attachment 335275
Qt4 application with RGB subpixel

Description of problem:
When VRGB is selected in subpixel font smoothing options in Gnome, Qt4 applications display garbage instead of text.

Version-Release number of selected component (if applicable):
qt-4.5.0-3.fc11.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Select VRGB.
2. Run psi or lmms.

Actual results:
Garbage fonts.

Created attachment 335276
Qt4 application with VRGB subpixel

Just to ask the obvious: you do have freetype-freeworld or some other freetype build with subpixel antialiasing support, right?

What X video driver are you using?

I do not have freetype-freeworld, this is the default Fedora 11 freetype. It DOES appear to have subpixel rendering: I can see it with xmag.

I am using xorg-x11-drv-ati (r300 radeon, not using KMS).

This is interesting, I just checked, subpixel antialiasing is disabled in F9, but got reenabled in F10 and devel.

This began happening to me after an update yesterday. Fonts unreadable in qt4 apps, gtk apps fine. As I am using Kubuntu 9.04a6 64bit I had to fiddle around with the unreadable settings manager to turn off subpixel rendering, but that fixed it. Unfortunately now my fonts look awful. Hopefully this is the correct place to post.

TJ (tj) wrote :

Confirmed here too. I've been seeing this with VLC since the start of the Jaunty development cycle but as I rarely use it didn't bother about it. I then found that Skype suffered the same problem. I tried using qtconfig-qt4 and it suffered the same.

Originally I thought this was a font-file or font-cache corruption issue but can confirm that disabling the sub-pixel font rendering does work-around the issue although makes every other window's fonts look very grainy.

Raising the importance and setting a milestone.

Changed in qt4-x11 (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04-beta
Erdal Ronahi (erdalronahi) wrote :

I have this problem not with all subpixel-renderings. Only VRBG and VBGR are broken, with RBG and BGR are ok.

werewolves (deviatornexus) wrote :

FYI, still a problem in Jaunty Beta.

Nobu (benjo316) wrote :

First, I want to apologize for commenting on the duplicate bug #346320.
Second, I would also like to confirm this is still a bug in Jaunty Beta.

My font settings:

Res.: 86dpi
Smoothing: subpixel
Hinting: full
Subpixel Order: VBGR

Setting Subpixel order to RGB or BGR makes fonts readable.

Assigning to jriddle as he seems to be mostly involved in this source package and the bug is still untouched with an increasing number of duplicates.

Changed in qt4-x11:
assignee: nobody → jr
description: updated
Jeezus (secretsofsilent) wrote :

I can also confirm this bug, and the workaround does work for me. Updated Jaunty as of last night. This affects VirtualBoxOSE, Skype for me.. Completely unusable as you can't read anything.

gds (gds-chartertn) wrote :

I only had kde installed (kubuntu) and saw this problem several months ago. After deleting ~/.kde it fixed it but lost all my settings of course. I think the problem for kubuntu is if you play with the font settings "anti-alias" and dpi in the kde setup screen you cause the problem on all kde 4.2 apps (not on k3b which uses a 3.5 compat. lib I think). The work arounds described here seem to all be for people running gnome with a few qt apps showing this problem and are fixed in gnome. So I installed gnome and tried the work arounds but they didn't affect anything when running kde. Now qt apps like dolphin are OK in gnome (maybe always were for me?) but still see bad fonts in KDE.

By the way, I had returned the anti-alias and dpi settings in KDE to their original setting (disabled/system settings) and the fonts are still unreadable in KDE 4.2 apps (but OK when run in gnome).

Cleber Santz (clebersantz) wrote :

Removing ~/.kde works for me too.

maxix (maxix) wrote :

As i said in duplicate bug #334657, a "sudo dpkg-reconfigure fontconfig" solved the problem without the need of deleting ~/.kde, and for all users.

maxix (maxix) wrote :

Strange... :
Today i tested VRBG subpixel rendering, and the problem happenned immediately on fresh started qt4 apps. But a dpkg-reconfigure fontconfig didn't worked this time, i had to change back to RGB.

Before the upgrade to jaunty, subpixel rendering was set to RGB.

gds (gds-chartertn) wrote :

After apt-get upgrade last night problem went away in KDE. As a test, in KDE settings, set anti-alias on then off. The problem returned. Today after another upgrade KDE still has bad fonts. Tried "sudo dpkg-reconfigure -fontconfig" and did not help.Still bad in KDE and qt apps also now bad in Gnome (e.g., dolphin). In gnome, moved from VRBG to RGB fixed dolphin in gnome. Had no effect in KDE after closing gnome and starting kde. Tried deleting ~/.fontconfig and ~/.fonts to no avail in KDE. Tried selectively deleting a few things in ~/.kde to no avail. Think now will need to rm -rf ~/.kde again to fix unless someone knows what to delete in ~/.kde.

gds (gds-chartertn) wrote :

This fixes it for me w/o deleting ~/.kde: Run gnome and find the kde "system settings" in a menu. If I set the anti-alias to "system setting" or either "vertical" setting for hinting it makes kde apps (e.g., dolphin) fonts bad. If I set anti-alias to disabled or to BGR or RGB (not vertical) it looks ok. (But when disabled, fonts are jagged. ) Then I log out of Gnome and start kde, fonts in kde apps remain OK.

I could not fix this easily in KDE because the fonts were bad in the "system setting" screen and were unreadable so unable to make the settings. In Gnome you can always use Gnomes's font setting to repair the bad fonts in kde/qt apps so they are visible in KDE "system settings" where they must be fixed since the Gnome font settings don't carry over to when you run KDE.

Hopefully the cause of this will be found and fixed before the jaunty (k)ubuntu release.

Behdad said enabling subpixel antialiasing in the Fedora freetype was a mistake (because of patent issues), it's disabled again in current Rawhide and there's also a new F10 freetype build with it disabled (but I don't think it got pushed out). Still, Qt should not display garbage with it...

This is also reproducible with Intel graphics according to:
https://www.redhat.com/archives/fedora-list/2009-April/msg01110.html

werewolves (deviatornexus) wrote :

I can confirm that using a "not vertical" setting (RGB or BGR) from the KDE settings menu also gives me readable, nice looking fonts. Using either "vertical" option gives unreadable fonts.

Interesting, enabled full font hinting here in systemsettings, but I (still) can't reproduce.

nevermind, reading closer (sorry), missed the vrgb part. Confirmed universally broken here, regardless of hinting.

confirmed to that vgbr is broken likewise.

* Tue Apr 14 2009 Rex Dieter <email address hidden> - 4.5.0-14
- fix vrgb/vgbr corruption, disable QT_USE_FREETYPE_LCDFILTER (#490377)

kdeutils-4.2.2-2.fc10, kdetoys-4.2.2-2.fc10, kdesdk-4.2.2-2.fc10, kdeplasma-addons-4.2.2-2.fc10, kdeedu-4.2.2-1.fc10, kdebase-runtime-4.2.2-3.fc10, kdebase-4.2.2-2.fc10, kdeartwork-4.2.2-3.fc10, kdeadmin-4.2.2-2.fc10, kdeaccessibility-4.2.2-1.fc10, sigen-0.1.1-1.fc10, qgit-2.2-4.fc10.1, psi-0.12.1-2.fc10, kde-plasma-weather-1.0.0-3.fc10, arora-0.6-1.fc10, kde-l10n-4.2.2-1.fc10, kdegraphics-4.2.2-3.fc10, kde-i18n-3.5.10-4.fc10, kdepimlibs-4.2.2-3.fc10, oxygen-icon-theme-4.2.2-1.fc10, kdebindings-4.2.2-2.fc10, kdepim-4.2.2-3.fc10, konq-plugins-4.2.2-1.fc10, kdemultimedia-4.2.2-2.fc10, kdenetwork-4.2.2-1.fc10, kdegames-4.2.2-6.fc10, kdelibs-4.2.2-5.fc10, qjackctl-0.3.3-3.fc10, qsynth-0.3.3-4.fc10, kdebase-workspace-4.2.2-3.fc10, qt-4.5.0-14.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update kdeutils kdetoys kdesdk kdeplasma-addons kdeedu kdebase-runtime kdebase kdeartwork kdeadmin kdeaccessibility sigen qgit psi kde-plasma-weather arora kde-l10n kdegraphics kde-i18n kdepimlibs oxygen-icon-theme kdebindings kdepim konq-plugins kdemultimedia kdenetwork kdegames kdelibs qjackctl qsynth kdebase-workspace qt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3389

kdeutils-4.2.2-2.fc10, kdetoys-4.2.2-2.fc10, kdesdk-4.2.2-2.fc10, kdeplasma-addons-4.2.2-2.fc10, kdeedu-4.2.2-1.fc10, kdebase-4.2.2-2.fc10, kdeartwork-4.2.2-3.fc10, kdeadmin-4.2.2-2.fc10, kdeaccessibility-4.2.2-1.fc10, sigen-0.1.1-1.fc10, qgit-2.2-4.fc10.1, psi-0.12.1-2.fc10, kde-plasma-weather-1.0.0-3.fc10, arora-0.6-1.fc10, kde-l10n-4.2.2-1.fc10, kdegraphics-4.2.2-3.fc10, kde-i18n-3.5.10-4.fc10, kdepimlibs-4.2.2-3.fc10, oxygen-icon-theme-4.2.2-1.fc10, kdebindings-4.2.2-2.fc10, kdepim-4.2.2-3.fc10, konq-plugins-4.2.2-1.fc10, kdemultimedia-4.2.2-2.fc10, kdenetwork-4.2.2-1.fc10, kdegames-4.2.2-6.fc10, kdelibs-4.2.2-5.fc10, qjackctl-0.3.3-3.fc10, qsynth-0.3.3-4.fc10, kdebase-workspace-4.2.2-3.fc10, qt-4.5.0-14.fc10, kdebase-runtime-4.2.2-4.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update kdeutils kdetoys kdesdk kdeplasma-addons kdeedu kdebase kdeartwork kdeadmin kdeaccessibility sigen qgit psi kde-plasma-weather arora kde-l10n kdegraphics kde-i18n kdepimlibs oxygen-icon-theme kdebindings kdepim konq-plugins kdemultimedia kdenetwork kdegames kdelibs qjackctl qsynth kdebase-workspace qt kdebase-runtime'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3389

Erdal Ronahi (erdalronahi) wrote :

I can confirm gds' workaround with the option "system settings" for the hinting in "system settings".

Still, this bug is not fixed in Jaunty RC and may give a desastrous first impression to new users and upgraders.

On 18 апреля 2009 21:07:16 Erdal Ronahi wrote:
> I can confirm gds' workaround with the option "system settings" for the
> hinting in "system settings".
>
> Still, this bug is not fixed in Jaunty RC and may give a desastrous
> first impression to new users and upgraders.
This solution works for me too.
By the way I couldn't understand the presence V variant of subpixel order
(GNOME term). I tried all possible variants (GNOME) and see only slight
difference between them (IMHO this is too subjective).

FYI: V-variants are for 90 degree rotated displays. They are said to improve display experience.

Erdal Ronahi (erdalronahi) wrote :

I must step back from my former statement. The workaround does work only sometimes, and I have not yet found out under which conditions. But I obviously cannot use all the hinting options.

kdeutils-4.2.2-2.fc10, kdetoys-4.2.2-2.fc10, kdesdk-4.2.2-2.fc10, kdeplasma-addons-4.2.2-2.fc10, kdeedu-4.2.2-1.fc10, kdebase-4.2.2-2.fc10, kdeartwork-4.2.2-3.fc10, kdeadmin-4.2.2-2.fc10, kdeaccessibility-4.2.2-1.fc10, sigen-0.1.1-1.fc10, qgit-2.2-4.fc10.1, psi-0.12.1-2.fc10, kde-plasma-weather-1.0.0-3.fc10, arora-0.6-1.fc10, kde-l10n-4.2.2-1.fc10, kdegraphics-4.2.2-3.fc10, kde-i18n-3.5.10-4.fc10, kdepimlibs-4.2.2-3.fc10, oxygen-icon-theme-4.2.2-1.fc10, kdebindings-4.2.2-2.fc10, kdepim-4.2.2-3.fc10, konq-plugins-4.2.2-1.fc10, kdemultimedia-4.2.2-2.fc10, kdenetwork-4.2.2-1.fc10, kdegames-4.2.2-6.fc10, kdebase-workspace-4.2.2-3.fc10, qt-4.5.0-14.fc10, kdebase-runtime-4.2.2-4.fc10, qjackctl-0.3.4-1.fc10, qsynth-0.3.3-6.fc10, kdelibs-4.2.2-7.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.

Damon Lynch (dlynch3) wrote :

I have always had Subpixel ordering set to "RGB", in conjunction with full subpixel LCD smoothing. I have very consistently seen the bug occur in QT based applications. It happens seemingly randomly, however: the fonts will be fine one minute, then scrambled the next. I always run a Gnome desktop.

clemens (clemens-endorphin) wrote :

I am somewhat disappointed that this is not a release critical bug, as I just switched to Ubuntu from Arch for stability reasons, and that's the first thing I see on my rotated screens.

Fix is here and could have been found easily before release:
http://cvs.fedoraproject.org/viewvc/rpms/qt/devel/qt-x11-opensource-src-4.5.0-disable_ft_lcdfilter.patch?revision=1.1&view=markup

clemens (clemens-endorphin) wrote :

Rebuild package with the fix from above:
http://clemens.endorphin.org/libqtgui4_4.5.0-0ubuntu4_i386.deb
Not realizing, that I might want to share this, the apt-build profile was for core2. Use on your own risk.

Jonathan Thomas (echidnaman) wrote :

Thanks for finding the patch. I have packages cooking in my PPA: https://edge.launchpad.net/~echidnaman/+archive/ppa

I'll try to get this patch included in a post-release update as soon as possible.

Changed in qt4-x11 (Ubuntu):
assignee: jr → echidnaman
milestone: ubuntu-9.04-beta → jaunty-updates
status: Confirmed → In Progress
Vladimir (lomov-vl) wrote :

Hi all.
Qt 4.5.1 library is released.

Changes 4.5.1:
...
- Font rendering
   * Improved performance of subpixel antialiased text rendering by using a
     mask in the calls to XRender's text compositing function.
   * [248387] Properly respect the font config LCD filter settings for
     subpixel antialiased text rendering when Freetype's native subpixel
     rendering is disabled.
   * [248498] Fix garbled rendering of subpixel antialiased text when using
     Freetype's native subpixel rendering for vertical subpixel layouts.
   * [248644] Fall back to Qt's subpixel rendering if Freetype's subpixel
     rendering was available at compile-time but not at run-time.
...

May be this release will fix a bug?
The only disappoints me this bug was not resolved in Ubuntu 9.04 before its release.
I think it will take a time before Ubuntu will have qt 4.5.1 in repositories to test it.

---
cheers, Vladimir

James (james-ellis-gmail) wrote :

Just to chime in, I got this on a fresh update to Jaunty on an old testing system (before upgrading production systems). I thought my locale had been set to Hittite or something like that ;)

Tried the following:
1. Alter nvidia driver (96 - it's an old system) to nv (no change)
2. Remove extra nvidia parts of nvidia xorg.conf settings (no change)
3. Removed plasma* in .kde/share/config (no change)
4. Moved aside .kde, restart kde (no change)
5. Used another notebook to help me navigate to the font settings, turn off antialiasing at a wild guess - fonts come back but ugly of course
6. Changed VBGR to BGR or RGB in sub pixel hinting, restart X (hint: set dontzap option to false in ServerFlags of Xorg.conf), login, fonts are back.

Attached a photo just to illustrate the problem for completeness.

I'd agree it's not a good ad for Kubuntu but I think it would only happen on upgrade and if VBGR/VRGB was selected in the previous setting.

Jonathan Thomas (echidnaman) wrote :

We can't upgrade to Qt 4.5.1 right away until the issue highlighted here: http://rdieter.livejournal.com/13559.html is resolved.

But, in the meantime, I have a patched version of Qt in my PPA. (https://edge.launchpad.net/~echidnaman/+archive/ppa) Could those affected by the bug please test to see if the issue is fixed with these packages?

Jonathan Thomas (echidnaman) wrote :

Oh, you will probably have to restart after installing the updates.

Changed in qt4-x11 (Fedora):
status: Unknown → Fix Released

fyi, freetype lcd_filter for vrgb/vgbr is fixed in qt-4.5.1.

ward (ward-pong) wrote :

Confirmed, your patched version of qt4-x11 fixes the issue. Thanks.

Oh, and by the way, no restart required (!).

description: updated
Jonathan Thomas (echidnaman) wrote :

Ok, thanks. Attached are source packages that I will try to get in the jaunty-updates repository.

Martin Pitt (pitti) wrote :

Approved, please upload.

Changed in qt4-x11 (Ubuntu Jaunty):
assignee: nobody → Jonathan Thomas (echidnaman)
milestone: none → jaunty-updates
Changed in qt4-x11 (Ubuntu Karmic):
milestone: jaunty-updates → none
Changed in qt4-x11 (Ubuntu Jaunty):
status: New → In Progress
Martin Pitt (pitti) wrote :

Accepted qt4-x11 into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in qt4-x11 (Ubuntu Jaunty):
status: In Progress → Fix Committed
tags: added: verification-needed
Jonathan Thomas (echidnaman) wrote :

A fix has been released to Karmic. (In the form of Qt 4.5.1)

The fix has been built now for Kubuntu 9.04 (Jaunty); so those affected by this bug please test by enabling proposed updates as described in the previous post.

Changed in qt4-x11 (Ubuntu Karmic):
status: In Progress → Fix Released
gds (gds-chartertn) wrote :

I did what ihttps://wiki.ubuntu.com/Testing/EnableProposed said but don't see a "qt4-x11" package in aptitude (curses gui).

Also the search,
sudo aptitude -t jaunty-proposed search ".*qt4.*"
yields no qt4-x11 or anything similar. What package name should I find for this fix?

(Never used "aptitude" before.)

Jonathan Thomas (echidnaman) wrote :

qt4-x11 is the source package which all the Qt packages are built from. You'd want libqt4-gui, and all of its depends to be upgraded.

gds (gds-chartertn) wrote :

Thanks! Installed it and it works. Before I installed, I tried the "vertical" anti-alias selections and it showed bad font. After the install it did not.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4.5.0-0ubuntu4.1

---------------
qt4-x11 (4.5.0-0ubuntu4.1) jaunty-proposed; urgency=low

  * Add kubuntu_10_disable_ft_lcdfilter.diff from suse to fix font corruption
    on vertically-hinted LCD screens (LP: #334657)

 -- Jonathan Thomas <email address hidden> Thu, 23 Apr 2009 08:29:55 -0400

Changed in qt4-x11 (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Changed in qt4-x11 (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.