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

Bug #1714459 reported by Didier Roche on 2017-09-01
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Medium
gnome-shell (Ubuntu)
Low
Didier Roche
mutter (Fedora)
Confirmed
Undecided
mutter (Ubuntu)
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

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.

Created attachment 1238615
screenshot under Wayland

tags: added: artful gnome-17.10 visual-quality
Daniel van Vugt (vanvugt) wrote :

Screenshot (Wayland on top and Xorg below)

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

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.

Daniel van Vugt (vanvugt) wrote :

Screenshot of too bright

Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
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...

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'

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.

Didier Roche (didrocks) on 2017-09-20
tags: added: rls-aa-incoming-bug
tags: added: rls-aa-incoming
removed: rls-aa-incoming-bug

Still happens in Fedora 26.

gnome-shell-3.24.3-1.fc26.x86_64

Will Cooke (willcooke) on 2017-09-27
tags: added: rls-b-incoming
removed: rls-aa-incoming
tags: added: rls-bb-incoming
removed: rls-b-incoming
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
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
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.

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

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

Changed in mutter:
status: Confirmed → In Progress
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)?

PJSingh5000 (pjsingh5000) wrote :

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

PJSingh5000 (pjsingh5000) wrote :

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

PJSingh5000 (pjsingh5000) wrote :

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

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

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

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.

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
To post a comment you must log in.
This report contains Public information  Edit
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.