]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
5 years agothemes: spinner/bgrt: Modify password dialog to match gnome 3.34 changes
Hans de Goede [Mon, 14 Oct 2019 20:08:21 +0000 (22:08 +0200)] 
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>
5 years agogitignore: Add translation related generated files to .gitignore
Hans de Goede [Tue, 15 Oct 2019 08:27:17 +0000 (10:27 +0200)] 
gitignore: Add translation related generated files to .gitignore

Add translation related generated files to .gitignore.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'drm-upside-down-fix' into 'master'
Hans de Goede [Tue, 15 Oct 2019 07:07:39 +0000 (07:07 +0000)] 
Merge branch 'drm-upside-down-fix' into 'master'

Drm upside down fix

See merge request plymouth/plymouth!78

5 years agotwo-step: Remove workaround for upside-down panels
Hans de Goede [Mon, 14 Oct 2019 06:11:07 +0000 (08:11 +0200)] 
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>
5 years agodrm: Keep hw-rotation on devices with upside down LCD panels
Hans de Goede [Sun, 13 Oct 2019 21:46:31 +0000 (23:46 +0200)] 
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>
5 years agodrm: Add get_primary_plane_rotation() helper function
Hans de Goede [Sun, 13 Oct 2019 20:42:24 +0000 (22:42 +0200)] 
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>
5 years agoMerge branch 'systemd-units-fix-hardcoding-run' into 'master'
Hans de Goede [Sun, 13 Oct 2019 18:03:33 +0000 (18:03 +0000)] 
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

5 years agosystemd-ask-password-plymouth.service.in: Do not hardcode /run path to pid file
Hans de Goede [Sun, 13 Oct 2019 14:39:22 +0000 (16:39 +0200)] 
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>
5 years agoMerge branch 'logrotate' into 'master'
Hans de Goede [Sun, 13 Oct 2019 14:47:56 +0000 (14:47 +0000)] 
Merge branch 'logrotate' into 'master'

scripts: Add a logrotate file for /var/log/boot.log

Closes #31

See merge request plymouth/plymouth!76

5 years agoscripts: Add a logrotate file for /var/log/boot.log
Hans de Goede [Sun, 13 Oct 2019 14:37:29 +0000 (16:37 +0200)] 
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>
5 years agoMerge branch 'drm-first-draw-fixes' into 'master'
Hans de Goede [Sun, 13 Oct 2019 12:17:03 +0000 (12:17 +0000)] 
Merge branch 'drm-first-draw-fixes' into 'master'

Drm first draw fixes

See merge request plymouth/plymouth!75

5 years agodrm: Install our fb after drawing to it
Hans de Goede [Sat, 12 Oct 2019 14:31:04 +0000 (16:31 +0200)] 
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>
5 years agodrm: Delay installing our framebuffer until the first draw
Hans de Goede [Sat, 12 Oct 2019 14:26:08 +0000 (16:26 +0200)] 
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>
5 years agoMerge branch 'runtimedir' into 'master'
Hans de Goede [Sun, 13 Oct 2019 10:32:14 +0000 (10:32 +0000)] 
Merge branch 'runtimedir' into 'master'

configure: Make runtimedir configurable

Closes #75

See merge request plymouth/plymouth!74

5 years agoconfigure: Make runtimedir configurable
Hans de Goede [Sun, 13 Oct 2019 08:22:43 +0000 (10:22 +0200)] 
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>
5 years agoMerge branch 'hidpi-gfx-glitch-fix' into 'master'
Hans de Goede [Sun, 13 Oct 2019 08:28:06 +0000 (08:28 +0000)] 
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

5 years agoply-pixel-buffer: Fix bottom edge rendering of scaled buffers
Hans de Goede [Sat, 12 Oct 2019 10:38:25 +0000 (12:38 +0200)] 
ply-pixel-buffer: Fix bottom edge rendering of scaled buffers

