Shell font is blurry under Wayland (panels, menus and login screen too)

Bug #1714459 reported by Didier Roche-Tolomelli
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Medium
gnome-shell (Ubuntu)
Fix Released
Low
Didier Roche-Tolomelli
mutter (Fedora)
Won't Fix
Undecided
mutter (Ubuntu)
Fix Released
Low
Daniel van Vugt

Bug Description

gnome-shell doesn't respect hinting and subpixel order under Wayland. Note that the Xorg session has the fix for this.

Check the referenced bug for screenshots and comparing with the gtk renderer of decoration in the wired bugzilla bug.

More context on the IRC discussion at https://irclogs.ubuntu.com/2017/09/01/%23ubuntu-desktop.html#t09:01

Revision history for this message
In , Pierre (pierre-redhat-bugs) wrote :

Created attachment 1238614
screenshot under X11

gnome-shell seems to ignore the hinting settings configured in Gnome tweak tool when using Wayland. Under X11 everything is fine. GTK+ is picking up the settings just fine either way.

See attached screenshots. In particular look at the "M" in the clock.

Revision history for this message
In , Pierre (pierre-redhat-bugs) wrote :

Created attachment 1238615
screenshot under Wayland

tags: added: artful gnome-17.10 visual-quality
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Screenshot (Wayland on top and Xorg below)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It appears neither X nor Wayland can figure out my monitor's subpixel order:

$ xrandr --verbose | grep Subpixel
 Subpixel: unknown
 Subpixel: unknown
 Subpixel: unknown
 Subpixel: unknown
 Subpixel: unknown

$ weston-info | grep subpixel
 subpixel_orientation: unknown, output_transform: normal,

Yet Xorg is using subpixel rendering showing in the screenshot of comment #1. Sounds like someone is just guessing HRGB when run on Xorg, and refusing to guess when run on Wayland (hence using the safe default of greyscale which appears more blurry).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think the bigger issue around blurriness is that the font colour used in the top bar changes as the cursor enters/leaves. So the top bar's text is always too dim or too bright compared to window titles.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Screenshot of too bright

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And here is some X11 code guessing the subpixel order. COGL has it hard-coded on line 329:
  https://git.gnome.org/browse/mutter/tree/cogl/cogl/cogl-xlib-renderer.c#n306

So it looks like a mistake that it works at all on X11. Although I might be looking at the wrong code...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

BTW, the default settings used by apps/toolkits are here:

org.gnome.settings-daemon.plugins.xsettings rgba-order 'rgb'
org.gnome.settings-daemon.plugins.xsettings antialiasing 'rgba'
org.gnome.settings-daemon.plugins.xsettings hinting 'slight'

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, the vertical blurring seen in the panel on Wayland suggests it is defaulting to hinting=none. We would like hinting=slight to be slightly sharper and consistent with the Ubuntu defaults.

tags: added: rls-aa-incoming-bug
tags: added: rls-aa-incoming
removed: rls-aa-incoming-bug
Revision history for this message
In , Pierre (pierre-redhat-bugs) wrote :

Still happens in Fedora 26.

gnome-shell-3.24.3-1.fc26.x86_64

Will Cooke (willcooke)
tags: added: rls-b-incoming
removed: rls-aa-incoming
tags: added: rls-bb-incoming
removed: rls-b-incoming
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think we'll be landing multiple separate fixes for this, but if they're in the same package then the Assigned to field will be confusing. Consider this one Assigned to didrocks + duflu.

didrocks has fixes for the text colour and border. I will be looking at fixes for the font hinting and subpixel.

