[snap] artifacts when using HiDPI display

Bug #1702873 reported by lukisi
64
This bug affects 13 people
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Fix Released
Low
Olivier Tilloy

Bug Description

I am using a HiDPI display. At scale 2.
The cursor is tiny when inside the window of the app.
Many icons on the toolbar are blurry, more than usual.

I report these commands' output as requested:
  lsb_release -a
  snap info --verbose libreoffice core

luca@xpsluca:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
luca@xpsluca:~$ snap info --verbose libreoffice core
name: libreoffice
summary: "LibreOffice is a powerful office suite including word processing and creation of spreadsheets, slideshows and databases"
publisher: canonical
contact: http://www.libreoffice.org/get-help/community-support/
description: |
  LibreOffice is a powerful office suite – its clean interface and
  feature-rich tools help you unleash your creativity and enhance your
  productivity. LibreOffice includes several applications that make it the most
  powerful Free and Open Source office suite on the market: Writer (word
  processing), Calc (spreadsheets), Impress (presentations), Draw (vector
  graphics and flowcharts), Base (databases), and Math (formula editing).
commands:
  - libreoffice.base
  - libreoffice.calc
  - libreoffice.draw
  - libreoffice.impress
  - libreoffice
  - libreoffice.math
  - libreoffice.writer
notes:
  private: false
  confinement: strict
  devmode: false
  jailmode: false
  trymode: false
  enabled: true
  broken: false
tracking: beta
installed: 5.3.4.2 (21) 368MB
refreshed: 2017-07-01 19:14:41 +0200 CEST
channels:
  latest/stable: 5.3.2.2 (19) 375MB -
  latest/candidate: 5.3.2.2 (19) 375MB -
  latest/beta: 5.3.4.2 (21) 368MB -
  latest/edge: 5.3.2.2 (19) 375MB -
---
name: core
summary: "snapd runtime environment"
publisher: canonical
contact: <email address hidden>
description: |
  The core runtime environment for snapd
type: core
notes:
  private: false
  confinement: strict
  devmode: false
  jailmode: false
  trymode: false
  enabled: true
  broken: false
tracking: stable
installed: 16-2 (2312) 83MB
refreshed: 2017-04-11 14:28:54 +0200 CEST
channels:
  latest/stable: 16-2 (2312) 83MB -
  latest/candidate: 16-2.26.8 (2329) 84MB -
  latest/beta: 16-2.26.8 (2329) 84MB -
  latest/edge: 16-2.26.8+git258.fa4bcff (2343) 85MB -

Tags: snap
Olivier Tilloy (osomon)
summary: - artifacts when using HiDPI display
+ [snap] artifacts when using HiDPI display
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Changed in libreoffice (Ubuntu):
importance: Undecided → Low
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Can someone with a HiDPI display please try to reproduce this bug with revision 96 or later? This bug is quite old and we have since made great improvements in regard to theme integration which includes cursor themes. It's possible the snap is still not getting the proper scale, but I would like to confirm before digging in to much.

Revision history for this message
Kateryna Rieznik (rieznik) wrote :

Output of `snap --version`:
snap 2.36.2
snapd 2.36.2
series 16
ubuntu 18.10
kernel 4.18.0-13-generic

The bug is still there (just checked) and it is not only for LibreOffice. Here is from snapcraft forum -> https://forum.snapcraft.io/t/small-cursor-in-snap-apps-on-hidpi-display/5220

@ken-vandine Let me know if I can provide more information here.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I still have the problem in libreoffice, and I have revision 96.

----------
till@till-x1yoga:~/printing/openprinting/cups-filters/x$ snap --version
snap 2.36.2
snapd 2.36.2
series 16
ubuntu 18.10
kernel 4.18.0-11-generic
till@till-x1yoga:~/printing/openprinting/cups-filters/x$ snap list
Name Version Rev Tracking Publisher Notes
core 16-2.36.2 6034 stable canonical✓ core
core18 18 442 stable canonical✓ base
gtk-common-themes 0.1-4-g88bc1b2 818 stable canonical✓ -
libreoffice 6.1.3.2 96 stable canonical✓ -
lxd 3.0.3 9663 3.0/stable/… canonical✓ -
printing-stack-snap 0.1.0 x1 - - -
till@till-x1yoga:~/printing/openprinting/cups-filters/x$
----------