Commit 4e1c00b89a71 (" 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>
5 years agoMerge branch 'keyboard-indicator' into 'master'
Hans de Goede [Tue, 1 Oct 2019 08:12:17 +0000 (08:12 +0000)] 
Merge branch 'keyboard-indicator' into 'master'

Add keyboard layout indicator support

Closes #85

See merge request plymouth/plymouth!71

5 years agothemes: Add images for keyboard indicator support to spinner and spinfinity
Hans de Goede [Mon, 30 Sep 2019 22:19:48 +0000 (00:19 +0200)] 
themes: Add images for keyboard indicator support to spinner and spinfinity

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>
5 years agotwo-step: Add Keyboard layout indicator support
Hans de Goede [Mon, 30 Sep 2019 21:30:53 +0000 (23:30 +0200)] 
two-step: Add Keyboard layout indicator support

Use the new keymap-icon control to show a keyboard layout indicator,
when showing a dialog.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agocapslock-icon: Draw the icon on show
Hans de Goede [Mon, 30 Sep 2019 19:20:33 +0000 (21:20 +0200)] 
capslock-icon: Draw the icon on show

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>
5 years agolibply-splash-graphics: Add new keymap-icon control
Hans de Goede [Mon, 30 Sep 2019 19:02:04 +0000 (21:02 +0200)] 
libply-splash-graphics: Add new keymap-icon control

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>
5 years agoscripts: Add keymap-render.py script
Alberto Ruiz [Mon, 30 Sep 2019 14:58:55 +0000 (16:58 +0200)] 
scripts: Add keymap-render.py script

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>
5 years agorenderer: Add ply_renderer_get_keymap function
Hans de Goede [Mon, 30 Sep 2019 12:06:51 +0000 (14:06 +0200)] 
renderer: Add ply_renderer_get_keymap function

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>
5 years agoterminal: add ply_terminal_get_keymap function
Hans de Goede [Mon, 30 Sep 2019 09:01:34 +0000 (11:01 +0200)] 
terminal: add ply_terminal_get_keymap function

Add a helper function to get the keymap from the terminal.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agokey-file: Add support for non ini style config files
Hans de Goede [Sat, 28 Sep 2019 20:31:38 +0000 (22:31 +0200)] 
key-file: Add support for non ini style config files

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>
5 years agoMerge branch 'avoid_build_warning' into 'master'
Hans de Goede [Mon, 30 Sep 2019 09:25:47 +0000 (09:25 +0000)] 
Merge branch 'avoid_build_warning' into 'master'

Use GTK 3.22's way to get screen size

See merge request plymouth/plymouth!51

5 years agox11-render-plugin: Use GTK 3.22's method to get screen size to avoid
ZhaoQiang [Wed, 24 Jul 2019 12:12:51 +0000 (20:12 +0800)] 
x11-render-plugin: Use GTK 3.22's method to get screen size to avoid
deprecate warning in compile.

5 years agoMerge branch 'cleanups' into 'master'
Hans de Goede [Mon, 30 Sep 2019 09:17:47 +0000 (09:17 +0000)] 
Merge branch 'cleanups' into 'master'

Cleanups

See merge request plymouth/plymouth!70

5 years agospace-flares: Fix compiler warning
Hans de Goede [Mon, 30 Sep 2019 09:12:45 +0000 (11:12 +0200)] 
space-flares: Fix compiler warning

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>
5 years agoply-utils: Drop unused ply_string_has_prefix helper
Hans de Goede [Sat, 28 Sep 2019 19:59:20 +0000 (21:59 +0200)] 
ply-utils: Drop unused ply_string_has_prefix helper

ply_string_has_prefix is no longer used anywhere, drop it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agomain: Use ply_kernel_command_line_get_key_value where appropriate
Hans de Goede [Sat, 28 Sep 2019 19:41:14 +0000 (21:41 +0200)] 
main: Use ply_kernel_command_line_get_key_value where appropriate

Switch to ply_kernel_command_line_get_key_value where appropriate.

While at it also fix a mem-leak when falling back override_splash_path from
PLYMOUTH_RUNTIME_THEME_PATH to PLYMOUTH_THEME_PATH.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoply-utils: Add ply_kernel_command_line_get_key_value helper
Hans de Goede [Sat, 28 Sep 2019 19:10:28 +0000 (21:10 +0200)] 
ply-utils: Add ply_kernel_command_line_get_key_value helper

ply_kernel_command_line_get_string_after_prefix returns the rest of
the commandline after the passed in prefix. When parsing key=value parts
of the commandline, we really only want the value part and stop at the
whitespace separating it from other kernel commandline arguments.

This commit adds a new helper which returns a strdup-ed string containing
just the value; instead of the entire rest of the kernel commandline.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Merge show_password_prompt and show_prompt into 1 function
Hans de Goede [Sat, 28 Sep 2019 12:29:02 +0000 (14:29 +0200)] 
two-step: Merge show_password_prompt and show_prompt into 1 function

These 2 functions were doing almost the same. Move the setting of the
entry text or bullet count into view_show_prompt were it belongs and
merge these 2 functions into 1 function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwp-step: Remove superflous is_hidden / is_stopped checks from on_draw
Hans de Goede [Sat, 28 Sep 2019 10:05:11 +0000 (12:05 +0200)] 
twp-step: Remove superflous is_hidden / is_stopped checks from on_draw

Remove superflous is_hidden / is_stopped checks from our on_draw
handler. In all 3 cases the is_hidden / is_stopped check guards
a draw_area call, but the draw_area calls themselves contain the
same check, so it checking this in on_draw is not necessary.

Also note that we are already not doing such a check for e.g. the
progress_bar so lets be consistent and remove the check everywhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Cleanup stop_animation function
Hans de Goede [Sat, 28 Sep 2019 09:59:47 +0000 (11:59 +0200)] 
two-step: Cleanup stop_animation function

Cleanup the stop_animation function:
- Remove the trigger argument as all callers pass NULL
- Remove the logging of "hiding progress animation" we already log a
  generic "stopping animation" message and we do not log such a message
  for the other animated controls, so remove this one for consistency
- Add a NULL pointer check for view->end_animation, as this can actually
  be NULL when view_load_end_animation fails

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Group progress_animaton init together with creation
Hans de Goede [Sat, 28 Sep 2019 09:56:07 +0000 (11:56 +0200)] 
two-step: Group progress_animaton init together with creation

Move ply_progress_animation_set_transition call up, grouping it with the
ply_progress_animation_new call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'spinfinity-two-step' into 'master'
Hans de Goede [Mon, 30 Sep 2019 09:04:24 +0000 (09:04 +0000)] 
Merge branch 'spinfinity-two-step' into 'master'

Move the spinfinity theme to the two-step splash plugin

See merge request plymouth/plymouth!68

5 years agothemes: Move spinifity from the throbgress splash to the two-step splash
Hans de Goede [Thu, 26 Sep 2019 13:59:38 +0000 (15:59 +0200)] 
themes: Move spinifity from the throbgress splash to the two-step splash

At one point in time the two-step splash plugin was forked from the
throbgress splash. Since then the two-step plugin has grown to be more
flexible / configurable.

The two-step plugin is now flexible enough that with the right config
it can mimick the throbgress plugin. Moving the spinifity theme to
use the two-step plugin allows us to remove the throbgress plugin,
removing the code duplication between the 2 plugins.

An added advantage of this is that the two-step plugin has more functionality,
such as capslock indicator support for the password dialog.

Note the throbber-??.png images were modified to add 24 transparant rows at
the top, to get the extra hardcoded throbber-height / 2 space which the
throbgress plugin added between the throbber and the header-image, this
was done automatically using the following command:
convert old.png -background transparent -gravity northwest -splice 0x24 new.png

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Add new UseAnimation setting
Hans de Goede [Wed, 25 Sep 2019 16:56:34 +0000 (18:56 +0200)] 
two-step: Add new UseAnimation setting

Until now we have been disabling the animations when the theme specifies
that a progress-bar should be drawn for the current mode.

This commit adds a new UseAnimation setting which defaults to
!UseProgressBar to preserve the old behavior if UseAnimation is not
set by the theme.

This makes two-step more flexible. Specifically it will allow implementing
the spinfinity theme using two-step; and spinifinity is the only user of
the throbgress plugin, so this will allow removal of that plugin.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Make progress-bar location and size configurable
Hans de Goede [Wed, 25 Sep 2019 20:36:47 +0000 (22:36 +0200)] 
two-step: Make progress-bar location and size configurable

This commit makes the progress-bar location configurable seperately from
the animation location and it makes the progress-bar size configurable
instead of hardcoding it.

This makes two-step more flexible. Specifically it will allow implementing
the spinfinity theme using two-step; and spinifinity is the only user of
the throbgress plugin, so this will allow removal of that plugin.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Fix progress-bar not hiding when it should
Hans de Goede [Thu, 26 Sep 2019 08:37:07 +0000 (10:37 +0200)] 
two-step: Fix progress-bar not hiding when it should

Before this commit we were not hiding the progress-bar when starting the
end-animation nor when stop_animation gets called. This adds the 2 missing
hide calls, making the handling of the progress-bar identical to that of
the progress-animation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Fix progress-bar not updating on normal boot
Hans de Goede [Wed, 25 Sep 2019 22:52:48 +0000 (00:52 +0200)] 
two-step: Fix progress-bar not updating on normal boot

We were only calling ply_progress_bar_set_percent_done from the
system_update callback and not from the on_boot_progress callback.

This commit fixes this by adding the missing calls for this to
update_progress_animation and it makes system_update use
update_progress_animation instead of duplicating the code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Fold ply_progress_animation_hide call into view_start_end_animation
Hans de Goede [Thu, 26 Sep 2019 08:15:23 +0000 (10:15 +0200)] 
two-step: Fold ply_progress_animation_hide call into view_start_end_animation

We should always disable (hide) the progress-animation when
starting the end-animation. Instead of having all callers of
view_start_end_animation do this themselves, do it at the beginning
of view_start_end_animation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'capslock-indicator' into 'master'
Hans de Goede [Fri, 27 Sep 2019 07:36:12 +0000 (07:36 +0000)] 
Merge branch 'capslock-indicator' into 'master'

Capslock indicator

See merge request plymouth/plymouth!67

5 years agotwo-step: Add a capslock indicator
Hans de Goede [Wed, 25 Sep 2019 10:26:34 +0000 (12:26 +0200)] 
two-step: Add a capslock indicator

Add support for showing a capslock indicator when capslock is pressed
while entering a password.

This is automatically enabled if a capslock.png file is present in
the theme's image dir.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agotwo-step: Use new ply_key_file_get_* helpers to read theme file
Hans de Goede [Wed, 25 Sep 2019 19:43:43 +0000 (21:43 +0200)] 
two-step: Use new ply_key_file_get_* helpers to read theme file

Use the new ply_key_file_get_double() and ply_key_file_get_long() helpers
to get the various theme settings, resulting in a nice cleanup.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agolibply: Add ply_key_file_get_long() function
Hans de Goede [Wed, 25 Sep 2019 20:00:59 +0000 (22:00 +0200)] 
libply: Add ply_key_file_get_long() function

Add a ply_key_file_get_long() function which plugins can use to read
a long value.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agolibply: Add ply_key_file_get_double() function
Hans de Goede [Wed, 25 Sep 2019 19:30:44 +0000 (21:30 +0200)] 
libply: Add ply_key_file_get_double() function

Add a ply_key_file_get_double() function which plugins can use to read
a double value, instead of them having to repeat this pattern over and over:

  double_str = ply_key_file_get_value (key_file, "group", "key");
  if (double_str != NULL)
      foo = ply_strtod (double_str);
  else
      foo = 1.0;
  free (double_str);

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agolibply: Add ply_key_file_get_raw_value() helper
Hans de Goede [Wed, 25 Sep 2019 19:26:27 +0000 (21:26 +0200)] 
libply: Add ply_key_file_get_raw_value() helper

Add a private ply_key_file_get_raw_value() helper to avoid code-duplication
between ply_key_file_get_value() and ply_key_file_get_bool().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agolibply-splash-graphics: Add new capslock-icon control
Hans de Goede [Mon, 23 Sep 2019 12:58:24 +0000 (14:58 +0200)] 
libply-splash-graphics: Add new capslock-icon control

Add a new control which draws a capslock-icon when capslock is active
(as reported by the renderer).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoply-renderer: Add ply_renderer_get_capslock_state function
Hans de Goede [Mon, 23 Sep 2019 12:36:18 +0000 (14:36 +0200)] 
ply-renderer: Add ply_renderer_get_capslock_state function

Add a function to get the capslock state from a renderer and implement
this for the drm and frame-buffer renderers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoterminal: add ply_terminal_get_capslock_state function
Hans de Goede [Mon, 23 Sep 2019 12:30:33 +0000 (14:30 +0200)] 
terminal: add ply_terminal_get_capslock_state function

Add a helper function to get the capslock-state from the terminal.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'label-rotation-fix' into 'master'
Hans de Goede [Tue, 24 Sep 2019 06:14:57 +0000 (06:14 +0000)] 
Merge branch 'label-rotation-fix' into 'master'

label: Properly deal with pixel-buffers with non-upright device_rotation

See merge request plymouth/plymouth!66

5 years agolabel: Properly deal with pixel-buffers with non-upright device_rotation
Hans de Goede [Thu, 19 Sep 2019 14:05:17 +0000 (16:05 +0200)] 
label: Properly deal with pixel-buffers with non-upright device_rotation

Fix the label plugin rendering garbled (wrong pitch) top to bottom text,
instead of proper left to right text when the pixel-buffer has a
device-rotation of rotate-clockwise or rotate-counter-clockwise.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1753418
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'amdgpu-fix' into 'master'
Hans de Goede [Thu, 19 Sep 2019 14:13:56 +0000 (14:13 +0000)] 
Merge branch 'amdgpu-fix' into 'master'

ply-device-manager: De-activate and close renderer on device hot unplug

See merge request plymouth/plymouth!59

5 years agoply-device-manager: De-activate and close renderer on device hot unplug
Hans de Goede [Fri, 6 Sep 2019 15:21:45 +0000 (17:21 +0200)] 
ply-device-manager: De-activate and close renderer on device hot unplug

When a device gets hot unplugged, we should de-activate and close the
renderer before freeing it.

Speficially this fixes a problem where plymouth's display "freezes" when
used with AMD GPUs which can be handled by both the radeon or the amdgpu
kms driver and the user has added kernel commandline options to prefer
the amdgpu driver. In this case the following happens:

1) radeon driver gets loaded, creates /dev/dri/card0 generating a udev
   "add /dev/dri/card0" event.