Changed in gnome-shell:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gnome-shell (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Changed in gnome-shell (Ubuntu):
status: Triaged → In Progress
Changed in gnome-shell (Ubuntu):
assignee: nobody → Didier Roche (didrocks)
affects: gnome-shell → mutter
affects: gnome-shell (Fedora) → mutter (Fedora)
Changed in mutter (Ubuntu):
importance: Undecided → Low
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell - 3.26.1-0ubuntu1

---------------
gnome-shell (3.26.1-0ubuntu1) artful; urgency=medium

  * New upstream release
  * debian/ubuntu-session-mods/ubuntu.css: workaround font blurryness
    under wayland by providing a slight stroke around the font matching
    windows title bar. (LP: #1714459)
  * Remove 72_consistent_alt_key_above_tab_behavior.patch: upstreamed
  * Remove run-unit-tests.patch: was cherry-picked

 -- Didier Roche <email address hidden> Fri, 06 Oct 2017 09:36:54 +0200

Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Here's a screenshot of my experimental hinting/subpixel for to mutter.

Unfortunately it appears the new colour selection in gnome-shell (theme) doesn't quite match up still. Picking some pixels from common letters in both the app headerbar and panel I see:

App window.. dfdad1
Panel....... cccbca

App window.. d9d6cb
Panel....... c6c7c4

So there's a noticeable difference in the colour.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
summary: - Shell panel font is blurry under wayland
+ Shell font is blurry under Wayland (panels, menus and login screen too)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Here's the font hinting/antialiasing fix (v3) for mutter.

Changed in mutter:
status: Confirmed → In Progress
Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

@Didier Roche, I am quite appreciative that you noticed this and opened this bug!

QUESTION ABOUT THE FIX: Will subpixel order (=rgb) and hinting (=slight) be hard coded into Wayland, or will the user be able to override these (perhaps through a glib schema file)?

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

Wayland on Ubuntu 17.10.png - Screenshot of Wayland + gnome-shell topbar, gnome-shell notifications, and Nautilus on Ubuntu 17.10

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

Xorg on Ubuntu 17.10.png - Screenshot of Xorg + gnome-shell topbar, gnome-shell notifications, and Nautilus on Ubuntu 17.10

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

Wayland vs Xorg on Ubuntu 17.10.png - Screenshot, zoomed in 1500%, showing font rendering differences between Wayland and Xorg

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

I still see significant blurriness in Wayland compared to Xorg. I currently have gnome-shell 3.26.1-0ubuntu4, and I still see the problem. However, in comment #11, this bug report says that a fix was released for 3.26.1-0ubuntu1 on 10/6/2017.

I added the following settings in /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml and recompiled the schema so it will apply system wide.
    Hinting = 'full'
    Antialiasing = 'rgba'
Dconf confirms that the system using these default values, as configured above.

When I log into a Wayland session, the desktop fonts respect these settings, but gnome-shell fonts look terrible. The fonts from the topbar, all dropdowns from the top bar, and right-click pop-ups from the dock are extreemly fuzzy.

When I log into an Xorg session, gnome-shell fonts look great, very sharp, and clear. There is a significant difference between gnome-shell on Xorg and Wayland.

I've attached the following screen-shots to help illustrate the difference:
- Wayland on Ubuntu 17.10.png - Screenshot of Wayland + gnome-shell topbar, gnome-shell notifications, and Nautilus on Ubuntu 17.10
- Xorg on Ubuntu 17.10.png - Screenshot of Xorg + gnome-shell topbar, gnome-shell notifications, and Nautilus on Ubuntu 17.10
- Wayland vs Xorg on Ubuntu 17.10.png - Screenshot, zoomed in 1500%, showing font rendering differences between Wayland and Xorg

Depending on your monitor and resolution, you may not see the difference between the two attached pictutes "Wayland on Ubuntu 17.10.png" and "Xorg on Ubuntu 17.10.png".

Nevertheless the third image, " Wayland vs Xorg on Ubuntu 17.10.png", should help. In this image, you can actually see the sub-pixel font rendering, and you can see that grayscale is being used in Wayland (even though I have configured 'rgba'). I will aslo assume that my system setting of 'full' hinting is being ignored as well, by Wayland.

4.13.0-16-generic
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful

gnome-shell:
  Installed: 3.26.1-0ubuntu4
  Candidate: 3.26.1-0ubuntu4
  Version table:
 *** 3.26.1-0ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No need to comment on this bug. We have a fix coming. See comment #15 and also:

https://bugzilla.gnome.org/show_bug.cgi?id=645433

Revision history for this message
Thierry Carrez (ttx) wrote :

I know it's a different issue, but worth referencing here: in the same area (blurry fonts regression under 17.10) I noticed significant improvement using Freetype 2.8.1 as described in bug #1722508.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the tip. I was wondering about that, but either way non-antialiased font quality is still not very good (even before the regression of bug 1722508), compared to Windows at least.

In other news, I have removed the distro patch from comment 15. Now working on revisions here:
https://bugzilla.gnome.org/show_bug.cgi?id=645433

Changed in mutter (Fedora):
importance: Unknown → Undecided
status: Unknown → Confirmed
Changed in mutter:
status: In Progress → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Update: The fix for Ubuntu should arrive with mutter 3.26.3.

tags: added: fixed-in-3.26.3
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

mutter (3.27.91-1) experimental; urgency=medium

  * New upstream development release (LP: #1751070)
  * Bump minimum libgbm-dev to 17.1 and libdrm-dev to 2.4.83
  * Build-Depend on libcogl-dev (needed for build but shouldn't be…)
  * Cherry-pick bump-api.patch
  * Update package names for soname bump

 -- Jeremy Bicha <email address hidden> Thu, 22 Feb 2018 08:54:47 -0500

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Changed in mutter (Fedora):
status: Confirmed → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually it was fix released. Someone should tell Red Hat :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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