Flickerfree boot broken with new kernels using simpledrm as initial framebuffer
The new Fedora 36 kernels use simpledrm instead of efifb for the framebuffer before the native drm drivers are loaded by the initrd.
Plymouth normally waits for the native drm-drivers to load, but it seems the new simpledrm driver as a native drm-driver and then immediately shows the splash.
This is causing the following issues:
- On some systems, esp. those where the grub menu is shown, the firmware will hand over the EFI framebuffer to the framebuffer in low-res resolution like 800x600 instead of the panel's native resolution. This always leads to a flicker when plymouth loads. Before the switch to simpledrm plymouth would switch the LCD panel to its native mode when displaying the first frame of the splash leading to a single flicker. But now plymouth will first starts animating the splash on simpledrm at the low resolution inherited from the framebuffer and then switches to the native resolution after the native driver has loaded. Leading to a brief 1-2 sec showing of the splash at low res followed by the splash rendering at the LCD panel's native resolution which looks very ugly.
- Some laptops use a portrait screen in a normal landscape laptop casing, to adjust for this plymouth reads the panel-orientation drm_connector object property and rotates the splash to adjust as necessary. The panel-orientation property is not set by the simpledrm driver causing the splash to initially be rendered on its side on this systems, switching to it getting rendered correctly once the native drm driver loads.
- The simpledrm driver does not know and thus does not provide the physical size of the LCD panel, so plymouth will not do hidpi scaling, once the native driver loads we do get a physical size and then on hidpi screens plymouth starts rendering at double size so we get 1-2 seconds of splashscreen rendering with a tiny spinner, logo, etc. and then after that all of a sudden double everything in size.
I believe that the best way to fix all 3 issues is to modify plymouth to not count the simpledrm driver as a proper drm driver an instead have it treat it as the old fbdev drivers, iow wait for a proper driver to load and only use simpledrm as a fallback after a timeout.
Note one other, not plymouth related issue, with the switch to simpledrm is that the efifb code would clear the firmware framebuffer removing any grub-menu remnants and then render the bgrt oem logo to it. This is somewhat important because the firmware framebuffer gets shown to the user when no userspace process owns the framebuffer, e.g. it is briefly shown when logging out of a gnome user session.