]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
14 months agoply-device-manager: Move local_console_terminal handling for DRM/FB renderers
Hans de Goede [Wed, 5 Jun 2024 19:38:43 +0000 (21:38 +0200)] 
ply-device-manager: Move local_console_terminal handling for DRM/FB renderers

create_devices_for_terminal_and_renderer_type () only ever gets called with
a NULL terminal parameter when create_devices_for_udev_device () is calling
it to create a DRM or FB renderer.

Move the use of local_console_terminal as terminal for the first DRM / FB
renderer created from create_devices_for_udev_device () to
create_devices_for_terminal_and_renderer_type () with an extra !terminal
check.

This is a preparation patch for fixing an issue where the local_console
is managed by a simpledrm renderer and the remove event for that gets
processed after the add event of the normal drm device which leaves
the local_console unmanaged breaking legacy input support.

14 months agoply-device-manager: Skip /dev/dri/render nodes
Hans de Goede [Wed, 5 Jun 2024 19:31:55 +0000 (21:31 +0200)] 
ply-device-manager: Skip /dev/dri/render nodes

DRM render nodes do not support KMS and trying to probe them just
slows things down, so skip them.

14 months agoply-renderer: Add ply_renderer_get_type ()
Hans de Goede [Tue, 4 Jun 2024 20:05:20 +0000 (22:05 +0200)] 
ply-renderer: Add ply_renderer_get_type ()

Add a ply_renderer_get_type () helper function to get the type of
a renderer.

14 months agoply-renderer: Add new PLY_RENDERER_TYPE_SIMPLEDRM renderer-type
Hans de Goede [Tue, 4 Jun 2024 19:24:22 +0000 (21:24 +0200)] 
ply-renderer: Add new PLY_RENDERER_TYPE_SIMPLEDRM renderer-type

Add a new PLY_RENDERER_TYPE_SIMPLEDRM renderer-type to help differentiate
the simpledrm case from the regular drm device case.

simpledrm devices require some special handling in the device-manager,
this is a preparation patch for improving the simpledrm handling
in ply-device-manager.

14 months agoply-device-manager: Add syspath_is_simpledrm () helper
Hans de Goede [Tue, 4 Jun 2024 19:16:31 +0000 (21:16 +0200)] 
ply-device-manager: Add syspath_is_simpledrm () helper

Add a helper to determine if a udev syspath is a simpledrm device.
This is a preparation patch to for making simpledrm devices their
own renderer-type.

14 months agoply-utils: Add ply_string_has_suffix () helper function
Hans de Goede [Tue, 4 Jun 2024 19:09:00 +0000 (21:09 +0200)] 
ply-utils: Add ply_string_has_suffix () helper function

Add a ply_string_has_suffix () helper function to match the existing
ply_string_has_prefix () helper function.

14 months agoMerge branch 'revert-fallback-to-text-if-no-renderers' into 'main'
Hans de Goede [Wed, 5 Jun 2024 13:00:20 +0000 (13:00 +0000)] 
Merge branch 'revert-fallback-to-text-if-no-renderers' into 'main'

ply-device-manager: Revert "Fall back to text plugin if no renderers installed"

See merge request plymouth/plymouth!319

14 months agoply-device-manager: Revert "Fall back to text plugin if no renderers installed"
Hans de Goede [Tue, 7 May 2024 10:42:10 +0000 (12:42 +0200)] 
ply-device-manager: Revert "Fall back to text plugin if no renderers installed"

The drm renderer may fail to open /dev/dri/card# with -ENOENT when trying
to open/probe a simpledrm registered drm device and the open races with
that drm device being removed to be replaced by a new drm device registered
by the native GPU driver (e.g. i915 / amdgpu).

Switching to text mode immediately when this race gets hit is undesirable,
as it causes text mode on systems where plymouth would run in graphics
mode before. Remove the immediate switch to text mode on -ENOENT.
Delaying the switch to textmode until the timeout as before.

This reverts commit 03842d5201e4486fe62635c7b470eb94696f985d.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2270030
14 months agoMerge branch 'mr256' into 'main'
Ray Strode [Tue, 4 Jun 2024 15:06:13 +0000 (15:06 +0000)] 
Merge branch 'mr256' into 'main'

Issue #256

See merge request plymouth/plymouth!322

14 months agoply-utils: Ensure random ints are big enough
emperor06 [Tue, 4 Jun 2024 14:42:11 +0000 (16:42 +0200)] 
ply-utils: Ensure random ints are big enough