2) radeon driver's "load" method checks if it should bind, comes to the
   conclusion it should not, causing the probe of the device to be
   aborted and /dev/dri/card0 to be unregistered generating a udev
   "remove /dev/dri/card0"  event
3) amdgpu driver loads, creates /dev/dri/card0 generating another udev
   "add /dev/dri/card0" event.
4) plymouth loads while udev is still catching up with kernel events,
   plymouth sees the first "add" event opens /dev/dri/card0 (which is
   already managed by amdgpu at this time) finds outputs, shows splash
5) plymouth gets the "remove" events tears down the renderer, but
   since deactivate and close were not called before this commit,
   plymouth keeps the master rights attached to the old-fd which is
   leaked at this point
6) plymouth gets the second "add" event brings everything back up, but
   it cannot get master rights, since there can only be 1 master and the
   leaked fd is the master. This leads to lots of:
   "Couldn't set scan out buffer" errors and plymouth appears frozen
   because of this, this is esp. bad with the disk encryption unlock screen
7) When gdm starts, it deactivates plymouth, but does not yet tell it to quit
   to avoid flickering. The deactivate makes plymouth drop its master rights,
   but this happens on the new broken fd which never got the master rights.
   This also makes it impossible for gdm to get master rights, also breaking
   gdm, with the following error in the logs:
   "(EE) wl_drm@4: error 0: authenicate failed"

