This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 510021 - clones different sized-monitors
clones different sized-monitors
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: plymouth (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Fedora Extras Quality Assurance
:
Depends On:
Blocks: fitandfinish
  Show dependency treegraph
 
Reported: 2009-07-07 09:12 EDT by Matthias Clasen
Modified: 2009-10-01 22:09 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-01 22:09:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2009-07-07 09:12:00 EDT
When I boot with an external monitor plugged in, plymouth clones the displays even though the external monitor (1024x768) has a smaller resolution than the internal panel, causing a big black strip on the right edge of the panel.

Further observations: 
- the bios and grub only use the external monitor

- when X starts up for the login screen, it keeps the cloning, but makes both displays use the lower resolution (at least that is what it looks like) which makes the internal panel look bad
Comment 1 Jud Craft 2009-07-13 20:54:44 EDT
Obviously, I don't think Plymouth can A) create two custom-sized framebuffers that perfectly fit each monitor.  (Unless Plymouth and kernel modesetting can do that, in which case, problem solved)

Instead, what if there was another solution that made the bootsplash fit nicely on each monitor?  [note:  not an Xorg programmer, so a layperson summary follows].



The Xrandr 1.3 specification, if I recall, has the capability to do linear transformations.  (Translate and scale, I think).  So, here's my idea:

1.  Out of all displays at startup, pick the largest possible one (ex., the big honking 1680x1050 monitor).
2.  Have Plymouth/Xorg/whatever set the display size to match at least that monitor, and display the Plymouth bootsplash at this size.
3.  Linearly scale the main Xrandr buffer to the other displays using the clone mode + scaling transformation.

Example...

You have a laptop (1280x800 panel) attached to a 1440x900 monitor.  At startup, Xorg initializes with the monitor as the primary display A, at 1440x900+0+0 and the laptop at 1280x800+0+0.

The transform matrix of the remaining display B, where B=LCD panel is then set to (whatever scaling matrix [display B/display A] for axes X and Y).



So, we get a full-size bootsplash that fully scales to both screens, although it is a bit pixelated on one of them.  (But hey, that's way better than weird black borders, and even Windows XP/Vista bootup just does an LCD panel scale of its splash sequence across all monitors -- and it doesn't even adjust for aspect).

Bonuses to this approach:

1.  It works for 2+ displays.  For displays B, C, and D, just set them up as Display B above, with a transformation matrix generated relative to the primary screen A.  We get a bootsplash that fits each monitor from just the one buffer.

2.  We can even adapt this to get the aspect right when widescreen and non-widescreen monitors are mixed:  just add a translate to any non-widescreen monitor's transformation and scale a subsection of the screen, so that the overall aspect is preserved.


In short, by using a clone mode+Xrandr transformations, we can support multiple monitors with an aspect-corrected, full screen (if scaled) Plymouth bootsplash on each one.  It requires using relatively new features of the Xrandr spec, but since Plymouth and Kernel-modesetting are relatively new too, I think that's okay.

Later, at GDM/KDM startup time, the Xrandr setup can remain as is (which means there will be an ugly scaled, but proportionally correct screen on the smaller displays), or you can set all other displays to Spanning mode.
Comment 2 Jud Craft 2009-07-13 22:05:37 EDT
There is one additional downside:  it requires the driver to support the 1.3 spec.  (I tried testing on my Intel 965GM, and for the life of me, I can't get the sucker to transform or scale).



Here is another idea that does not require the 1.3 spec:

Currently Plymouth seems to initialize all displays at their native size, set them all at position 0,0, and then show a plymouth bootsplash that matches the smallest size.

Instead, why not initialize all displays, display a plymouth bootsplash that matches the *biggest* display, and then pan all other displays so that they are centered around it?

For our earlier example of a 1680x1050 monitor and 1280x800 laptop panel:

1.  Initialize X framebuffer at 1680x1050
2.  Set monitor as 1680x1050+0+0
3.  Set LCD panel as 1280x800+  (center of framebuffer - (1280/2)) + (center of framebuffer - (800/2)) -- in this case, 1280x800+200+125.

This method a) doesn't require the 1.3 spec, and b) gives a centered, aspect-correct bootsplash on all displays (though it is zoomed in on smaller monitors).
Comment 3 Matthias Clasen 2009-10-01 22:09:09 EDT
this is fixed with the latest plymouth in rawhide.

Note You need to log in before you can comment on or make changes to this bug.