Commit graph

2701 commits

Author SHA1 Message Date
Ray Strode
e0dff47998 Merge branch 'script-unref' into 'master'
script: add missing unref() for system update func

See merge request plymouth/plymouth!97
2020-03-10 17:25:04 +00:00
J-P Nurmi
6102ba156d script: add missing unref() for system update func
As pointed out by @mmstick in #79
2020-03-10 16:24:20 +01:00
Ray Strode
073af3089b Merge branch 'themes-fix-UseFirmwareBackground-usage' into 'master'
themes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings

See merge request plymouth/plymouth!95
2020-03-10 14:22:22 +00:00
Hans de Goede
5598196945 themes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings
The spinner theme should never have UseFirmwareBackground=true and in the
bgrt case we should not use it for modes which set a Title as the Title
location will conflict with the firmware background vendor logo.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-10 14:21:36 +00:00
Ray Strode
0c8b2f0dda Merge branch 'system-update' into 'master'
Fix SetSystemUpdateFunction

Closes #79

See merge request plymouth/plymouth!96
2020-03-10 14:09:55 +00:00
J-P Nurmi
04388af285 Fix SetSystemUpdateFunction
script_lib_plymouth_on_system_update() was never called, because
the plugin interface mapping was missing.

Fixes: #79
Signed-off-by: J-P Nurmi <jpnurmi@gmail.com>
2020-03-10 14:08:56 +00:00
Ray Strode
6c7d6c22ee Merge branch 'event-loop-log-less' into 'master'
Event loop log less

See merge request plymouth/plymouth!93
2020-03-10 12:32:26 +00:00
Hans de Goede
7634c54175 event-loop: Remove ply_trace calls around the disconnect handler
Doing a ply_trace both before and after the disconnect handler, which
gets called every time a boot client asks something of us through by
calling /sbin/plymouth leads to a lot of not really informative messages
in the debug-log.

This removes the 2 ply_trace calls around the disconnect handlers to make
the logs easier to read.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-09 08:47:34 +01:00
Hans de Goede
cf7658b4cd event-loop: Fix debug-log "failed to delete fd # from epoll watch list" spam
The boot server uses a disconnect handler which closes the fd, this
causes deleting the fd from the epoll watch list to fail with an EBADF
error. Since the fd was closed it was already removed from the epoll
watch list, so the failure is harmless, silence these errors getting logged
to the debug logs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-09 08:47:34 +01:00
Ray Strode
58a728982c Merge branch 'avoid_shutdown_failure' into 'master'
ply-terminal-session: Not use grantpt when the system shut down. to avoid sytem hung up.

See merge request plymouth/plymouth!52
2020-03-06 18:02:31 +00:00
Zhao Qiang
a7987d1927 terminal-session: Drop unnecessary grantpt() call.
plymouth calls `grantpt()` when setting up the pseudoterminal it uses
for boot logging and console broadcasting. `grantpt()` traditionally
sets up the access permissions and file mode of the created slave
pseudoterminal device node.

That call is unnecessary for two reasons:
1. The kernel automatically sets up the correct permissions at open
   time on modern Linux.
2. plymouthd runs as root anyway

Furthermore, it seems like, for some unknown reason, the call may be
interfering with the shutdown process.

This commit drops the call, since it's unnecessary, and potentially
even problematic.
2020-03-07 01:49:17 +08:00
Ray Strode
774c4cc374 Merge branch 'clean_codes_gdm_transition' into 'master'
Misc: Code cleanups, gdm-transition is obsolete, so I removed the related code and scripts.

See merge request plymouth/plymouth!86
2020-03-06 16:50:34 +00:00
Zhao Qiang
6844c84704 build-goo: Remove vestigial remnants of old GDM integration code.
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.
2020-03-07 00:36:54 +08:00
Ray Strode
baca661bca Merge branch 'fix-bad-assertion' into 'master'
main: Add state variable splash_is_becoming_idle

See merge request plymouth/plymouth!90
2020-03-02 15:59:31 +00:00
Gaël PORTAY
f816b01a8a main: Add state variable splash_is_becoming_idle
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>
2020-03-01 22:38:44 +00:00
Ray Strode
d7c737d05a Merge branch 'fix-bug-report-URL' into 'master'
configure: Update bug report URL.

See merge request plymouth/plymouth!87
2019-12-24 16:29:10 +00:00
ZhaoQiang
87dcbab4b0 configure: Update bug report URL. 2019-12-24 16:29:10 +00:00
Hans de Goede
d18086efcc Merge branch 'cleanups' into 'master'
Misc. code cleanups

See merge request plymouth/plymouth!82
2019-11-01 12:42:52 +00:00
Hans de Goede
dd4a324121 drm: Remove reset_scan_out_buffer_if_needed() prototype declaration
Remove the unnecessary forward reset_scan_out_buffer_if_needed() declaration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-11-01 13:36:42 +01:00
Hans de Goede
df8eef2e84 drm: Remove unnecessary next_node helper variable
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>
2019-11-01 13:36:42 +01:00
Hans de Goede
c925706421 two-step: Remove unnecessary next_node helper variable
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>
2019-11-01 13:36:42 +01:00
Hans de Goede
5d1805f832 Merge branch 'allow-separate-rootfs' into 'master'
Allow running plymouth-populate-initrd in a cross-compiler environment