Note in theory calling ply_renderer_close() on teardown (from
ply_device_manager_free()) should be fine too, but for some reason
this causes the framebuffer to be all messed up (looks like wrong pitch /
tiling) when this is done after gdm has taken over the framebuffer.

Where as just exiting without calling drmModeRmFB, letting the kernel
clean up behind us, does not trigger this. This feels like it is a kernel
bug bug and I will file a bug for this. But for now we should not call
ply_renderer_close() on teardown to avoid this issue (which would be a
regression).

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1490490
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoscript: Add image tile support.
Dimitri John Ledkov [Tue, 10 Sep 2019 13:00:08 +0000 (14:00 +0100)] 
script: Add image tile support.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
5 years agoMerge branch 'sync_l10n_gnome_translations' into 'master'
Ray Strode [Wed, 11 Sep 2019 13:05:20 +0000 (13:05 +0000)] 
Merge branch 'sync_l10n_gnome_translations' into 'master'

Translations: Sync l10n.gnome.org's translation.

See merge request plymouth/plymouth!63

5 years agoTranslations: Sync l10n.gnome.org's translation.
ZhaoQiang [Mon, 9 Sep 2019 08:21:48 +0000 (16:21 +0800)] 
Translations: Sync l10n.gnome.org's translation.

5 years agoMerge branch 'adjust_Turkish_translation' into 'master'
Ray Strode [Mon, 9 Sep 2019 20:15:35 +0000 (20:15 +0000)] 
Merge branch 'adjust_Turkish_translation' into 'master'

