[xmir] Dialogs/fonts are scaled way too big

Bug #1509075 reported by Ken VanDine
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Pocket Desktop
New
Medium
kevin gunn
xorg-server (Ubuntu)
Fix Released
High
Daniel van Vugt

Bug Description

Testing out the gimp on my flo, some pretty basic use cases are unusable. Attempting to export the image as a png shows the dialog that I attached to the bug. The font is huge, buttons are huge and not all the buttons and options are even on the screen.

Tags: xmir
Revision history for this message
Ken VanDine (ken-vandine) wrote :
Revision history for this message
Christopher Townsend (townsend) wrote :

The version of xmir in ppa:libertine-team/devel fixes this issue. Leaving this open until a new version of xmir is in the overlay PPA.

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

Wait, did I fix this or someone else? And where?

Changed in xorg-server (Ubuntu):
status: New → Fix Committed
status: Fix Committed → New
kevin gunn (kgunn72)
Changed in canonical-pocket-desktop:
importance: Undecided → Medium
Changed in xorg-server (Ubuntu):
importance: Undecided → Medium
Changed in canonical-pocket-desktop:
assignee: nobody → kevin gunn (kgunn72)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

AFAIK, we have not done anything that changes scale or DPI in Xmir. So this is possibly not an Xmir bug at all. Something wrong with the launcher/config/environment instead.

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

Is there any way to reproduce this without Libertine? I've never seen it happen myself.

summary: - [xmir] Gimp's export dialog is unusable under xmir
+ [xmir] Dialogs/fonts are scaled way too big
Changed in xorg-server (Ubuntu):
importance: Medium → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think it's likely we need to involve other packages/projects in this bug. I'm not sure how Xmir itself could be involved other than here:

Xmir reports the physical display dimensions from Mir through XRandR:

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 32767 x 32767
VGA-0 disconnected
DP-0 disconnected
HDMI-0 disconnected
DP-1 disconnected
HDMI-1 disconnected
DP-2 connected 1920x1200+0+0 520mm x 320mm
   1920x1200@60.0Hz 59.88*+
DP-3 disconnected

However (by design) if you are using non-rootless mode and happen to resize the root window then those physical display dimensions are removed. Apparently because the root window no longer relates to a physical output any more:

$ xrandr
Screen 0: minimum 320 x 200, current 1612 x 1055, maximum 32767 x 32767

So it's possible that clients like GTK might get confused by the loss of the display information with which to calculate the output DPI. Just a wild guess...

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

Waaait a minute... Is it Mir just reporting junk screen dimensions on 'flo'? Does anyone have a flo and able to tell me what the output of 'mirout' is?

Revision history for this message
Christopher Townsend (townsend) wrote :

As a data point, everything looks fine when using a Libertine chroot on a *desktop* system based on Vivid+overlay. I only see this on my N4, so it seems specific to either arm or the phones themselves or both.

Revision history for this message
Christopher Townsend (townsend) wrote :

And another data point is that the scaling issue did not occur on my N4 when using Xmir from https://launchpad.net/~libertine-team/+archive/ubuntu/devel/+packages.

As a matter of fact, I downgraded xmir to the version in the libertine PPA and the scaling issue no longer occurs, so I'm pretty sure this is an Xmir issue on arm.

Revision history for this message
Christopher Townsend (townsend) wrote :

Just to be clear, this was seen originally in version 2:1.17.2-1ubuntu0.1~overlay5 from the overlay PPA. The issue goes away in version 2:1.17.2-1ubuntu0.1~overlay5+ppa1 from the libertine PPA. And the issue is back again with version 2:1.17.2-1ubuntu0.1~overlay6 from the overlay PPA.

Revision history for this message
Christopher Townsend (townsend) wrote :

Ok, another interesting data point. If I use '--rootless --flatten' and remove Compiz from the equation, then scaling is fine, so it seems it's specific to non-rootless on arm.

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

Reproduced. The issue appears to be:

(gimp:20084): Gimp-Widgets-WARNING **: GDK returned bogus values for the screen resolution, using 96 dpi instead.
(gimp:20084): Gimp-Widgets-WARNING **: GDK returned bogus values for the screen resolution, using 96 dpi instead.

which sounds wrong for two reasons:
  1. Even after working around #6, xrandr reports valid dimensions (61mm x 102mm)
  2. If gimp/GDK really is falling back to 96 dpi then fonts would not appear large at all. They would appear normal (too small).

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

Hmm this is probably it...

$ xdpyinfo
...
screen #0:
  dimensions: 768x1222 pixels (0x0 millimeters)
  resolution: 2147483647x2147483647 dots per inch

Changed in xorg-server (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And fixed.

$ xdpyinfo
...
screen #0:
  dimensions: 768x1222 pixels (61x97 millimeters)
  resolution: 320x320 dots per inch

https://git.launchpad.net/~xmir-team/xorg-server/+git/xmir/commit/?id=82c297b651c4bc45ad6ec591aae33280df3c726b

Changed in xorg-server (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, GIMP is still buggy. It's fallback to 96 DPI is clearly broken but with Xmir fixed we can hopefully avoid needing to fix GIMP.

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

Fixed rootless too:
https://git.launchpad.net/~xmir-team/xorg-server/+git/xmir/commit/?id=cb043eb35dbd2a8c418f328396b882be31de4cab

Warning:
Now the bug is fixed you're still going to see some (significant but no longer absurd) font size differences between apps because the apps themselves are actually quite different. Gimp and Firefox honour the screen DPI and will scale up for the phone screen (less so than before the bug was fixed). However other simpler GTK apps don't bother and will appear very small still. This is down to the apps themselves being well written for high-DPI or not.

If in doubt, check 'xdpyinfo' to see what the physical screen dimensions being reported by Xmir are.

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

xorg-server (2:1.17.3-2ubuntu2) xenial; urgency=medium

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
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.