Using Math.Random() in a theme script practically always returns zero.
This is because ply_get_random_number uses mrand48 which, while
returning a 64-bit long, restricts the range of its return value
to be no more than 32-bit, and so gets improperly normalized.

This commit addresses the problem by calling mrand48() twice, once for
each 32-bits of the returned value.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/256

15 months agoMerge branch 'fixmeson' into 'main'
Ray Strode [Tue, 30 Apr 2024 01:19:15 +0000 (01:19 +0000)] 
Merge branch 'fixmeson' into 'main'

Bump required Meson version

See merge request plymouth/plymouth!314

15 months agoBump required Meson version
nerdopolis [Sun, 21 Apr 2024 20:09:53 +0000 (16:09 -0400)] 
Bump required Meson version

15 months agoMerge branch 'xkbcommon-dep' into 'main'
Ray Strode [Wed, 24 Apr 2024 18:47:30 +0000 (18:47 +0000)] 
Merge branch 'xkbcommon-dep' into 'main'

ply-splash-core: Add xkbcommon dep to pkgconfig file

See merge request plymouth/plymouth!316

15 months agoply-splash-core: Add xkbcommon dep to pkgconfig file
Ray Strode [Wed, 24 Apr 2024 18:44:07 +0000 (14:44 -0400)] 
ply-splash-core: Add xkbcommon dep to pkgconfig file

This addresses a build blip.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/251