See merge request plymouth/plymouth!72
2019-11-01 12:34:37 +00:00
Böszörményi Zoltán
19f3885d3e Allow running plymouth-populate-initrd in a cross-compiler environment
Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
2019-10-30 19:36:52 +00:00
Hans de Goede
b78d921ce5 Merge branch 'throbgress-removal' into 'master'
throbgress: Remove the throbgress plugin

See merge request plymouth/plymouth!69
2019-10-29 15:29:45 +00:00
Hans de Goede
a76638856d throbgress: Remove the throbgress plugin
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>
2019-10-29 15:28:40 +00:00
Hans de Goede
32c097cbca Merge branch 'drm-first-draw-fixes2' into 'master'
Drm first draw fixes part 2

See merge request plymouth/plymouth!81
2019-10-21 17:35:58 +00:00
Hans de Goede
b293882d7c drm: Remove explicit set_scan_out_buffer() from activate()
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>
2019-10-21 16:49:44 +02:00
Hans de Goede
e0928370b6 drm: Mark buffer as clean in ply_renderer_head_new()
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>
2019-10-21 16:49:44 +02:00
Hans de Goede
b3d42bd5e2 Merge branch 'twostep-bgrt-position-fix' into 'master'
two-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels

See merge request plymouth/plymouth!80
2019-10-21 09:39:21 +00:00
Hans de Goede
1ac882f041 two-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels
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>
2019-10-21 10:39:52 +02:00
Hans de Goede
fa467eabbf Merge branch 'kbd-indicator-tweaks' into 'master'
keyboard indicator theming improvements

See merge request plymouth/plymouth!79
2019-10-20 12:40:41 +00:00
Hans de Goede
0b8ce37e1a two-step: Change keyboard-indicator positioning to fixed offset below dialog
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>
2019-10-17 13:22:14 +02:00
Hans de Goede
8e811f8f88 themes: spinner/bgrt: Modify password dialog to match gnome 3.34 changes
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>
2019-10-15 11:33:55 +02:00
Hans de Goede
b867c450e8 gitignore: Add translation related generated files to .gitignore
Add translation related generated files to .gitignore.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-15 11:33:55 +02:00
Hans de Goede
fc3f81addf Merge branch 'drm-upside-down-fix' into 'master'
Drm upside down fix

See merge request plymouth/plymouth!78
2019-10-15 07:07:39 +00:00
Hans de Goede
b2b6df3271 two-step: Remove workaround for upside-down panels
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>
2019-10-14 08:12:49 +02:00
Hans de Goede
c598440e49 drm: Keep hw-rotation on devices with upside down LCD panels
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>
2019-10-14 00:09:25 +02:00
Hans de Goede
c0b8610be1 drm: Add get_primary_plane_rotation() helper function
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>
2019-10-14 00:09:25 +02:00
Hans de Goede
eae3768673 Merge branch 'systemd-units-fix-hardcoding-run' into 'master'
systemd-ask-password-plymouth.service.in: Do not hardcode /run path to pid file

Closes #26

See merge request plymouth/plymouth!77
2019-10-13 18:03:33 +00:00
Hans de Goede
e0af56113a systemd-ask-password-plymouth.service.in: Do not hardcode /run path to pid file
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>
2019-10-13 16:56:01 +02:00
Hans de Goede
a28d7aa55d Merge branch 'logrotate' into 'master'
scripts: Add a logrotate file for /var/log/boot.log

Closes #31

See merge request plymouth/plymouth!76
2019-10-13 14:47:56 +00:00
Hans de Goede
5409977505 scripts: Add a logrotate file for /var/log/boot.log
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>
2019-10-13 16:46:42 +02:00
Hans de Goede
e9d6020071 Merge branch 'drm-first-draw-fixes' into 'master'
Drm first draw fixes

See merge request plymouth/plymouth!75
2019-10-13 12:17:03 +00:00
Hans de Goede
ea71bbfaf7 drm: Install our fb after drawing to it
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>
2019-10-13 12:32:59 +02:00
Hans de Goede
70f2ed850b drm: Delay installing our framebuffer until the first draw
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>
2019-10-13 12:32:59 +02:00
Hans de Goede
3750fa3213 Merge branch 'runtimedir' into 'master'
configure: Make runtimedir configurable

Closes #75

See merge request plymouth/plymouth!74
2019-10-13 10:32:14 +00:00
Hans de Goede
79437b1ba9 configure: Make runtimedir configurable
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>
2019-10-13 12:30:00 +02:00
Hans de Goede
a4517f16f0 Merge branch 'hidpi-gfx-glitch-fix' into 'master'
ply-pixel-buffer: Fix bottom edge rendering of scaled buffers

Closes #83

See merge request plymouth/plymouth!73
2019-10-13 08:28:06 +00:00
Hans de Goede
4dff3485d6 ply-pixel-buffer: Fix bottom edge rendering of scaled buffers
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>
2019-10-12 12:48:51 +02:00
Hans de Goede
a8aad2799c Merge branch 'keyboard-indicator' into 'master'
Add keyboard layout indicator support

Closes #85

See merge request plymouth/plymouth!71
2019-10-01 08:12:17 +00:00