Add HiDPI support for Plymouth boot
Configure Plymouth to display at 1x scaling on HiDPI screens, such as the MacBook Pro 15" Mid 2015, which has a 192 DPI display. Currently, Plymouth appears too large (2x the expected size) during boot, but displays correctly at 1x during shutdown, likely due to the window manager’s HiDPI settings only available after booting up.
Approach:
- Modify the 'meson.build' file to install a service that runs a script, which creates or modifies the '/etc/plymouth/plymouthd.conf' configuration if the primary monitor scaling factor is 2 (2x / 200% / Retina Display)
- The service runs once on every boot to keep the Plymouth settings updated based on the scaling of the primary monitor
- The script logs changes using the standard logger API.
Testing:
- The shell script and the service have been fully tested in elementary OS 8
- Assistance would be very much appreciated to test the integration of the meson script and service during the installation of elementary OS. Specifically, I’m unsure how to modify the elementary OS 8 ISO to include the modified default-settings and perform comprehensive tests.
Hi, thanks for running the CI.
I've been able to build with meson locally and install the generated 'elementary-default-settings' deb package in my machine.
The meson script needed a change so the service is effectively installed and enabled during the post install of the primary deb package. Please check commit #02cd7bd
Regards
Hi,
I've done further testing and noticed that sometimes the 'xrdb' command doesn't work as expected. To address this, I've applied a fix: the script now waits for Gala to start, not just the X11 session. Additionally, I've simplified the script to only create the configuration file at '/etc/plymouth/plymouthd.conf', assuming it doesn't already exist.
Regards
I'm not sure about this solution, but there is a plymouth repo that this PR should be made against instead: https://github.com/elementary/plymouth-theme