Red Hat Bugzilla – Bug 510021
clones different sized-monitors
Last modified: 2009-10-01 22:09:09 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.
- 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
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.
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.
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).
this is fixed with the latest plymouth in rawhide.