[snap] Mouse pointer theme and scaling not honoured for cursor themes not included in gtk-common-themes

Bug #1900334 reported by Ben James
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Since updating to the latest version, the mouse pointer/cursor in Chromium 86.0.4240.75 (snap) on Ubuntu 20.04 does not match that shown on the desktop (or other non-snap applications).

The symptom looks identical to that shown on this ticket: https://github.com/brave/browser-laptop/issues/9772

See this gif: https://user-images.githubusercontent.com/133786/42110742-dd3a6408-7ba7-11e8-9e7a-a1a32ff3af01.gif

Tags: snap
Revision history for this message
Ben James (ben-c-james) wrote :

It's worth noting that this issue does not affect the Chrome release of the same version (86.0.4240.75), which I have installed for comparison - i.e. this appears to be specific to snap.

Revision history for this message
Ben James (ben-c-james) wrote :

Version info:

> snap info chromium
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more stable way for all
  Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/stable
refresh-date: today at 08:05 BST
channels:
  latest/stable: 86.0.4240.75 2020-10-15 (1350) 170MB -
  latest/candidate: 86.0.4240.75 2020-10-15 (1350) 170MB -
  latest/beta: 87.0.4280.20 2020-10-16 (1357) 172MB -
  latest/edge: 88.0.4292.2 2020-10-16 (1358) 173MB -
installed: 86.0.4240.75 (1350) 170MB -

Revision history for this message
Ben James (ben-c-james) wrote :

Also affects the current beta version - updated with:

> snap switch --beta chromium

> snap refresh

> snap info chromium
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more stable way for all
  Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/beta
refresh-date: today at 15:46 BST
channels:
  latest/stable: 86.0.4240.75 2020-10-15 (1350) 170MB -
  latest/candidate: 86.0.4240.75 2020-10-15 (1350) 170MB -
  latest/beta: 87.0.4280.20 2020-10-16 (1357) 172MB -
  latest/edge: 88.0.4292.2 2020-10-16 (1358) 173MB -
installed: 87.0.4280.20 (1357) 172MB -

Revision history for this message
Ben James (ben-c-james) wrote :

Likewise for edge (88.0.4292.2).

Revision history for this message
Ben James (ben-c-james) wrote :

Possibly related - I presume the following means the "core" and "snap-store" snaps were also updated at the same time:

> snap changes chromium
ID Status Spawn Ready Summary
24 Done today at 08:00 BST today at 08:05 BST Auto-refresh snaps "snap-store", "core", "chromium"

> snap info core
name: core
summary: snapd runtime environment
publisher: Canonical✓
store-url: https://snapcraft.io/core
contact: <email address hidden>
license: unset
description: |
  The core runtime environment for snapd
type: core
snap-id: 99T7MUlRhtI3U0QFgl5mXXESAiSwt776
tracking: latest/stable
refresh-date: today at 08:03 BST
channels:
  latest/stable: 16-2.47 2020-10-14 (10126) 102MB -
  latest/candidate: 16-2.47.1 2020-10-13 (10185) 102MB -
  latest/beta: 16-2.47.1 2020-10-08 (10185) 102MB -
  latest/edge: 16-2.47.1+git2428.1f1ad3fe 2020-10-18 (10243) 102MB -
installed: 16-2.47 (10126) 102MB core

Revision history for this message
Ben James (ben-c-james) wrote :

In addition to the mouse pointer/cursor scaling down to tiny size, the theme also appears to revert to something other than the system setting therefore this bug may be a duplicate of, or related to: #1838008.

tags: added: rls-gg-incoming
Revision history for this message
Olivier Tilloy (osomon) wrote :

Ben: the animated GIF in the bug description shows an issue with the cursor size, not the theming itself. Can you share a capture that illustrates the theming issue? What cursor theme are you using? And what is your screen resolution?

Changed in chromium-browser (Ubuntu):
status: New → Incomplete
Revision history for this message
Ben James (ben-c-james) wrote :

Apologies, I'll clarify - when the mouse cursor transitions to Chromium, the theme changes _and_ the pointer becomes tiny (as in the gif I linked).

It's worth noting that I'm on a HiDPI laptop (4k screen) with 200% scaling enabled.