Translation: Adjust the Turkish translation(tr.po), it's better to keep all po files in the /po directory together.

See merge request plymouth/plymouth!62

5 years agoTranslation: Adjust the Turkish translation(tr.po), it's better to keep all po
ZhaoQiang [Mon, 9 Sep 2019 05:40:22 +0000 (13:40 +0800)] 
Translation: Adjust the Turkish translation(tr.po), it's better to keep all po
files in the /po directory together.

5 years agoMerge branch 'device-timeout-default' into 'master'
Hans de Goede [Sun, 8 Sep 2019 13:45:08 +0000 (13:45 +0000)] 
Merge branch 'device-timeout-default' into 'master'

plymouthd.defaults: Bump default DeviceTimeout to 8 seconds

See merge request plymouth/plymouth!58

5 years agoplymouthd.defaults: Bump default DeviceTimeout to 8 seconds
Hans de Goede [Fri, 6 Sep 2019 15:40:06 +0000 (17:40 +0200)] 
plymouthd.defaults: Bump default DeviceTimeout to 8 seconds

The amdgpu driver needs up to 5 seconds to initialize / boot some
AMD GPUs, which makes our 5 second timeout much too close to the actual
needed time, leading to systems where sometimes the boot is fine and the
next boot we fallback to a text based splash because we won the race from
the GPU probe code.