Revision history for this message
Joseph Borg (joeborg) wrote :

This also effects the Firefox snap.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I don't have a HiDPI-capable monitor, however I am able to observe and confirm the issue by setting the display scale to 200% (on the display control panel, `gnome-control-center display`). All UI elements become big, except for the cursors in some snaps.

Interestingly, not all snaps are affected:

 - libreoffice, chromium and firefox have small cursors
 - telegram-desktop behaves correctly (big cursors)
 - gnome-characters behaves correctly (big cursors)
 - gnome-calculators has mixed results: the arrow cursor is big, but the text caret cursor is small

Revision history for this message
Olivier Tilloy (osomon) wrote :

 - evince snap: the arrow cursor is big, but other cursors (hand for clicking links in PDFs, text caret) are not scaled

Revision history for this message
Olivier Tilloy (osomon) wrote :

I built a simple test snap with the Gtk hello world application (https://developer.gnome.org/gtk3/stable/gtk-getting-started.html#id-1.2.3.5, slightly modified to add a GtkEntry), built against core18 on bionic (Gtk 3.22.30).

With this snap, my observations are consistent with what I'm seeing with the gnome-characters and gnome-calculator snaps: the arrow cursor is scaled correctly, but other cursors (such as text caret) aren't.

This test snap uses the desktop-gtk3 part, plugs into the theme interfaces provided by gtk-common-themes, additionally to desktop, gsettings, unity7 and x11.

Revision history for this message
Olivier Tilloy (osomon) wrote :

We have at least a couple of separate issues here:

 1) Standard GTK+ apps scale only the arrow cursor, other cursors (such as text caret) are not scaled properly

 2) Custom apps (including chromium, libreoffice, firefox) do not scale any cursor

Revision history for this message
Olivier Tilloy (osomon) wrote :

Relevant logs when stracing the test snap execution:

openat(AT_FDCWD, "/snap/gtk-hello-world/x1/usr/share/icons/Yaru/cursors/text", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/gtk-hello-world/x1/usr/share/icons/default/cursors/text", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/gtk-hello-world/x1/usr/share/icons/Yaru/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/gtk-hello-world/x1/usr/share/icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)

And indeed even at a scale factor of 1.0, cursors are not the ones provided by the theme. They're likely the default X fallback versions.

Revision history for this message
Olivier Tilloy (osomon) wrote :

… and both issues are fixed by this trivial PR: https://github.com/ubuntu/snapcraft-desktop-helpers/pull/170.

Changed in libreoffice (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Tested and confirmed by rebuilding a simple GTK+ app snap, chromium and libreoffice.
Note that this won't work OOTB for firefox because it doesn't plug into gtk-common-themes.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

The fix has been merged, now we need snaps to be rebuilt.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The libreoffice snap has been rebuilt and is now in the candidate channel (revision 99), for everyone interested in testing the fix.

Revision history for this message
Olivier Tilloy (osomon) wrote :

And the chromium snap is currently rebuilding.

Changed in libreoffice (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Olivier Tilloy (osomon) wrote :

Both libreoffice and chromium have been rebuilt and published in the stable channel.
Marking the bug fixed, although other snaps will need to be rebuilt to pick up the fix.

Changed in libreoffice (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Vittorio Basile (djvar) wrote :

Here we are in March 2020 and I still have a small @$$ cursor in LibreOffice snap version 6.4.1.2.
What the hell? I'm pretty sure the snap has been rebuilt since that fix that you say it's been merged. And it's not only with LibreOffice but with EVERY OTHER SNAP APP!

Revision history for this message
Vittorio Basile (djvar) wrote :

And here we are in March 2020 and I still get a small @$$ cursor. I mean come on man, I'm pretty sure than since you said that the fix was merged LibreOffice and surely many other snaps have been rebuilt. I am using LibreOffice snap version 6.4.1.2 and still the cursor looks awful, small and black (where instead I have a white cursor on my system).
I have this problem with nearly every other snap, only a small amount do actually respect the HiDPI and the theme of the cursor being consistent with the rest of my OS. The only ones that do work properly are Visual Studio Code, Blender and GIMP

Revision history for this message
Olivier Tilloy (osomon) wrote :

It looks like snaps regressed in this regard. The regression is being tracked and investigated in bug #1900472.

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

Other bug subscribers

Remote bug watches

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