The mouse pointer theme selected on the desktop is Whiteglass, however it seems to transition to a small version of either DMZ-Black or Yaru (I can't see any difference between the two) on Chromium.

The Chromium mouse theme I see looks the same as that in the gif (albeit smaller).

Revision history for this message
Ben James (ben-c-james) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote : Re: [snap] Mouse pointer theme not honoured

Okay, to there are two separate issues here. I'd swear there was already a bug report for the tiny cursor with 200% scaling, but I can't find it now. Would you mind filing a new bug for that issue, while we track the theming issue here? (sorry for the additional paperwork, but it's much easier for tracking purposes later on)

I can observe the theming issue with Whiteglass. It looks like that cursor theme isn't included in the gtk-common-themes snap. I fiddled with the snap to try and add it, but without success. This needs further investigation.

summary: - Mouse pointer theme not honoured
+ [snap] Mouse pointer theme not honoured
tags: added: snap
Changed in chromium-browser (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
Ben James (ben-c-james) wrote :

New ticket created: #1900472

Revision history for this message
Ben James (ben-c-james) wrote :

Good to hear the cause has been identified.

Unfortunately, the scaling is the worst problem here - I can live with having to use a different cursor, but on a 13" 4k monitor laptop screen, the scaling issue makes the cursor practically invisible.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could people commenting there confirm
- which desktop and ubuntu serie do you use?
- was it working fine before?
- do you use the default cursor theme or a custom one?

Revision history for this message
Ben James (ben-c-james) wrote :

- which desktop and ubuntu serie do you use?

Ubuntu 20.04 (gnome desktop)

- was it working fine before?

Yes. If someone could let me know how I can roll back to older versions of the snap, I can test and report exactly which version broke, however I the version I listed above introduces the issue.

- do you use the default cursor theme or a custom one?

I'm currently using Whiteglass, but regardless of the cursor theme I select, it always appears to revert to DMZ-Black on Chromium.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> I'm currently using Whiteglass, but regardless of the cursor theme I select, it always appears to revert to DMZ-Black on Chromium.

The whiteglass theme is missing for gtk-common-themes snap so that would explain that one not working. Did you restart chromium after changing the configuration? The applications don't always manage to dynamically pick theme changes

Revision history for this message
Sebastien Bacher (seb128) wrote :

Reverting to the previous version should be easy since snap keeps one revision back by default for such cases

$ snap revert chromium

should do what you want to try

Revision history for this message
Ben James (ben-c-james) wrote :

> $ snap revert chromium

I've already tried revert, however I'd also tried changing to other channels (edge, etc.) beforehand, so revert didn't revert back to the original working version. I was actually hoping to be able to list and revert to an arbitrary revision, but saw no obvious way to do that.

> Did you restart chromium after changing the configuration?

Restarting after changing settings seems to help - it fixes the cursor size, but not the theme (ref: #1900472).

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

From duplicate bug #1900472: the cursor scaling issue on HiDPI monitors and the theming problem are in fact a consequence of the same cause: using a cursor theme that isn't included in gtk-common-themes.

This requires further investigation, but I think we can explore at least two solutions/mitigations:

 - add more popular cursor themes (such as whiteglass) to gtk-common-themes
 - ensure that at least the cursor scaling is correct even when using a fallback theme

summary: - [snap] Mouse pointer theme not honoured
+ [snap] Mouse pointer theme and scaling not honoured for cursor themes
+ not included in gtk-common-themes
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Ben, thanks for the replies, when you wrote that after restarting the theme is still wrong, that is when using whiteglass which we determined to be due to having it missing from the snap themes right? could you confirm that it works if you select e.g yaru or adwaita?

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

That commit in gtk-common-themes doesn't address the fallback cursor scaling issue though: if the current cursor theme isn't included in gtk-common-themes, HiDPI scaling isn't applied to the fallback cursor.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Ben James (ben-c-james) wrote :

> @Ben, thanks for the replies, when you wrote that after restarting the theme is still wrong, that is when using whiteglass which we determined to be due to having it missing from the snap themes right?

That's correct - the theme change and scaling occurred when I set the desktop mouse cursor to Whiteglass. When moving the cursor over Chromium, the cursor reverted changed theme (to DMZ-Black, I think) and scaled down small.

> could you confirm that it works if you select e.g yaru or adwaita?

I don't appear to have Adwaita mouse theme and Yaru looks identical to DMZ-Black, so I couldn't tell you if the theme changes or not.

Revision history for this message
Carlos Pita (carlosjosepita) wrote :

The Spotify snap has always shown a tiny mouse pointer in HiDPI screens. The issue has been discussed in https://forum.snapcraft.io/t/very-ugly-cursor-for-spotify-and-kde-snaps/17118 but the conclusion was that this should be fixed upstream (here is the upstream report that presumably nobody that matters will ever look at https://community.spotify.com/t5/Desktop-Linux/Tiny-mouse-pointer-i-HiDPI-screen-only-Snap-package/td-p/4938047). Should I understand from the above comments that this can indeed be fixed by the fallback cursor scaling PR?

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

As suggested in that snapcraft forum post, spotify would need to connect to the gtk-common-themes interfaces to benefit from this fix.

tags: removed: rls-gg-incoming
Changed in chromium-browser (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Olivier Tilloy (osomon) wrote :

Closing this report as the two issues are fixed in gtk-common-themes (pending a release though).

Changed in chromium-browser (Ubuntu):
status: Fix Committed → Invalid
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.