This commit bumps the default DeviceTimeout to 8 seconds giving us a
decent marging here without making it overly long.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1737221
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'libreajans-master-patch-41995' into 'master'
Ray Strode [Sat, 7 Sep 2019 21:31:59 +0000 (21:31 +0000)] 
Merge branch 'libreajans-master-patch-41995' into 'master'

Update tr.po

See merge request plymouth/plymouth!61

5 years agoUpdate tr.po
libre ajans [Sat, 7 Sep 2019 21:31:59 +0000 (21:31 +0000)] 
Update tr.po

5 years agoMerge branch 'twostep-another-bgrt-fix' into 'master'
Hans de Goede [Fri, 6 Sep 2019 15:38:17 +0000 (15:38 +0000)] 
Merge branch 'twostep-another-bgrt-fix' into 'master'

two-step: bgrt: Add workaround for desktops which do not use the golden ratio

See merge request plymouth/plymouth!56

5 years agotwo-step: bgrt: Add workaround for desktops which do not use the golden ratio
Hans de Goede [Sun, 25 Aug 2019 16:01:59 +0000 (18:01 +0200)] 
two-step: bgrt: Add workaround for desktops which do not use the golden ratio

On desktops (no panel) we normally do not use the BGRT provided
xoffset and yoffset because the resolution they are intended for
may be differtent then the resolution of the current display.

On some desktops (no panel) the image gets centered not only
horizontally, but also vertically. In this case our default of using
the golden ratio for the vertical position causes the BGRT image
to jump.

To avoid this this commits adds an extra check to see if the provided
xoffset and yoffset perfectly center the image and in that case uses them.

An example of a system needing this workaround is the Minix Neo Z83-4.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 years agoMerge branch 'revert-0d0f21a8' into 'master'
Ray Strode [Fri, 6 Sep 2019 11:57:13 +0000 (11:57 +0000)] 
Merge branch 'revert-0d0f21a8' into 'master'

Revert "Merge branch 'avoid_shutdown_failure_v2' into 'master'"

See merge request plymouth/plymouth!57

5 years agoRevert "Merge branch 'avoid_shutdown_failure_v2' into 'master'"
ZhaoQiang [Fri, 6 Sep 2019 10:17:07 +0000 (10:17 +0000)] 
Revert "Merge branch 'avoid_shutdown_failure_v2' into 'master'"

This reverts merge request !55

5 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Thu, 5 Sep 2019 13:36:09 +0000 (13:36 +0000)] 
Merge branch 'bugfix' into 'master'

ply-utils: Drop ply_fd_can_take_data and ply_fd_may_block function

See merge request plymouth/plymouth!50

5 years agoply-utils: Drop ply_fd_can_take_data and ply_fd_may_block function Since it is from...
ZhaoQiang [Sun, 21 Jul 2019 13:59:58 +0000 (21:59 +0800)] 
ply-utils: Drop ply_fd_can_take_data and ply_fd_may_block function Since it is from a bygone time which is no longer in use.

5 years agoMerge branch 'get_rid_of_dead_code' into 'master'
Ray Strode [Thu, 5 Sep 2019 13:35:22 +0000 (13:35 +0000)] 
Merge branch 'get_rid_of_dead_code' into 'master'

ply-utils: Get rid of unused old code,

See merge request plymouth/plymouth!53

5 years agoply-utils: Get rid of unused old code, drop function ply_get_max_open_fds,
ZhaoQiang [Tue, 30 Jul 2019 09:04:25 +0000 (17:04 +0800)] 
ply-utils: Get rid of unused old code, drop function ply_get_max_open_fds,
ply_close_open_fds, ply_close_all_fds.

