commit 04102125 removed a feature, only several versions of
GDM relied on for doing the splash to login screen transition.
but it missed a few spots in the build goo and documentation. So
this commit does another pass to fully clean up any lingering
references to obsolete GDM transition code.
Both handlers on_deactivate() and on_quit() sets the handler
on_boot_splash_idle() using the helper ply_boot_splash_become_idle().
That helper creates a new trigger and it stores it alongside the handler
in its context. The helper asserts if the trigger is set (i.e. a handler
is pending already).
None of the handlers on_deactivate() and on_quit() check if the handler
on_boot_splash_idle() is set already.
There is a race condition that leads to the situation in which the
assertion is false and causes plymouthd to signal itself with SIGABRT
and die.
First, a client sends the request deactivate to the daemon that creates
a trigger for the idle handler. Then, the trigger is still pending while
another client sends the request quit to the daemon that tries to create
a second trigger and die because of the assertion.
This commit adds the new state variable splash_is_becoming_idle that is
checked before calling the helper ply_boot_splash_become_idle() to avoid
to call it twice. The state variable is set by the caller after it calls
the helper ply_boot_splash_become_idle(). It is cleared by the handler
on_boot_splash_idle() after the splash becomes idle.
Fixes:
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-server.c:350:print_connection_process_identity : connection is from pid 683 (/usr/bin/plymouth deactivate) with parent pid 1 (/usr/lib/systemd/systemd --switched-root --system --deserialize 27)
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-server.c:459:ply_boot_connection_on_request : got deactivate request
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 main.c:1275:on_deactivate : deactivating
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:967:ply_event_loop_stop_watching_for_timeout : no matching timeout found for removal
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-device-manager.c:1112:ply_device_manager_pause : ply_device_manager_pause() called, stopping watching for udev events
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:761:ply_event_loop_stop_watching_fd : stopping watching fd 8
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:777:ply_event_loop_stop_watching_fd : removing destination for fd 8
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:786:ply_event_loop_stop_watching_fd : no more destinations remaing for fd 8, removing source
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-device-manager.c:1092:ply_device_manager_deactivate_keyboa: deactivating keyboards
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:761:ply_event_loop_stop_watching_fd : stopping watching fd 10
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:777:ply_event_loop_stop_watching_fd : removing destination for fd 10
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-splash.c:687:ply_boot_splash_become_idle : telling splash to become idle
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ./plugin.c:1801:become_idle : deactivation requested
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ./plugin.c:1819:become_idle : already waiting for plugin to stop
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-boot-server.c:350:print_connection_process_identity : connection is from pid 685 (/usr/bin/plymouth quit --retain-splash) with parent pid 1 (/usr/lib/systemd/systemd --switched-root --system --deserialize 27)
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-boot-server.c:486:ply_boot_connection_on_request : got quit --retain-splash request
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:1326:on_quit : quitting (retain splash: true)
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:1338:on_quit : system initialized so saving boot-duration file
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-utils.c:596:ply_create_directory : directory '/var/lib/plymouth/' already exists
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:686:get_cache_file_for_mode : returning cache file '/var/lib/plymouth//boot-duration'
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-progress.c:214:ply_progress_save_cache : saving progress cache to /var/lib/plymouth//boot-duration
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1634:tell_systemd_to_stop_printing_details : telling systemd to stop printing details
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1352:on_quit : closing log
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 ply-device-manager.c:1092:ply_device_manager_deactivate_keyboa: deactivating keyboards
Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1358:on_quit : unloading splash
Feb 25 22:04:35 steamos plymouthd[312]: plymouthd: ply-boot-splash.c:677: ply_boot_splash_become_idle: Assertion `splash->idle_trigger == NULL' failed.
Feb 25 22:05:06 steamos systemd[1]: plymouth-start.service: Main process exited, code=dumped, status=6/ABRT
Feb 25 22:05:06 steamos systemd[1]: plymouth-start.service: Failed with result 'core-dump'.
Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
When walking a list, we only need to store the next_node before doing
operations on the current node, if the operation modifies the list,
which is only the case in free_heads() in all other cases we can remove
the unnecessary next_node helper variable.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
When walking a list, we only need to store the next_node before doing
operations on the current node, if the operation modifies the list,
which is only the case in free_views() and remove_pixel_display () in all
other cases we can remove the unnecessary next_node helper variable.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Now that the spinfinity theme has been modified to use the two-step
splash plugin instead, there are no more users of the throbgress plugin,
so lets remove it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
flush_head() already sets the scan-out buffer if necessary and if it is not
necessary then we do not want to do this. Specifically second and later heads
do not yet have their buffer drawn to when activate gets called from the
map_to_device call for the first head and then we do not want to start
scanning out the uninitialized buffer.
Removing the explicit ply_renderer_head_set_scan_out_buffer() call also
allows removing the if (head->scan_out_buffer_id != 0) check,
flush_head() already checks this itself.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
We do not want to set our buffer as scanout source before it has been
drawn to by the splash, to avoid a flicker caused by us installing a
black buffer for scanout.
To avoid this, flush_head() only calls reset_scan_out_buffer() if the buffer
for the head has updated_areas, iow if it already has been drawn to.
Our ply_pixel_buffer_fill_with_color() call in ply_renderer_head_new()
causes updated_areas to be non-empty, triggering a reset_scan_out_buffer()
call before the buffer has been drawn at least once.
This commit fixes this by clearing the updated_areas after the
ply_pixel_buffer_fill_with_color() call.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
On devices which have their LCD panel mounted 90° rotated with the left-side
of the physical LCD-panel up (at the top), we were using the wrong offset
for placing the bgrt graphics. We were directly using y_offset from the bgrt
as x_offset, but y_offset is from the top of the physical LCD which in this
case is the right side of the panel as seen by the user. Where as our x_offset
is defined to have 0 at the left side.
This commit fixes this issue by flipping the y_offset value on these panels
before using it as our x_offset.
This fixes the logo jumping 6 pixels to the left on an Asus T100HA, which
has such a panel and uses a bgrt y_offset of 512, which results in a flipped
y_offset of 518 (for some reason the log is not entirely centered triggering
this problem).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
The keyboard-indicators should be located close to the dialog/entry to
make clear that they belong to each other. Using relative positioning
does not work well for this.
Drop the KeyboardIndicator[Vertic|Horizont]alAlignment options (we have
never done a release with these) and put the keyboard indicators at
a fixed offset (half their height) from the bottom of the dialog instead.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
There have been some small tweaks to the gnome lockscreen password
entry filed which we use as template for the diskcrypt password dialog,
adjust our dialog to match these tweaks.
Also move the keyboard indicator to be close to the entry, so that it
is clear it belongs to the entry.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Now that the drm plugin uses hw-rotation for upside down panels when
the GOP does so, there is no need to treat the bgrt rotation for
upside-down panels special anymore,
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
On devices with an upside down LCD panel and where the hw is capable of
rotating the image to correct this the firmware will program the primary
plane to use hw rotation. When we reset this, this may lead to a small
flicker, where the vendor logo is briefly shown upside down.
A bigger problem is the transition to gdm/mutter. We leave the splash
on screen when mutter loads for a smooth transition, when mutter turns
hw-rotation back on, the splash turns upside down! And mutter then fades
from the upside-down splash to the login screen, which looks kinda bad.
Keeping the hw-rotation (and disabling our sw rotation) on devices like
this fixes both issues.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Factor most of the code in ply_renderer_head_clear_plane_rotation() out
into a get_primary_plane_rotation() helper, this is a preparation patch
for adding support for using hw-rotation in some cases.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Use @plymouthruntimedir@/pid in systemd-ask-password-plymouth.service.in so
that the way the path to the pidfile is build there is identical to the
way the --pidfile argument is build in plymouth-start.service.in.
Fixes#26
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Since plymouth concatenates boot logs one after the other in
/var/log/boot.log, causing it to grow endlessly. we need to logrotrate it.
Fixes#31
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
If we need to (re)install our fb as the buffer to scan-out of during
flush, then do so after updating our fb contents, rather then before.
This removes another potential source of flickering.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Instead of installing a framebuffer with uninitialized contents, delay
installing our framebuffer until the first (re)draw.
This fixes some ugly flashes when plymout loads in some cases and it
also removes a FIXME comment from the code.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
On modern systems we should use /run/plymouth to store things like the
pid file, instead of /var/run/plymouth, make the runtime dir configurable
with --with-runtimedir. This keeps the old default behavior of using
/var/run/plymouth, users can pass --with-runtimedir=/run to use
/run/plymouth instead.
Fixes: #75
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Commit 4e1c00b89a (" ply-pixel-buffer: Fix right and bottom edge rendering
of scaled buffers"), which tried to fix a minor rendering issue with the right
and bottom edge of scaled images, contains a typo which actually makes things
worse :|
When checking if iy exceeds the height of the image, ix gets set to the height
instead of iy leading to addressing pass part of the buffer which leads to
various rendering artifacts.
This commit fixes the typo and thus also the artifacts.
Fixes: #83
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add capslock.png, keyboard.png and keymap-render.png files to the
spinner and spinfinity themes, this enables keyboard indicator
(keymap and capslock state) support for these themes.
capslock.png was made by me drawing the icon in xfig, then export as
svg, at some blank rows at the bottom and save as png. I've added the
capslock.fig file to the spinner theme dir.
keyboard.png comes from google's material-design-icons (original is
apache licensed): https://github.com/google/material-design-icons/
I've also added a copy of the 2 svg source files to the spinner theme dir.
keymap-render.png is generated by scripts/keymap-render.py.
Fixes: #85
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Mark the display area where the icon is as damaged on show to force it
being drawn on show, in case capslock is on at show time.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add a new control which draws a keyboard-icon + a pre-rendered text
describing the current layout/keymap (as reported by the renderer).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add a script for generating a png with the short-name (ignoring variants)
of all keymaps listed by "localectl list-keymaps" pre-generated.
This scripts also generates a ply-keymap-metadata.h file with info on
which pre-generated keymap name is where in the png.
This will be used in a follow-up commit to add support for a new
keyboard-keymap-icon control to libply-splash-graphics.
Note that this commit does not add the generated keymap-render.png file,
this file will be added to each themes image-dir separately as the color
of the pre-generated text may differ per theme.
Changes by Hans de Goede:
- Change generated metadata into a C header file
- Drop drawing of curved corners, we just want the text
- Add special handling for dvorak
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add a function to get the keymap from a renderer and implement
this for the drm and frame-buffer renderers.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
In some cases me way want to parse key=value style config files from
outside of plymouth which lack ini style groups.
This commit adds a new ply_key_file_load_groupless_file function which
supports loading such files. When a file is loaded this way, NULL must
be passed as group_name for subsequent ply_key_file_get_* calls.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Recent gcc versions give the following compiler warning with space-flares:
./plugin.c: In function ‘star_bg_update’:
./plugin.c:762:21: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
762 | if (abs (((image_data[x + y * width] >> 16) & 0xff) - ((pixel_colour >> 16) & 0xff)) > 8) {
| ^~~
This commit fixes this, assuming that gcc actually optimises the abs()
away, this will also make the code behave as intended again.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>