Subpixel order not included in Mir display information

Bug #1393578 reported by Robert Carr
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Chris Halse Rogers
0.26
Fix Released
Medium
Mir development team
mir (Ubuntu)
Fix Released
Medium
Unassigned
qtmir (Ubuntu)
Triaged
Medium
Unassigned
qtubuntu (Ubuntu)
Triaged
Medium
Unassigned
xorg-server (Ubuntu)
Won't Fix
Medium
Daniel van Vugt

Bug Description

Just capturing something mentioned by Trevinho on IRC this morning. MirDisplayOutput does not include subpixel ordering, it could and should though. The information is exposed on the drm side (drmModeSubPixel). Marking as wishlist in absence of other information.

Related branches

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

Yeah, this has always been a semi-obvious omission. I thought we had a bug already for this, but can't find it.

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

Although it might be a good thing to not tell apps/shells. If they render for the physical tri layout then you can't use any dynamic scaling to high DPI (which itself could utilize subpixel order information in a shader).

summary: - Subpixel order not included in display information
+ Subpixel order not included in Mir display information
tags: added: xmir
Changed in xorg-server (Ubuntu):
importance: Undecided → Wishlist
Changed in mir:
status: New → Triaged
Changed in xorg-server (Ubuntu):
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bumped importance. This is significantly affecting the visual quality of text rendering in Unity8.

Changed in mir:
importance: Wishlist → Medium
Changed in xorg-server (Ubuntu):
importance: Wishlist → Medium
tags: added: visual-quality
Revision history for this message
Gerry Boland (gerboland) wrote :

Adding QtMir as from Qt5.5 and later, the QPA plugin can specify the subpixel hinting to Qt's font renderer (is part of QPlatformScreen implementation).

Changed in qtmir:
status: New → Triaged
importance: Undecided → Medium
Gerry Boland (gerboland)
Changed in qtubuntu:
status: New → Triaged
importance: Undecided → Medium
Changed in mir:
assignee: nobody → Chris Halse Rogers (raof)
milestone: none → 0.25.0
status: Triaged → In Progress
Changed in xorg-server (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Possibly related Unity8 issue: bug 1536751

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.25.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → In Progress
Mir CI Bot (mir-ci-bot)
Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Is this half done or have we realistically done all we can do right now?

Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in mir:
milestone: 0.25.0 → 0.26.0
Revision history for this message
Chris Halse Rogers (raof) wrote :

Not quite done - needs plumbing through nested platform, which needs nested platform migration onto non-deprecated display configuration.

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

Optionally we may also want the subpixel order information delivered in MirSurfaceOutputEvent.

Changed in mir:
milestone: 0.26.0 → 1.0.0
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is a bit confused. Its implementation is now spread over multiple releases. I assume the above comments about it not being quite done yet are correct.

Revision history for this message
Gerry Boland (gerboland) wrote :

Just testing it now, AFAICS a nested server is not getting the correct subpixel data passed to it.

Revision history for this message
Gerry Boland (gerboland) wrote :

I've hacked qtmir to print the subpixel hint that Mir is supplying.

http://pastebin.ubuntu.com/24007971/ is my output. First I run a simple qml demo shell as nested server under USC, get "0" hint.

Then I run again as host server, get a hint "1 = RGB".

The "Subpixel hint" output of the 2 cases do not match for me, hence the complaint.

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

The subpixel information has never yet worked for me. My desktop reports "unknown" subpixel order for a pretty common monitor:

$ sudo mirout
...
Output 48: DisplayPort, connected, "DELL U2413", 1920x1200+0+0, enabled, on, 520mm x 320mm (24.0"), normal, 1.00x, unknown, monitor

"unknown" sounds like a bug. And that's without nesting.

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

Annoyingly it seems Linux doesn't know the subpixel order of my monitor (DRM_MODE_SUBPIXEL_UNKNOWN). And Google seems to suggest this is pretty common, because the information isn't available in EDIDs. So I can't easily test any fix for nested just yet.

What I can do however is look at support for /setting/ the subpixel order. Since it seems that's what most people will need to do. We may also want to consider defaulting to HRGB if it's unknown.

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

Gerry: OK, I can fake it, replicate your bug and then fix it. Done...

https://code.launchpad.net/~vanvugt/mir/nested-subpixel-arrangement/+merge/317586

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

Hmm, that's interesting. Using integrated Intel graphics (DisplayPort) I get subpixel order "unknown" but if I use a radeon card (DVI) on the same monitor then it can detect "HRGB".

Michał Sawicz (saviq)
affects: qtubuntu → qtubuntu (Ubuntu)
Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 1.0.0

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

Fix committed to lp:mir/0.26 at revision 4036, scheduled for release in Mir 0.26.2

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

This bug was fixed in the package mir - 0.26.2+17.04.20170322.1-0ubuntu1

---------------
mir (0.26.2+17.04.20170322.1-0ubuntu1) zesty; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.26.2 (https://launchpad.net/mir/+milestone/0.26.2)
    - Bugs fixed:
      . EDID does not change when hotplugging a monitor (LP: #1660017)
      . [regression] mirout crashes when connecting to unity8 or any nested
        server: [libprotobuf FATAL /usr/include/google/protobuf/repeated_field.
        h:1408] CHECK failed: (index) < (current_size_) (LP: #1661163)
      . Mir server crashed with SIGSEGV in
        mir::compositor::TemporaryBuffer::size() called from
        mir::gl::tessellate_renderable_into_rectangle() (LP: #1664760)
      . Nested servers (Unity8) periodically stutter (half frame rate) with
        Mir 0.26.1 (LP: #1666372)
      . Don't dereference the end iterator in ms::ApplicationSession::
        surface_after() (LP: #1667645)
      . [regression] OSK input shaping no longer works correctly (LP: #1669444)
      . Setting MirWindowSpec parameters always causes window's input_region
        to be reset (LP: #1670876)
      . Subpixel order not included in Mir display information (LP: #1393578)
      . Presentation chains should support various swap interval modes
        (LP: #1673533)
      . Need an extension for GBM buffers to replace
        mir_buffer_get_buffer_package() (LP: #1673534)
      . Seg fault on detect_fd_leaks (LP: #1661498)

 -- Cemil Azizoglu <email address hidden> Wed, 22 Mar 2017 04:54:19 +0000

Changed in mir (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in xorg-server (Ubuntu):
status: Triaged → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Changed in xorg-server (Ubuntu):
status: Fix Committed → Won't Fix
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.