5 years agoMerge branch 'update_spec' into 'master'
Ray Strode [Thu, 5 Sep 2019 13:32:08 +0000 (13:32 +0000)] 
Merge branch 'update_spec' into 'master'

scripts: update file plymouth.spec to integrate recent fixes.

See merge request plymouth/plymouth!54

5 years agoscripts: update file plymouth.spec to integrate recent fixes.
zhaoqiang [Sun, 4 Aug 2019 14:43:32 +0000 (22:43 +0800)] 
scripts: update file plymouth.spec to integrate recent fixes.

6 years agoMerge branch 'avoid_shutdown_failure_v2' into 'master'
Ray Strode [Wed, 14 Aug 2019 15:33:09 +0000 (15:33 +0000)] 
Merge branch 'avoid_shutdown_failure_v2' into 'master'

ply-systemd-units: Drop attach-session in systemd-units to avoid the failure of unmounting separate /var during poweroff.

See merge request plymouth/plymouth!55

6 years agoply-systemd-units: Drop attach-session in systemd-units to avoid
ZhaoQiang [Tue, 13 Aug 2019 09:39:10 +0000 (17:39 +0800)] 
ply-systemd-units: Drop attach-session in systemd-units to avoid
the failure of unmounting separate /var during poweroff.

6 years agoMerge branch 'twostep-bgrt-fix' into 'master'
Hans de Goede [Thu, 8 Aug 2019 10:07:12 +0000 (10:07 +0000)] 
Merge branch 'twostep-bgrt-fix' into 'master'

two-step: Deal with buggy firmware which does not pre-rotate the bgrt image

See merge request plymouth/plymouth!49

6 years agotwo-step: Deal with buggy firmware which does not pre-rotate the bgrt image
Hans de Goede [Thu, 18 Jul 2019 15:51:54 +0000 (17:51 +0200)] 
two-step: Deal with buggy firmware which does not pre-rotate the bgrt image

Some buggy Lenovo 2-in-1s with a 90 degree rotated panel, behave as
if the panel is mounted up-right / not rotated at all. These devices
have a buggy efifb size (landscape resolution instead of the actual
portrait resolution of the panel), this gets fixed-up by the kernel.

These buggy devices also do not pre-rotate the bgrt_image nor do
they set the ACPI-6.2 rotation status-bits. We can detect this by
checking that the bgrt_image is perfectly centered horizontally
when we use the panel's height as the width.

This commit uses this check to override the bgrt-rotation read from
the ACPI-6.2 rotation status-bits, fixing us displaying the bgrt image
with the wrong rotation.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1730783
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoMerge branch 'revert-2572c428' into 'master'
Ray Strode [Tue, 16 Jul 2019 13:50:51 +0000 (13:50 +0000)] 
Merge branch 'revert-2572c428' into 'master'

Revert "Merge branch 'bugfix' into 'master'"

See merge request plymouth/plymouth!47

6 years agoRevert "Merge branch 'bugfix' into 'master'"
Ray Strode [Tue, 16 Jul 2019 13:50:37 +0000 (13:50 +0000)] 
Revert "Merge branch 'bugfix' into 'master'"

This reverts merge request !46

6 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Tue, 16 Jul 2019 13:37:29 +0000 (13:37 +0000)] 
Merge branch 'bugfix' into 'master'

ply-utils: Drop ply_fd_can_take_data and ply_fd_may_block function

See merge request plymouth/plymouth!46

6 years agoply-utils: Drop ply_fd_can_take_data and ply_fd_may_block function Since it is from
ZhaoQiang [Tue, 16 Jul 2019 13:37:29 +0000 (13:37 +0000)] 
ply-utils: Drop ply_fd_can_take_data and ply_fd_may_block function Since it is from
a bygone time which is no longer in use.

6 years agoconfigure: bump so name
Ray Strode [Mon, 15 Jul 2019 14:51:54 +0000 (10:51 -0400)] 
configure: bump so name

not that our library is really general purpose or anything, but
dropped some functions, so incr the so.

6 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Mon, 15 Jul 2019 10:14:06 +0000 (10:14 +0000)] 
Merge branch 'bugfix' into 'master'

ply terminal session: Drop function ply_terminal_session_execute and ply_terminal_session_open_console

See merge request plymouth/plymouth!45

