Bug 462264 - Plymouth Theme cut off on multi monitor setup
Summary: Plymouth Theme cut off on multi monitor setup
Status: RESOLVED UPSTREAM
Alias: None
Product: Breeze
Classification: Plasma
Component: Plymouth (other bugs)
Version First Reported In: 5.26.3
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-26 12:04 UTC by Malte S. Stretz
Modified: 2024-02-11 21:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Photo of the situation (2.12 MB, image/jpeg)
2022-11-26 12:14 UTC, Malte S. Stretz
Details
Photo of Kubuntu plymouth screen (2.08 MB, image/jpeg)
2022-11-28 10:39 UTC, Malte S. Stretz
Details
kubuntu-logo.script 22.04.10 (11.01 KB, text/plain)
2022-11-28 13:33 UTC, Malte S. Stretz
Details
kubuntu-logo.plymouth 22.04.10 (249 bytes, text/plain)
2022-11-28 13:44 UTC, Malte S. Stretz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2022-11-26 12:04:31 UTC
SUMMARY
When I boot up my laptop while it is connected to my secondary screen I can't see the LUKS password input field.

This happened to Kubuntu as well and was fixed there. See https://bugs.launchpad.net/ubuntu/+source/kubuntu-settings/+bug/1969984

> [Impact]
> 
>  * Users of mixed-resolution screens, particularily those with mixed 4K and 
>    1080p resolutions, are reporting issues with the Kubuntu plymouth theme 
>    being off-center, and in some ways unusable as the password entry box 
>    for encrypted disks appears off-screen on the primary built-in display 
>    on some laptops.
> 
>  * This is a usability issue that did not appear on previous versions of 
>    plymouth, but are easily fixed by an updated theme. As Ubuntu Studio 
>    and Ubuntu Desktop were not impacted as they used child themes of 
>    plymouth-theme-spinner, this seemed to be a clear solution as this 
>    theme uses the computer's internal framebuffer to render the screen 
>    properly.
> 
> [Test Plan]
> 
>  * Install Kubuntu to an LVM encrypted system.
>  * Connect system to monitors with multiple default resolutions
>  * EXPECTED: plymouth theme will show as centered on all monitors, 
>    including password entry box
>  * ACTUAL: plymouth theme will be in the lower-left of higher 
>    resolutions, and off-screen on lower resolutions.
> 
> [Where problems could occur]
> 
>  * This new plymouth theme is a fork of the already existing Ubuntu and 
>    Ubuntu Studio themes and is highly tested, but it is possible it will 
>    just not work on some screens. If this does happen, we will determine 
>    additional course of action.
> 
> [Other Info]
> 
>  * Original bug report follows:
> 
> ----
> 
> Summary:
> 
> The Kubuntu Plymouth theme for startup and disk decryption is off-center 
> on multi-monitor setups with varying resolutions.
> 
> Steps to Reproduce:
> 
> - Connect a 4k external display to a 1080p system.
> - Start Kubuntu 22.04 LTS
> 
> Actual Results
> 
> The Plymouth startup and disk encryption graphic are shifted down and to the 
> right. This do NOT occur when using a single screen.
> 
> Expected Results:
> 
> The theme and disk encryption graphic should either be centered on all screens, 
> or, as in Focal, should only be shown on the laptop screen.
> 
> TODO
> 
> - Test with more monitor resolutions
> 
> See the attached images.
> 
> Assessment:
> 
> This is likely due to a non-responsive (old-style) Plymouth theme. We could 
> likely create a responsive if it is acceptable.

STEPS TO REPRODUCE
See above

OBSERVED RESULT
See above

EXPECTED RESULT
See above

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon 22.04
(available in About System)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Malte S. Stretz 2022-11-26 12:14:13 UTC
Created attachment 154044 [details]
Photo of the situation

I guess bug 447471 might have the same root cause as well.
Comment 2 Harald Sitter 2022-11-28 07:53:39 UTC
And one of the two screens is hidpi?

This looks like an upstream plymouth bug, I'd expect at least one of the screens to have the correct dimensions. Indeed, the kubuntu bug report makes no sense to my mind because the way things work is that the theme is rendered per screen (window in plymouth terms https://invent.kde.org/plasma/breeze-plymouth/-/blob/master/breeze/breeze.script.cmake#L332) so each screen gets rendered separately such that from a theme POV things should still be correct (per screen) so long as the input dimensions from plymouth are correct.
Comment 3 Malte S. Stretz 2022-11-28 08:52:26 UTC
This issue started to appear with the upgrade from Neon 20.04 to 22.04. I updated all KDE packages before that so the "only" change was the rest of the system. I assumed that it was the same issue; the Kubuntu report sounds like the Plymouth version in 22.04 requires a new kind of responsive themes:

> This is likely due to a non-responsive (old-style) Plymouth theme.

and later:

> Here is the Ubuntu Studio Plymouth theme in use which is has scaling implemented.

My screens aren't exactly hidpi but they are a weird combination of resolutions and dpi. They match the description "Users of mixed-resolution screens". I will paste the output of xrandr below.