17 months agoMerge branch 'weblate-plymouth-master' into 'main'
Ray Strode [Sun, 17 Mar 2024 18:45:12 +0000 (18:45 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!312

17 months agoTranslated using Weblate (Kazakh)
Baurzhan Muftakhidinov [Sun, 10 Mar 2024 09:36:09 +0000 (10:36 +0100)] 
Translated using Weblate (Kazakh)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Kazakh)

Co-authored-by: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/kk/
Translation: plymouth/main

17 months agoTranslated using Weblate (Kabyle)
ButterflyOfFire [Sun, 10 Mar 2024 09:36:08 +0000 (10:36 +0100)] 
Translated using Weblate (Kabyle)

Currently translated at 57.1% (4 of 7 strings)

Added translation using Weblate (Kabyle)

Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/kab/
Translation: plymouth/main

17 months agoMerge branch 'scriptparsekmsg' into 'main'
Ray Strode [Fri, 8 Mar 2024 16:31:25 +0000 (16:31 +0000)] 
Merge branch 'scriptparsekmsg' into 'main'

script: Get the messages from the console and ply-kmsg-reader, and use...

See merge request plymouth/plymouth!277

17 months agoscript: Get the messages from the console and ply-kmsg-reader, and use ply-terminal...
nerdopolis [Tue, 26 Dec 2023 23:19:52 +0000 (18:19 -0500)] 
script: Get the messages from the console and ply-kmsg-reader, and use ply-terminal-emulator and ply-console-viewer to the display messages

17 months agoMerge branch 'fix-no-unused-warning' into 'main'
Ray Strode [Thu, 7 Mar 2024 20:22:29 +0000 (20:22 +0000)] 
Merge branch 'fix-no-unused-warning' into 'main'

ply-buffer: Fix unused-value warning

Closes #246

See merge request plymouth/plymouth!309

17 months agoply-buffer: Fix unused-value warning
Ray Strode [Thu, 7 Mar 2024 20:09:44 +0000 (15:09 -0500)] 
ply-buffer: Fix unused-value warning

We currently get warnings during the build like

```
../src/libply/ply-buffer.h:60:20: warning: value computed is not
used [-Wunused-value]
60 |              !_ran && (*bytes = (char *) ply_buffer_get_bytes(buffer),
   |                    ^~
```

This commit changes the macro to use a GCC statement expression with
an if statement to work around the warning.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/246
17 months agoMerge branch 'bias-scale-downward' into 'main'
Ray Strode [Wed, 6 Mar 2024 14:33:11 +0000 (14:33 +0000)] 
Merge branch 'bias-scale-downward' into 'main'

ply-utils: Only choose scale 2 when the perfect scale would be >= 1.75

See merge request plymouth/plymouth!308

17 months agoply-utils: Only choose scale 2 when the perfect scale would be >= 1.75
Daniel van Vugt [Tue, 5 Mar 2024 09:51:11 +0000 (17:51 +0800)] 
ply-utils: Only choose scale 2 when the perfect scale would be >= 1.75

This is the intended design documented in:
https://gitlab.gnome.org/GNOME/mutter/-/commit/d03dce43786d

And discussed in:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3616

17 months agoMerge branch 'match-mutter-default-scale' into 'main'
Ray Strode [Tue, 27 Feb 2024 08:07:23 +0000 (08:07 +0000)] 
Merge branch 'match-mutter-default-scale' into 'main'

ply-utils: Match mutter's default device scale choice

See merge request plymouth/plymouth!307

17 months agoply-utils: Match mutter's default device scale choice
Daniel van Vugt [Tue, 27 Feb 2024 06:47:59 +0000 (14:47 +0800)] 
ply-utils: Match mutter's default device scale choice

Until now, laptops with a DPI between 192 and 202 would be given a
default scale of 2 by Plymouth, and 1 by Mutter for the login screen.
That made the visual transition a bit ugly so let's match Mutter's
default scale selection. This means the threshold for laptops is now
1.5 x 135 = 202 DPI instead of 192 DPI. And for desktop monitors it's
now 1.5 x 110 = 165 DPI instead of 192 DPI.

Closes: https://bugs.launchpad.net/bugs/2054769
17 months agoMerge branch 'weblate-plymouth-master' into 'main'
Ray Strode [Mon, 26 Feb 2024 14:50:25 +0000 (14:50 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!306

17 months agoTranslated using Weblate (Turkish)
Sabri Ünal [Mon, 26 Feb 2024 01:36:08 +0000 (02:36 +0100)] 
Translated using Weblate (Turkish)

Currently translated at 100.0% (5 of 5 strings)

Co-authored-by: Sabri Ünal <libreajans@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/tr/
Translation: plymouth/main

18 months agoMerge branch 'fix240' into 'main'
n3rdopolis [Wed, 7 Feb 2024 01:29:18 +0000 (01:29 +0000)] 
Merge branch 'fix240' into 'main'

ply-boot-splash: Set unbuffered input when creating a text display

Closes #240

See merge request plymouth/plymouth!303

18 months agoply-boot-splash: Set unbuffered input when creating a text display
n3rdopolis [Tue, 6 Feb 2024 23:52:25 +0000 (18:52 -0500)] 
ply-boot-splash: Set unbuffered input when creating a text display

18 months agoMerge branch 'ev_led_not_needed' into 'main'
Ray Strode [Thu, 1 Feb 2024 10:39:17 +0000 (10:39 +0000)] 
Merge branch 'ev_led_not_needed' into 'main'

xkb_state_led_name_is_active does not appear to require devices to have EV_LED

See merge request plymouth/plymouth!305

18 months agoxkb_state_led_name_is_active does not appear to require devices to have EV_LED
n3rdopolis [Thu, 1 Feb 2024 05:10:47 +0000 (00:10 -0500)] 
xkb_state_led_name_is_active does not appear to require devices to have EV_LED

This allows the on-screen caps lock indicator to work on HyperV keyboards, and HyperV has one keyboard

18 months agoMerge branch 'fix245' into 'main'
Ray Strode [Wed, 31 Jan 2024 16:14:08 +0000 (16:14 +0000)] 
Merge branch 'fix245' into 'main'

renderers: Do not assume all keyboards have LEDs

Closes #245

See merge request plymouth/plymouth!304

18 months agorenderers: Do not assume all keyboards have LEDs
n3rdopolis [Wed, 31 Jan 2024 13:38:38 +0000 (08:38 -0500)] 
renderers: Do not assume all keyboards have LEDs

This is an attempt to fix #245

19 months agoMerge branch 'fix-freetype-fallback' into 'main'
Ray Strode [Tue, 16 Jan 2024 02:06:59 +0000 (02:06 +0000)] 
Merge branch 'fix-freetype-fallback' into 'main'

label-freetype: fix fallback not working when fc-match isn't available

Closes #239

See merge request plymouth/plymouth!302

19 months agolabel-freetype: fix fallback not working when fc-match isn't available
Ferdinand Bachmann [Tue, 16 Jan 2024 00:52:11 +0000 (01:52 +0100)] 
label-freetype: fix fallback not working when fc-match isn't available

The new font loading functions introduced in
544e62ac41a490f04d8e6b4e85f8b9fa1171b0cc assume that popen() returns
NULL when fc-match is unavailable or fails. This is incorrect, since
popen() will always start a shell to run the passed command and return a
stream to that shell's stdin and stdout.

This results in an non-null but empty font name being passed to
FT_New_Face(), which fails.

This commit fixes this by also using the fallback font when the font
path read from the popen() stream is empty.

Fixes #239
Fixes regression caused by 544e62ac41a490f04d8e6b4e85f8b9fa1171b0cc

19 months agoMerge branch 'inibash' into 'main'
n3rdopolis [Sat, 13 Jan 2024 00:33:26 +0000 (00:33 +0000)] 
Merge branch 'inibash' into 'main'

plymouth-set-default-theme: Use a more targeted bash ini-parser function...

Closes #238

See merge request plymouth/plymouth!300

19 months agoplymouth-set-default-theme: Use a more targeted bash ini-parser function instead...
nerdopolis [Wed, 10 Jan 2024 03:02:14 +0000 (22:02 -0500)] 
plymouth-set-default-theme: Use a more targeted bash ini-parser function instead of sed to handle the config file

19 months agoMerge branch 'fixinigroup' into 'main'
Ray Strode [Wed, 10 Jan 2024 19:46:10 +0000 (19:46 +0000)] 
Merge branch 'fixinigroup' into 'main'

splash plugins: Fix wrong group being used for console viewer settings in...

See merge request plymouth/plymouth!301

19 months agosplash plugins: Fix wrong group being used for console viewer settings in space-flare...
nerdopolis [Wed, 10 Jan 2024 12:20:02 +0000 (07:20 -0500)] 
splash plugins: Fix wrong group being used for console viewer settings in space-flares and fade-throbber

19 months agoMerge branch 'fixinputwarnings' into 'main'
Ray Strode [Fri, 5 Jan 2024 15:42:39 +0000 (15:42 +0000)] 
Merge branch 'fixinputwarnings' into 'main'

ply-input-device: Fix 'may be used uninitialized' warnings

See merge request plymouth/plymouth!299

19 months agoply-input-device: Fix 'may be used uninitialized' warnings
n3rdopolis [Fri, 5 Jan 2024 15:42:39 +0000 (15:42 +0000)] 
ply-input-device: Fix 'may be used uninitialized' warnings

If libevdev gave plymouth an event with an out of range key event type then plymouth would end up using uninitialized variables.

This commit fixes the compiler warning introduced from that unlikely scenario.

19 months agoMerge branch 'fixvtlesscrash' into 'main'
Ray Strode [Fri, 5 Jan 2024 10:20:26 +0000 (10:20 +0000)] 
Merge branch 'fixvtlesscrash' into 'main'

ply-terminal: Fix crash on vt-less kernels when checking the enabled state

See merge request plymouth/plymouth!298

19 months agorenderers: Only call ply_terminal_set_unbuffered_input when there is a terminal
nerdopolis [Fri, 5 Jan 2024 02:42:28 +0000 (21:42 -0500)] 
renderers: Only call ply_terminal_set_unbuffered_input when there is a terminal

19 months agoply-terminal: Fix crash on vt-less kernels when checking the enabled state
nerdopolis [Fri, 5 Jan 2024 02:06:50 +0000 (21:06 -0500)] 
ply-terminal: Fix crash on vt-less kernels when checking the enabled state

19 months agoMerge branch 'fix-hidpi-on-freetype' into 'main' 24.004.60
Ray Strode [Thu, 4 Jan 2024 21:08:14 +0000 (21:08 +0000)] 
Merge branch 'fix-hidpi-on-freetype' into 'main'

label-freetype: Fix rowstride bug with hidpi displays

See merge request plymouth/plymouth!297

19 months agolabel-freetype: Force resize calculation when moving control
Ray Strode [Thu, 4 Jan 2024 21:05:40 +0000 (16:05 -0500)] 
label-freetype: Force resize calculation when moving control

When moving the label around we need to do a full recalculation
of the metrics, because the position is part of the computation.

19 months agolabel-freetype: Fix rowstride bug with hidpi displays
Ray Strode [Wed, 3 Jan 2024 21:24:50 +0000 (16:24 -0500)] 
label-freetype: Fix rowstride bug with hidpi displays

The freetype plugin correctly doubles the DPI on hidpi displays,
but fails to account for the doubled pixels in display's pixel buffer.

This commit adds a factor of 2 to the size and positioncomputations,
to hopefully fix a row stride and a positioning bug.

19 months agoMerge branch 'weblate-plymouth-master' into 'main'
Ray Strode [Thu, 4 Jan 2024 09:25:55 +0000 (09:25 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!234

19 months agoTranslated using Weblate (Welsh)
Diogyn D [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Welsh)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Welsh)

Co-authored-by: Diogyn D <diogyn@tutanota.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/cy/
Translation: plymouth/main

19 months agoTranslated using Weblate (Galician)
Fran Diéguez [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Galician)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Galician)

Co-authored-by: Fran Diéguez <frandieguez@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/gl/
Translation: plymouth/main

19 months agoTranslated using Weblate (Dutch)
Philip Goto [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Dutch)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Philip Goto <philip.goto@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/nl/
Translation: plymouth/main

19 months agoTranslated using Weblate (Czech)
Pavel Borecki [Fri, 13 Oct 2023 14:36:11 +0000 (16:36 +0200)] 
Translated using Weblate (Czech)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Pavel Borecki <pavel.borecki@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/cs/
Translation: plymouth/main

19 months agoMerge branch 'fix-freetype-loading-bug' into 'main'
Ray Strode [Wed, 3 Jan 2024 21:24:44 +0000 (21:24 +0000)] 
Merge branch 'fix-freetype-loading-bug' into 'main'

label-freetype: Rework font loading

See merge request plymouth/plymouth!296

19 months agolabel-freetype: Rework font loading
Ray Strode [Wed, 3 Jan 2024 20:37:08 +0000 (15:37 -0500)] 
label-freetype: Rework font loading

There's currently this function, set_font_with_fallback, that
almost always gets called with a NULL first argument in the
initramfs, forcing the _with_fallback part of the function to
run.

It's a little strange to have a function with a chunk of code that
hardly ever runs. Furthermore there's a bug where the error variable
is left uninitialized in this case leading to the freetype plugin
sporadically failing to load the fallback font.

This commit reworks things to drop set_font_with_fallback, and just
call FT_New_Face directly in the caller. Fallbacks are handled
at the point where the font path is determined
(previously called query_fc_match, now called find_default_font_path.

19 months agoMerge branch 'fix-pango-hex-box-removal' into 'main'
Ray Strode [Wed, 3 Jan 2024 16:29:51 +0000 (16:29 +0000)] 
Merge branch 'fix-pango-hex-box-removal' into 'main'

label-pango: Try to fix up remove_hexboxes_from_pango_layout

See merge request plymouth/plymouth!295

19 months agolabel-pango: Try to fix up remove_hexboxes_from_pango_layout
Ray Strode [Tue, 2 Jan 2024 22:04:26 +0000 (17:04 -0500)] 
label-pango: Try to fix up remove_hexboxes_from_pango_layout

There are a few issues with the remove_hexboxes_from_pango_layout
function, where it's getting offsets wrong and things like that.

This commit changes the approach entirely. Rather than modifying
the text to remove characters without font converage, it just
changes out the glyphs for those characters to be white boxes.

19 months agoply-utils: Make ply_utf8_character_get_byte_type detect invalid bytes
Ray Strode [Wed, 3 Jan 2024 14:53:50 +0000 (09:53 -0500)] 
ply-utils: Make ply_utf8_character_get_byte_type detect invalid bytes

Somehow I neglected to make ply_utf8_character_get_byte_type
differentiate between valid and invalid utf-8.

This commit fixes that.

19 months agoMerge branch 'dont-set-keyboard-mode-so-much' into 'main'
Ray Strode [Wed, 3 Jan 2024 00:56:21 +0000 (00:56 +0000)] 
Merge branch 'dont-set-keyboard-mode-so-much' into 'main'

ply-terminal: Only set keyboard mode when changing it

See merge request plymouth/plymouth!294

19 months agoply-terminal: Only set keyboard mode when changing it
Ray Strode [Tue, 2 Jan 2024 03:04:21 +0000 (22:04 -0500)] 
ply-terminal: Only set keyboard mode when changing it

Setting the console keyboard mode is not entirely idempotent.
The kernel may flush the input buffer leading to lost
key strokes. We currently set the mode explicitly on graphics
updates as part of our more general "fix things up in case
something during boot screws with the terminal settings" code.

That leads to keystrokes getting eaten.

This commit makes the terminal more careful about setting the
keyboard mode. It now only changes it when plymouth thinks its
necessary to do so.

In the future we could query the keyboard mode and reset it
when it's wrong, but I think we should hold off on doing that
until shown we need to.

19 months agoMerge branch 'more-keyboard-debugging' into 'main'
Ray Strode [Tue, 2 Jan 2024 03:24:26 +0000 (03:24 +0000)] 
Merge branch 'more-keyboard-debugging' into 'main'

ply-keyboard: Add a little mode debug logging

See merge request plymouth/plymouth!293

19 months agoply-keyboard: Add a little mode debug logging
Ray Strode [Tue, 2 Jan 2024 02:32:48 +0000 (21:32 -0500)] 
ply-keyboard: Add a little mode debug logging

It seems like the terminal fd is getting read from multiple
consumers, so add a little more logging to see if it's happening
in the keyboard code.

19 months agoMerge branch 'debug-key-events' into 'main'
Ray Strode [Mon, 1 Jan 2024 21:23:06 +0000 (21:23 +0000)] 
Merge branch 'debug-key-events' into 'main'

ply-keyboard: Add new plymouth.debug-key-events option

See merge request plymouth/plymouth!292

19 months agoply-keyboard: Add new plymouth.debug-key-events option
Ray Strode [Mon, 1 Jan 2024 19:40:08 +0000 (14:40 -0500)] 
ply-keyboard: Add new plymouth.debug-key-events option

We're currently facing a bug where keys have to be hit several
times to register for a user.

In order to make traction on that problem, this commit adds a
new plymouth.debug-key-events kernel command line option
to report in more detail the keyboard events coming in from the
terminal.

19 months agoMerge branch 'rework-renderer-terminal-input-handling' into 'main'
Ray Strode [Sat, 30 Dec 2023 16:19:57 +0000 (16:19 +0000)] 
Merge branch 'rework-renderer-terminal-input-handling' into 'main'

renderers: Rework input handling a little

See merge request plymouth/plymouth!291

19 months agorenderers: Rework input handling a little
Ray Strode [Sat, 30 Dec 2023 14:52:37 +0000 (09:52 -0500)] 
renderers: Rework input handling a little

We don't need to flush the terminal input buffer on key events from
the renderers, because the terminal does that itself.

Also, we should disable the terminal input when a /dev/input
device is added instead of relying on it happening the next flush
period.

Finally, we should make sure the terminal gets reenabled on close,
just so we clean up after ourselves.

19 months agoMerge branch 'add-terminal-logging' into 'main'
Ray Strode [Sat, 30 Dec 2023 14:05:15 +0000 (14:05 +0000)] 
Merge branch 'add-terminal-logging' into 'main'

ply-terminal: Log when terminal input gets enabled/disabled

See merge request plymouth/plymouth!290

19 months agoply-terminal: Log when terminal input gets enabled/disabled
Ray Strode [Sat, 30 Dec 2023 13:53:03 +0000 (08:53 -0500)] 
ply-terminal: Log when terminal input gets enabled/disabled

We're currently seeing a bug where it seems like the terminal might
be getting intermittently disabled.

This commit adds some logging to confirm or rule out that possibility.

19 months agoMerge branch 'initialize-line-dimensions' into 'main'
Ray Strode [Fri, 29 Dec 2023 14:31:35 +0000 (14:31 +0000)] 
Merge branch 'initialize-line-dimensions' into 'main'

label-freetype: Initialize line dimensions to 0

See merge request plymouth/plymouth!289

19 months agolabel-freetype: Initialize line dimensions to 0
Ray Strode [Fri, 29 Dec 2023 14:16:59 +0000 (09:16 -0500)] 
label-freetype: Initialize line dimensions to 0

Now that we can print the line dimensions, we should
initialize them to zero.

19 months agoMerge branch 'debug-escape-sequences' into 'main'
Ray Strode [Fri, 29 Dec 2023 01:22:54 +0000 (01:22 +0000)] 
Merge branch 'debug-escape-sequences' into 'main'

ply-terminal-emulator: Add way to see escape sequences

See merge request plymouth/plymouth!288

19 months agoply-terminal-emulator: Add way to see escape sequences
Ray Strode [Wed, 27 Dec 2023 19:46:31 +0000 (14:46 -0500)] 
ply-terminal-emulator: Add way to see escape sequences

This commit adds a new kernel command line option
plymouth.debug-escape-sequences that makes escape sequences stay
unparsed and instead get printed on the screen.

19 months agoMerge branch 'show-label-dimensions' into 'main'
Ray Strode [Fri, 29 Dec 2023 01:21:50 +0000 (01:21 +0000)] 
Merge branch 'show-label-dimensions' into 'main'

label: Put dimensions of text in log

See merge request plymouth/plymouth!287

19 months agolabel: Put dimensions of text in log
Ray Strode [Fri, 29 Dec 2023 00:42:15 +0000 (19:42 -0500)] 
label: Put dimensions of text in log

This just helps with debugging.

19 months agoMerge branch 'measure-hidden-freetype-labels' into 'main'
Ray Strode [Thu, 28 Dec 2023 19:08:24 +0000 (19:08 +0000)] 
Merge branch 'measure-hidden-freetype-labels' into 'main'

label-freetype: Measure control even if hidden

See merge request plymouth/plymouth!286

19 months agolabel-freetype: Measure control even if hidden
Ray Strode [Thu, 28 Dec 2023 19:01:05 +0000 (14:01 -0500)] 
label-freetype: Measure control even if hidden

Sometimes we want to query the size of hidden labels too, so
it's important we still compute the size, even if hidden.

19 months agoRevert "ply-utils: Use lstat instead of stat for ply_file_exists"
Ray Strode [Thu, 28 Dec 2023 19:05:36 +0000 (14:05 -0500)] 
Revert "ply-utils: Use lstat instead of stat for ply_file_exists"

This reverts commit e989867f4871bba564cd5dcc0de64da8ead36058.

I had stat/lstat momentarily crossed in my brain

19 months agoMerge branch 'freetype-metrics-fix' into 'main'
Ray Strode [Thu, 28 Dec 2023 18:44:18 +0000 (18:44 +0000)] 
Merge branch 'freetype-metrics-fix' into 'main'

label-freetype: Ensure font metrics are up to date when querying dimensions

See merge request plymouth/plymouth!285

19 months agolabel-freetype: Ensure font metrics are up to date when querying dimensions
Ray Strode [Thu, 28 Dec 2023 18:28:46 +0000 (13:28 -0500)] 
label-freetype: Ensure font metrics are up to date when querying dimensions

If code calls ply_label_get_width without ply_label_show or some other
call that forces the dimensions to be computed first, then the returned
width will be wrong.

This commit makes the freetype plugin look more like the pango plugin
where the size will computed on demand when querying the width, if
necessary.

19 months agoMerge branch 'freetype-font-debugging' into 'main'
Ray Strode [Thu, 28 Dec 2023 17:32:15 +0000 (17:32 +0000)] 
Merge branch 'freetype-font-debugging' into 'main'

Improve font loading error debug messages in freetype plugin

See merge request plymouth/plymouth!284

19 months agolabel-freetype: Log font loading error
Ray Strode [Thu, 28 Dec 2023 17:17:10 +0000 (12:17 -0500)] 
label-freetype: Log font loading error

Right now if there's an error loading a font we quietly just
proceed.

This commit adds a debug log message saying what the error is.

19 months agolabel-freetype: Don't bother loading fallback font if it doesn't exist
Ray Strode [Thu, 28 Dec 2023 17:15:20 +0000 (12:15 -0500)] 
label-freetype: Don't bother loading fallback font if it doesn't exist

If the fallback font doesn't exist, we shouldn't even try to load it,
there's no point.

Instead, put a nice error in the log.

19 months agoply-utils: Use lstat instead of stat for ply_file_exists
Ray Strode [Thu, 28 Dec 2023 17:10:57 +0000 (12:10 -0500)] 
ply-utils: Use lstat instead of stat for ply_file_exists

If a file is a symlink, we usually want to follow it, so
testing the symlink itself, is less than optimal.

This commit switches to lstat instead of stat.

19 months agoMerge branch 'pango-console-viewer-fixes' into 'main'
Ray Strode [Thu, 28 Dec 2023 16:54:10 +0000 (16:54 +0000)] 
Merge branch 'pango-console-viewer-fixes' into 'main'

console viewer fixes with the pango label plugin

See merge request plymouth/plymouth!283

19 months agoply-console-viewer: Make free function NULL safe
Ray Strode [Thu, 28 Dec 2023 16:51:09 +0000 (11:51 -0500)] 
ply-console-viewer: Make free function NULL safe

19 months agolabel-pango: Pass explicit width when computing height
Ray Strode [Thu, 28 Dec 2023 16:35:51 +0000 (11:35 -0500)] 
label-pango: Pass explicit width when computing height

pango will give a height that's several orders of magnitude too
big sometimes when the width is -1.

This commit checks for -1, explicitly measures the width first, and
remeasures with that width passed in to compute the height.

19 months agoply-console-viewer: Disallow zero lines
Ray Strode [Thu, 28 Dec 2023 16:35:10 +0000 (11:35 -0500)] 
ply-console-viewer: Disallow zero lines

A logic error meant the console viewer can end up being zero lines.

This commit fixes that.

19 months agolabel-pango: Fix inverted conditional
Ray Strode [Thu, 28 Dec 2023 15:53:02 +0000 (10:53 -0500)] 
label-pango: Fix inverted conditional

Right now we skip sizing the control when force == true because
of an inverted conditional.

This commit fixes that.

19 months agoply-console-viewer: Fix typo
Ray Strode [Thu, 28 Dec 2023 15:03:05 +0000 (10:03 -0500)] 
ply-console-viewer: Fix typo

The last commit had a typo where it would never prefer console viewer.

This commit fixes that.

19 months agoMerge branch 'console-viewer-crasher-fix' into 'main'
Ray Strode [Thu, 28 Dec 2023 15:01:18 +0000 (15:01 +0000)] 
Merge branch 'console-viewer-crasher-fix' into 'main'

ply-console-viewer: Handle fonts failing to load better

See merge request plymouth/plymouth!282

19 months agotwo-step: Be more tolerant when there's no console viewer
Ray Strode [Thu, 28 Dec 2023 14:31:08 +0000 (09:31 -0500)] 
two-step: Be more tolerant when there's no console viewer

There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.

19 months agospace-flares: Be more tolerant when there's no console viewer
Ray Strode [Thu, 28 Dec 2023 14:31:08 +0000 (09:31 -0500)] 
space-flares: Be more tolerant when there's no console viewer

There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.

19 months agofade-throbber: Be more tolerant when there's no console viewer
Ray Strode [Thu, 28 Dec 2023 14:31:08 +0000 (09:31 -0500)] 
fade-throbber: Be more tolerant when there's no console viewer

There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.

19 months agoply-console-viewer: Handle fonts failing to load better
Ray Strode [Thu, 28 Dec 2023 13:03:03 +0000 (08:03 -0500)] 
ply-console-viewer: Handle fonts failing to load better

Right now we divide by zero if the font metrics can't be determined
and tank.

This commit attempts to detect the situation and fall back to using
kernel fb console in that case.

19 months agoMerge branch 'catch-sigfpe' into 'main'
Ray Strode [Thu, 28 Dec 2023 13:05:22 +0000 (13:05 +0000)] 
Merge branch 'catch-sigfpe' into 'main'

main: Catch floating point exceptions in crasher handler too

See merge request plymouth/plymouth!281

19 months agomain: Catch floating point exceptions in crasher handler too
Ray Strode [Thu, 28 Dec 2023 12:48:43 +0000 (07:48 -0500)] 
main: Catch floating point exceptions in crasher handler too

Right now we catch the two big types of crashes:

1. Segmentation fault
2. Assertion failure

But we don't catch another common type, "Divide by zero"

This commit fixes that.

19 months agoMerge branch 'fix-xkb-crash' into 'main'
Ray Strode [Wed, 27 Dec 2023 22:02:36 +0000 (22:02 +0000)] 
Merge branch 'fix-xkb-crash' into 'main'

ply-device-manager: Handle XKB failing to load more gracefully

See merge request plymouth/plymouth!280

19 months agoply-device-manager: Handle XKB failing to load more gracefully
Ray Strode [Wed, 27 Dec 2023 21:36:52 +0000 (16:36 -0500)] 
ply-device-manager: Handle XKB failing to load more gracefully

Right now we always assume `xkb_context_new` will succeed.

This isn't necessarily true. If it fails, we shouldn't crash.

This commit fixes that.

19 months agoMerge branch 'print-backtraces' into 'main'
Ray Strode [Wed, 27 Dec 2023 21:39:27 +0000 (21:39 +0000)] 
Merge branch 'print-backtraces' into 'main'

main: Print backtrace on crash

See merge request plymouth/plymouth!279

19 months agomain: Print backtrace on crash
Ray Strode [Wed, 27 Dec 2023 21:30:15 +0000 (16:30 -0500)] 
main: Print backtrace on crash

Since plymouth can crash before the root filesystem is mounted,
and since plymouth can prevent boot from proceeding, coredumpctl
isn't always a viable option for getting backtraces.

This commit changes the crash handler to output backtrace
information to assist when coredumpctl can't.

19 months agoMerge branch 'fix-freetype-crash' into 'main'
Ray Strode [Wed, 27 Dec 2023 20:18:35 +0000 (20:18 +0000)] 
Merge branch 'fix-freetype-crash' into 'main'

label-freetype: Handle font failing to load more gracefully

See merge request plymouth/plymouth!276