6 years agoply terminal session: Drop function ply_terminal_session_execute and
ZhaoQiang [Mon, 15 Jul 2019 10:14:06 +0000 (10:14 +0000)] 
ply terminal session: Drop function ply_terminal_session_execute and
ply_terminal_session_open_console, Since this is a feature from a bygone
time which is no longer in use without ply_terminal_session_run.

6 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Fri, 12 Jul 2019 17:44:29 +0000 (17:44 +0000)] 
Merge branch 'bugfix' into 'master'

Internationalization: Add zh_HK and zh_TW translations.

See merge request plymouth/plymouth!42

6 years agoInternationalization: Add zh_HK and zh_TW translations.
ZhaoQiang [Fri, 12 Jul 2019 17:44:29 +0000 (17:44 +0000)] 
Internationalization: Add zh_HK and zh_TW translations.

6 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Thu, 11 Jul 2019 21:53:31 +0000 (21:53 +0000)] 
Merge branch 'bugfix' into 'master'

Drop function ply_terminal_session_run

See merge request plymouth/plymouth!41

6 years agoply terminal session: Drop ply_terminal_session_run, this is a feature from a bygone...
ZhaoQiang [Thu, 11 Jul 2019 21:53:31 +0000 (21:53 +0000)] 
ply terminal session: Drop ply_terminal_session_run, this is a feature from a bygone time which is no longer in use

6 years agoRegenerate plymouth.pot
Hans de Goede [Wed, 12 Jun 2019 09:55:21 +0000 (11:55 +0200)] 
Regenerate plymouth.pot

Regenerate plymouth.pot to add the strings for the new firmware-upgrade
mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoMerge branch 'twostep-bgrt-fix' into 'master'
Hans de Goede [Tue, 11 Jun 2019 14:53:13 +0000 (14:53 +0000)] 
Merge branch 'twostep-bgrt-fix' into 'master'

two-step: Add support for firmware-splashes with rotation status bits set

See merge request plymouth/plymouth!35

6 years agotwo-step: Add support for firmware-splashes with rotation status bits set
Hans de Goede [Fri, 24 May 2019 20:49:15 +0000 (22:49 +0200)] 
two-step: Add support for firmware-splashes with rotation status bits set

Before the ACPI 6.2 specification, the BGRT table did not contain any rotation
information, so to make sure that the firmware-splash showed the right way up
the firmware would contain a pre-rotated image and our BGRT / firmware-splash
loading code assumed this is alwast true.

Starting with ACPI 6.2 tge bgrt status fields has 2 bits to tell the firmware
the image needs to be rotated before being displayed. If these bits are set
then the firmwares-splash is not pre-rotated and we must handle it differently.

This commit adds support for reading the new rotation bits from the sysfs
bgrt/status file and adds handling for the case where the bits indicate
that the image is not pre-rotated.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Wed, 5 Jun 2019 10:42:24 +0000 (10:42 +0000)] 
Merge branch 'bugfix' into 'master'

Unify all code's vi format control.

See merge request plymouth/plymouth!40

6 years agoUnify all code's vi format control.
ZhaoQiang [Wed, 5 Jun 2019 10:42:24 +0000 (10:42 +0000)] 
Unify all code's vi format control.
Update several file's vi format control line to make it easy to maintain.

6 years agoMerge branch 'bugfix' into 'master'
Ray Strode [Sun, 2 Jun 2019 19:52:58 +0000 (19:52 +0000)] 
Merge branch 'bugfix' into 'master'

ply-text-display.c: Correct vi format line

See merge request plymouth/plymouth!38

6 years agoply-text-display.c: Correct vi format line
ZhaoQiang [Sun, 2 Jun 2019 19:52:58 +0000 (19:52 +0000)] 
ply-text-display.c: Correct vi format line
make vi can directly edit this file without errors and make it use 8 space
tabs etc.

6 years agoMerge branch 'wip/hughsie/firmware-upgrade' into 'master'
Ray Strode [Wed, 29 May 2019 17:52:43 +0000 (17:52 +0000)] 
Merge branch 'wip/hughsie/firmware-upgrade' into 'master'

Add a new firmware-upgrade mode for use by fwupd

See merge request plymouth/plymouth!33

6 years agoAdd a new firmware-upgrade mode for use by fwupd
Richard Hughes [Mon, 25 Mar 2019 09:39:24 +0000 (09:39 +0000)] 
Add a new firmware-upgrade mode for use by fwupd

This allows us to have accurate localised text, and also to use the vendor BIOS
logo when applying firmware updates.