Everything is fine when I boot my Laptop without the external screen attached.

I also noticed that the screens are cut off differently: On my laptop screen (the one with the higher solution) the theme is cut off right below the Neon logo whereas on my external screen there is more space below the logo so after typing in the password blindly I can see the status text there.

Since this is within the early boot stages I am a bit at loss how to debug this. Is there any additional helpful information I can attach here?

----8<----

Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 16384 x 16384
eDP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
   2560x1440     60.00*+  59.99    59.99    59.96    59.95  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2-1 connected 1920x1200+2560+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    50.00    59.94    24.00    23.98  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
DP-2-2 disconnected (normal left inverted right x axis y axis)
DP-2-3 disconnected (normal left inverted right x axis y axis)
Comment 4 Harald Sitter 2022-11-28 09:15:49 UTC
I suggest you take this to https://gitlab.freedesktop.org/groups/plymouth/-/issues I'm reasonably certain this is a plymouth bug where the plymouth windows have incorrect dimensions when dealing with mixed device pixel ratios. The theme code definitely is "responsive" as that other bug report put it.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/182 looks somewhat related.
Comment 5 Malte S. Stretz 2022-11-28 10:24:55 UTC
Since this affects KDE Neon wouldn't it be sensible to move this ticket there instead? Moving this upstream to Plymouth won't get this fixed in a reasonable timeframe so Neon 22.04 would stay broken for the next two years. So IMO for Neon there should be some workaround implemented to make this work with the Plymouth available.

I will try the Kubuntu theme to verify that it is actually fixed there.
Comment 6 Malte S. Stretz 2022-11-28 10:39:32 UTC
Created attachment 154105 [details]
Photo of Kubuntu plymouth screen

The Kubuntu Plymouth theme does work fine.

It has a few issues as well: For some reason (maybe by design?) the UEFI logo stays around and the Kubuntu logo appears only after I unlocked the disk and then overlaps with the status text.

But the theme is fit properly on both screens.
Comment 7 Malte S. Stretz 2022-11-28 11:43:01 UTC
Hmmm.. the X/Y calc code for the Logo seems to be the same in both themes:
https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kubuntu-settings/tree/plymouth/kubuntu-logo/kubuntu-logo.script?h=ubuntu/1%2522.04.9#n271

But since the Logo overlaps the text in the Kubuntu theme I guess it is wrong as well and the issue (or rather fix) is in 
https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kubuntu-settings/tree/plymouth/kubuntu-logo/kubuntu-logo.script?h=ubuntu/1%2522.04.9#n160
which looks slightly different to the one in Plasma
https://invent.kde.org/plasma/breeze-plymouth/-/blob/master/breeze/breeze.script.cmake#L215

I didn't dig deeper.
Comment 8 Malte S. Stretz 2022-11-28 13:33:40 UTC
Created attachment 154107 [details]
kubuntu-logo.script 22.04.10

Actually, scratch that. The LP git repo has version 22.04.9 only but I have 22.04.10 installed which doesn't seem to be part of that repo (yay for updated package metadata!). I guess that's what this SRU ticket is about.

The actual script on disk looks totally different to the version in the repo.
Comment 9 Malte S. Stretz 2022-11-28 13:44:36 UTC
Created attachment 154108 [details]
kubuntu-logo.plymouth 22.04.10

The kubuntu-logo.plymouth file also has change quite significantly. A lot more metadata about Alignment is included. Might that be the issue?

I wasn't able to find any up-to-date documentation on the whole Plymouth scripting/config stuff let alone a changelog which might suggest that recent plymouth versions handle this data differently.
Comment 10 Malte S. Stretz 2022-11-28 14:12:29 UTC
I digged through my dpkg.log and the Plymouth version in Neon 20.04 was 0.9.4git20200323-0ubuntu6.2 and now I have 0.9.5+git20211018-1ubuntu3 installed. Looks like there is and was as always a bunch of Debian and Ubuntu specific patches applied on top of that version which is probably also picked from some specific commit. Maybe this isn't even a regression upstream but something which was hotfixed by Debian/Ubuntu all the time and that patch got dropped on the way.
Comment 11 Malte S. Stretz 2022-12-01 08:52:04 UTC
After all, this seems to be an upstream issue indeed. I hacked up the breeze theme and set

> global.title.text = "(" + Window.GetX() + " " + Window.GetY() + ") (" + Window.GetWidth() + " " + Window.GetHeight() + ")";

On boot I get the output "(320 240) (1920 1200)" on *both* screens (Hmmm... now that I think about it maybe I shouldn't modify the global variable but put this into the Logo function?). 1920x1200 is the resolution of my external screen and the offset doesn't make any sense to me at all but when squinting at the screen it seems to be the amount the splash screen is off.

I have to generate a new plymouth debug log but am pretty sure that it contained the proper resolutions for both screens.
Comment 12 piotr 2024-02-11 21:04:09 UTC
Is this resolved upstream really? Still affects e.g. KDE Neon 5.27 (but perhaps should be OK with transition to 6?)