]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
2 weeks agoMerge branch 'fix-keymap-icon-on-second-gpu' into 'main' main
Hans de Goede [Mon, 14 Jul 2025 09:23:05 +0000 (11:23 +0200)] 
Merge branch 'fix-keymap-icon-on-second-gpu' into 'main'

Fix keymap and capslock icon on displays on second GPU

See merge request plymouth/plymouth!356

2 weeks agoFix keymap and capslock icon on displays on second GPU
Hans de Goede [Wed, 2 Jul 2025 07:31:21 +0000 (09:31 +0200)] 
Fix keymap and capslock icon on displays on second GPU

The keymap and capslock code in src/plugins/renderers/drm/plugin.c relies
on the terminal passed to backend_create() to get the keymap and current
capslock state (when not using evdev input because of e.g. no XKBLAYOUT
in /etc/vconsole.conf which is the default in at least Fedora).

When 2 GPUs which both have displays attached are used only the first
one gets passed the local_console_terminal as terminal (it is considered
the terminal owner and e.g. listens for keypresses). This leads to keymap
and capslock icons not being shown on displays attached to the second GPU.

To fix this add a second ply_terminal_t argument to backend_create() called
local_console_terminal, which will pass the local_console_terminal to both
drm plugin instances. And modify the drm plugin capslock and keymap code to
use this instead of the normal terminal argument which will be NULL on
the second GPU.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2375854
Signed-off-by: Hans de Goede <hansg@kernel.org>
2 weeks agoMerge branch 'use-simpledrm-no-luks' into 'main'
Hans de Goede [Mon, 14 Jul 2025 09:20:17 +0000 (11:20 +0200)] 
Merge branch 'use-simpledrm-no-luks' into 'main'

Add UseSimpledrmNoLuks config file keyword

See merge request plymouth/plymouth!355

2 weeks agoAdd UseSimpledrmNoLuks config file keyword
Hans de Goede [Tue, 1 Jul 2025 18:41:24 +0000 (20:41 +0200)] 
Add UseSimpledrmNoLuks config file keyword

Add a UseSimpledrmNoLuks config file keyword this enables simpledrm use,
like the existing "UseSimpledrm" config file keyword. Except when using
LUKS. Showing the LUKS unlock screen using simpledrm has 2 problems:

1. If the GPU drivers are built into the initrd then typically the
   unlock screen will briefly show and then the screen goes black

2. The i915 driver uses the firmware framebuffer as fallback when
   userspace has not installed a fb to scan out from. This happens
   e.g. on logout between the user-session and the display-manager.
   Drawing the unlock screen on the simpledrm fb results in it briefly
   showing when logging out, which looks quite ugly.

This allows distributions to chose to only enable simpledrm when
LUKS is not used.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2359283
Signed-off-by: Hans de Goede <hansg@kernel.org>
2 weeks agoMerge branch 'ply_event_loop_watch_fd-assert-fix' into 'main'
Hans de Goede [Mon, 14 Jul 2025 08:52:16 +0000 (10:52 +0200)] 
Merge branch 'ply_event_loop_watch_fd-assert-fix' into 'main'

drm: Fix crash when terminal fd is still -1 after reconnect

See merge request plymouth/plymouth!354

2 weeks agodrm: Fix crash when terminal fd is still -1 after reconnect
Hans de Goede [Tue, 1 Jul 2025 12:37:03 +0000 (14:37 +0200)] 
drm: Fix crash when terminal fd is still -1 after reconnect

The drm plugin code installs a fd disconnect handler for the terminal fd
which simply calls open_input_source () again.

This assumes that the ply-terminal code's disconnect handler has run first
(which it should) and that ply_terminal_reopen_device () has successfully
re-opened the terminal. This last condition is not always true, resulting
in open_input_source () calling ply_event_loop_watch_fd () with a -1 fd
triggerig an assert in ply_event_loop_watch_fd ():

5  0x00007f62d39a1c6f in __assert_fail (assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:127
6  0x00007f62d3bc22c7 in ply_event_loop_watch_fd (loop=<optimized out>, fd=-1, status=status@entry=PLY_EVENT_LOOP_FD_STATUS_HAS_DATA,
    status_met_handler=status_met_handler@entry=0x7f62d3790870 <on_terminal_key_event>,
    disconnected_handler=disconnected_handler@entry=0x7f62d3790c70 <on_input_source_disconnected>, user_data=user_data@entry=0x5647f7dd9fb8)
    at ../src/libply/ply-event-loop.c:732
7  0x00007f62d3790bf6 in open_input_source (backend=0x5647f7dd9f90, input_source=0x5647f7dd9fb8) at ../src/plugins/renderers/drm/plugin.c:1930
8  0x00007f62d3bcbd53 in ply_event_loop_handle_disconnect_for_source (loop=<optimized out>, source=0x5647f7dd69f0) at ../src/libply/ply-event-loop.c:1065
9  ply_event_loop_disconnect_source (loop=<optimized out>, source=0x5647f7dd69f0) at ../src/libply/ply-event-loop.c:1157
10 ply_event_loop_process_pending_events (loop=0x5647f7dd13e0) at ../src/libply/ply-event-loop.c:1277
11 0x00007f62d3bcc068 in ply_event_loop_run (loop=0x5647f7dd13e0) at ../src/libply/ply-event-loop.c:1311
12 0x00005647c99bba48 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:2572

Fix this by checking that the fd >= 0 before calling
ply_event_loop_watch_fd ().

The above backtrace is from the drm plugin, but the same problem exists
in the frame-buffer plugin. So this fix is applied to both.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2370979
Signed-off-by: Hans de Goede <hansg@kernel.org>
2 weeks agoMerge branch 'two-step-diskunlockscreen-tweaks' into 'main'
Hans de Goede [Mon, 14 Jul 2025 08:49:07 +0000 (10:49 +0200)] 
Merge branch 'two-step-diskunlockscreen-tweaks' into 'main'

two-step: 2 small disk unlock screen cosmetic tweaks

See merge request plymouth/plymouth!357

2 weeks agotwo-step: Add some padding between text-entry field and prompt
Hans de Goede [Thu, 3 Jul 2025 10:28:41 +0000 (12:28 +0200)] 
two-step: Add some padding between text-entry field and prompt

Two-step's disk unlock screen shows the prompt text directly below
the text entry field without any padding which looks bad.

Add some padding to make things look better.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2356893
Signed-off-by: Hans de Goede <hansg@kernel.org>
2 weeks agotwo-step: Remove ':' at the end of (passphrase) prompt below text entry field
Hans de Goede [Thu, 3 Jul 2025 10:23:57 +0000 (12:23 +0200)] 
two-step: Remove ':' at the end of (passphrase) prompt below text entry field

When asked for e.g. a disk unlock passphrase, plymouth will be passed
a prompt like: "Please enter passphrase for disk $DISK:" the ':' in
the end makes sense when asking for this a text console, but this makes
less sense in the two-step disk unlock screen where the text is below
the passphrase entry field.

Strip any ':' char at the prompt's end on two-step's disk unlock screen.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2356893
Signed-off-by: Hans de Goede <hansg@kernel.org>
2 weeks agoMerge branch 'fix-ply-keymap-icon-label-fallback' into 'main'
Hans de Goede [Mon, 14 Jul 2025 08:30:42 +0000 (10:30 +0200)] 
Merge branch 'fix-ply-keymap-icon-label-fallback' into 'main'

ply-keymap-icon: Fix falling back to label-plugin when there is no pre-rendered text

See merge request plymouth/plymouth!358

2 weeks agoply-keymap-icon: Fix falling back to label-plugin when there is no pre-rendered text
Hans de Goede [Thu, 3 Jul 2025 11:05:13 +0000 (13:05 +0200)] 
ply-keymap-icon: Fix falling back to label-plugin when there is no pre-rendered text

In order for the fallback path (keymap_icon->has_prerendered_text == false)
to work properly keymap_icon->keymap_name must be set when no pre-rendered
text is found.

Tested by temporarily removing the "us" entry from ply-keymap-metadata.h.

Signed-off-by: Hans de Goede <hansg@kernel.org>
2 weeks agoMerge branch 'drm_simpledrm_dpi' into 'main'
Hans de Goede [Mon, 14 Jul 2025 07:29:42 +0000 (09:29 +0200)] 
Merge branch 'drm_simpledrm_dpi' into 'main'

drm: Add simpledrm HiDPI display support

See merge request plymouth/plymouth!348

2 weeks agodrm: Add simpledrm HiDPI display support
Janne Grunau [Sat, 17 May 2025 06:57:06 +0000 (08:57 +0200)] 
drm: Add simpledrm HiDPI display support

For devicetree based systems simpledrm might know the actual physical
display dimensions. Test if the reported connector width and height
result in a pixel density larger than 96 DPI. If that's the case
calculate the device scale instead of guessing it based on the
resolution.
This restores HiDPI scaling on 13-inch Apple silicon Macbooks with a
resolution of 2560x1600 (224 - 227 DPI) after commit 1421a9f6
("ply-utils: Increase threshold for guessed hiDPI scaling
to >= 2880x1620").

Signed-off-by: Janne Grunau <j@jannau.net>
4 weeks agoMerge branch 'lower_hidpi_cutoff_value' into 'main'
Hans de Goede [Thu, 3 Jul 2025 13:09:58 +0000 (15:09 +0200)] 
Merge branch 'lower_hidpi_cutoff_value' into 'main'

ply-utils: Adjust HiDPI cut-off value to 1.625f

See merge request plymouth/plymouth!349

4 weeks agoply-utils: Adjust HiDPI cut-off value to 1.625f
Janne Grunau [Sat, 17 May 2025 16:20:30 +0000 (18:20 +0200)] 
ply-utils: Adjust HiDPI cut-off value to 1.625f

This matches mutter's behaviour before
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3616 was merged.
It first rounded to the newest fractional scale factor (in 0.25 steps)
and then rounded N.25 and N.5 down to N and N.75 up to N+1.

Commit 3b8e9184 ("ply-utils: Only choose scale 2 when the perfect scale
would be >= 1.75") interprets the mentioned difference of at most 0.25
for rounding up very literal. A differnt ionterpretation of
https://github.com/GNOME/mutter/commit/d03dce43786ddfaca86a0ec006264c1b0dfd74d9
intend is that it's desireable to round N.5 down.

This change has unexpected side effect of using a device scale of 1 for
most of Apple's Retina displays in Macbooks (221 - 227 DPI). Raised as
https://gitlab.gnome.org/GNOME/mutter/-/issues/4110 in mutter.

Using 1.75f cut-off value requires a pixel density of 236.25 for HiDPI
while 1.625f requires only 219.375 DPI.

Mutter use the same calculation with
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4490 merged.

Signed-off-by: Janne Grunau <j@jannau.net>
5 weeks agoMerge branch 'weblate-plymouth-master' into 'main'
n3rdopolis [Tue, 24 Jun 2025 15:08:05 +0000 (15:08 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!350

5 weeks agoTranslated using Weblate (Catalan)
David Medina [Tue, 17 Jun 2025 17:11:08 +0000 (17:11 +0000)] 
Translated using Weblate (Catalan)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: David Medina <dmedinacpnl@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/ca/
Translation: plymouth/main

5 weeks agoTranslated using Weblate (Portuguese)
Américo Monteiro [Tue, 17 Jun 2025 17:11:07 +0000 (17:11 +0000)] 
Translated using Weblate (Portuguese)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Américo Monteiro <a_monteiro@gmx.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/pt/
Translation: plymouth/main

5 weeks agoTranslated using Weblate (Chinese (Traditional) (zh_TW))
hsu zangmen [Tue, 17 Jun 2025 17:11:07 +0000 (17:11 +0000)] 
Translated using Weblate (Chinese (Traditional) (zh_TW))

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: hsu zangmen <chzang55@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/zh_TW/
Translation: plymouth/main

5 weeks agoMerge branch 'fix-288-frame-buffer' into 'main'
n3rdopolis [Tue, 24 Jun 2025 13:13:28 +0000 (13:13 +0000)] 
Merge branch 'fix-288-frame-buffer' into 'main'

frame-buffer: Check for NULL terminal in watch_input_device

See merge request plymouth/plymouth!353

6 weeks agoframe-buffer: Check for NULL terminal in watch_input_device
n3rdopolis [Fri, 20 Jun 2025 16:44:36 +0000 (12:44 -0400)] 
frame-buffer: Check for NULL terminal in watch_input_device

Match the drm backend

6 weeks agoMerge branch 'fix-issue-288' into 'main'
Hans de Goede [Thu, 19 Jun 2025 21:15:37 +0000 (21:15 +0000)] 
Merge branch 'fix-issue-288' into 'main'

drm: Check for NULL terminal in watch_input_device

Closes #288

See merge request plymouth/plymouth!344

6 weeks agodrm: Check for NULL terminal in watch_input_device
Daniel van Vugt [Thu, 27 Mar 2025 09:19:44 +0000 (17:19 +0800)] 
drm: Check for NULL terminal in watch_input_device

It's allowed to be NULL and the rest of the source file checks for NULL.
Seems the check was just forgotten here.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/288
6 weeks agoMerge branch 'double-underline-fix' into 'main'
n3rdopolis [Wed, 18 Jun 2025 17:18:35 +0000 (17:18 +0000)] 
Merge branch 'double-underline-fix' into 'main'

Fix doubly underlined text output and incorrect SGR attribute handling

See merge request plymouth/plymouth!346

6 weeks agoply-terminal-emulator: Fix incorrect SGR attribute handling
Tomita Moeko [Wed, 7 May 2025 14:25:24 +0000 (22:25 +0800)] 
ply-terminal-emulator: Fix incorrect SGR attribute handling

According to ECMA-48 [1], Select Graphic Rendition (SGR) attribute 21
is for "doubly underlined", not "disabling bold" in current plymouth
implementation.

Additionally, SGR 22 is for "normal colour or normal intensity (neither
bold nor faint)", both bold and dim should be disabled with it.

[1] 8.3.117, https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
6 weeks agoply-kmsg-reader: Fix doubly underlined text output
Tomita Moeko [Wed, 7 May 2025 13:59:28 +0000 (21:59 +0800)] 
ply-kmsg-reader: Fix doubly underlined text output

Currently plymouth applies Select Graphic Rendition (SGR) attribute 21
to disable bold text. However, per ECMA-48 [1], this attribute is for
doubly underlined text, not for disabling bold, resulting unintended
doubly underlined output on boot. Fix it by conditionally applying
standard bold attribute (SGR 1) on bold text.

[1] 8.3.117, https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
6 weeks agoMerge branch 'fix-handle-kmsg-reader-crash' into 'main'
n3rdopolis [Mon, 16 Jun 2025 00:39:39 +0000 (00:39 +0000)] 
Merge branch 'fix-handle-kmsg-reader-crash' into 'main'

kmsg-reader: handle multipart messages

Closes #303

See merge request plymouth/plymouth!352

6 weeks agokmsg-reader: handle multipart messages
Cedric Hombourger [Fri, 13 Jun 2025 17:43:02 +0000 (19:43 +0200)] 
kmsg-reader: handle multipart messages

handle_ksmg_message wrongly assumed that all messages are terminated
with a trailing line feed: kernel messages emitted by pr_cont() may
not. At any rate, the return value of the strchr() call ought to be
checked to avoid crashing when parsing incoming messages.

Closes #303

6 weeks agoMerge branch 'ctrl_alt_delete' into 'main'
n3rdopolis [Sat, 14 Jun 2025 01:10:37 +0000 (01:10 +0000)] 
Merge branch 'ctrl_alt_delete' into 'main'

ply-input-device: Reboot when users press Ctrl+Alt+Delete

See merge request plymouth/plymouth!351

6 weeks agoply-input-device: Reboot when users press Ctrl+Alt+Delete
n3rdopolis [Fri, 6 Jun 2025 03:49:53 +0000 (23:49 -0400)] 
ply-input-device: Reboot when users press Ctrl+Alt+Delete

2 months agoMerge branch 'dmesg-replay' into 'main'
Adrian Vovk [Thu, 15 May 2025 21:31:13 +0000 (17:31 -0400)] 
Merge branch 'dmesg-replay' into 'main'

details: Don't duplicate output on console

Closes #298

See merge request plymouth/plymouth!347

2 months agokmsg-reader: Seek to the end of the ringbuffer dmesg-replay
Adrian Vovk [Fri, 9 May 2025 19:35:38 +0000 (15:35 -0400)] 
kmsg-reader: Seek to the end of the ringbuffer

Otherwise, whenever plymouth starts we'd replay all previous kmsg
entries, even if they've already been logged to the console. This leads
to duplicated log entires, and makes it hard to debug things.

With /dev/console, we only log what we capture while Plymouth is
running. Let's do the same with /dev/kmsg

2 months agodetails: Suppress kernel's own kmsg console output
Adrian Vovk [Fri, 9 May 2025 19:17:48 +0000 (15:17 -0400)] 
details: Suppress kernel's own kmsg console output

Plymouth forwards /dev/console and /dev/kmsg to all consoles (and to the
graphical splash). With the details plugin, we would do this without
suppressing the kernel's own output first. This would lead to duplicate
log entries

2 months agoutils: Don't lose log level when silencing kmsg
Adrian Vovk [Fri, 9 May 2025 18:44:24 +0000 (14:44 -0400)] 
utils: Don't lose log level when silencing kmsg

Once we disable kmsg logging to the console, the kernel will set the
console log level to the minimum log level (i.e. only logging kernel
panics). However the unintended side effect is that our own kmsg-reader
will start filtering out all kernel log messages, since we also respect
the kernel's console log level.

This change make it so that we keep using the original console log level
whenever we disable the kernel's output. This lets us keep forwarding
the kernel's kmsg output

2 months agoMerge branch 'weblate-plymouth-master' into 'main'
Rafael Fontenelle [Wed, 7 May 2025 16:38:59 +0000 (16:38 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!333

2 months agoTranslated using Weblate (Kabyle)
ButterflyOfFire [Sat, 3 May 2025 18:25:44 +0000 (18:25 +0000)] 
Translated using Weblate (Kabyle)

Currently translated at 100.0% (7 of 7 strings)

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

2 months agoTranslated using Weblate (Arabic)
joo es [Sat, 3 May 2025 18:25:44 +0000 (18:25 +0000)] 
Translated using Weblate (Arabic)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Arabic)

Co-authored-by: joo es <jonnyse@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/ar/
Translation: plymouth/main

2 months agoTranslated using Weblate (Belarusian)
Yauhen Bugamol [Sat, 3 May 2025 18:25:43 +0000 (18:25 +0000)] 
Translated using Weblate (Belarusian)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Yauhen Bugamol <3abac@3a.by>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/be/
Translation: plymouth/main

2 months agoTranslated using Weblate (Catalan)
Icar NS [Sat, 3 May 2025 18:25:43 +0000 (18:25 +0000)] 
Translated using Weblate (Catalan)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Catalan)

Co-authored-by: Icar NS <fedoraproject.relock974@passmail.net>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/ca/
Translation: plymouth/main

2 months agoMerge branch 'get_device_scale_guess' into 'main'
Hans de Goede [Tue, 6 May 2025 11:49:25 +0000 (11:49 +0000)] 
Merge branch 'get_device_scale_guess' into 'main'

ply-utils: Guessed device-scale improvements

See merge request plymouth/plymouth!343

2 months agoply-utils: Increase threshold for guessed hiDPI scaling to >= 2880x1620
Hans de Goede [Thu, 6 Mar 2025 16:53:43 +0000 (17:53 +0100)] 
ply-utils: Increase threshold for guessed hiDPI scaling to >= 2880x1620

1440 is only 33% more then FHD, so using 2x there is a bit too much and
leads to the spinner being much too large on e.g 27" monitors.

And on e.g. Dell ultrawide 34" 3440x1440 which are only 110 DPI this effect
is even worse.

Change the threshold to >= 2880x1620 to avoid using 2x scaling on 1440p
monitors. 2880x1620 is ~240DPI when used in a 14" laptop at which point
using 2x scaling is really necessary.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 months agoply-utils: Use lower threshold for hiDPI scaling on 3:2 screens
Hans de Goede [Thu, 6 Mar 2025 16:46:34 +0000 (17:46 +0100)] 
ply-utils: Use lower threshold for hiDPI scaling on 3:2 screens

3:2 screens are only used in mobile form factors, add a special case for
this with a lower threshold to enable 2x hiDPI scaling.

Also remove the HIDPI_MIN_* defines these were only used in one place
and adding a second set for the 3:2 screens just makes things harder
to read.

Instead write the actual width/height thresholds directly in the code
of the new get_device_scale_guess () helper.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 months agoply-utils: Swap width <-> height for portrait screens when guessing device-scale
Hans de Goede [Thu, 6 Mar 2025 16:38:33 +0000 (17:38 +0100)] 
ply-utils: Swap width <-> height for portrait screens when guessing device-scale

Swap width <-> height for portrait screens when guessing device-scale,
this fixes the heuristics not working for portrait screens.

Also move the heuristics to a new get_device_scale_guess () helper, because
it has become a bit larger now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 months agoMerge branch 'use_simpledrm-config' into 'main'
Hans de Goede [Tue, 6 May 2025 11:37:33 +0000 (11:37 +0000)] 
Merge branch 'use_simpledrm-config' into 'main'

Make simpledrm selection configurable from config file

Closes #264

See merge request plymouth/plymouth!342

4 months agoply-device-manager: Update verify_drm_device () comment
Hans de Goede [Thu, 6 Mar 2025 16:25:12 +0000 (17:25 +0100)] 
ply-device-manager: Update verify_drm_device () comment

The comment about why SimpleDRM devices should be skipped is no longer
accurate, the kernel does provide rotation info now; and plymouth now
has heuristics to guess the device-scale.

If SimpleDRM devices should be used or not now mostly is a user
preference.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 months agodrm: Reject 800x600 and 1024x768 simpledrm drm devices
Hans de Goede [Tue, 4 Mar 2025 17:26:01 +0000 (18:26 +0100)] 
drm: Reject 800x600 and 1024x768 simpledrm drm devices

Sometimes the EFI firmware initializes the framebuffer at a very low
resolution rather then at the panel's native resolution.

In this case it is better to wait for the native GPU driver to load
rather then rendering a not-so-pretty splash at this very low resolution.

Reject these low resolutions for simpledrm devices except when
query_device () is called with force=true.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 months agolibply-splash-core: Add a force argument to ply_renderer_open ()
Hans de Goede [Tue, 4 Mar 2025 14:22:45 +0000 (15:22 +0100)] 
libply-splash-core: Add a force argument to ply_renderer_open ()

Sometimes a renderer plugin may want to refuse to open a device
because it has suboptimal settings, like e.g. an EFI framebuffer
based simpledrm when the EFI firmware has set the resolution to
800x600 instead of the native panel resolution.

In such a case it might be better to wait for another better
/dev/dri/card# device to show up.

This skipping of devices by renderer plugins needs to be configurable
in case the timeout hits, or the user wishes to override things.

Add a force argument to ply_renderer_open () to allow overriding
this behavior. User can force using simpledrm by passing
plymouth.use-simpledrm=2 on the kernel commandline or by setting
UseSimpledrm=2 in the config-file.

This flag is passed to the renderer plugin's query_device () method
as that is the best place for the renderer plugin to determine
a device's usability.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 months agoMake simpledrm selection configurable from config file
Hans de Goede [Mon, 17 Feb 2025 14:47:11 +0000 (15:47 +0100)] 
Make simpledrm selection configurable from config file

Move the handling of the "plymouth.use-simpledrm" commandline argument from
ply-device-manager to main.c, and allow specifying its default value in
the "[Daemon]" section of the config-file using a new UseSimpledrm keyword.

Extend the "plymouth.use-simpledrm" handling to also accept a value e.g.
"plymouth.use-simpledrm=0" to allow overriding a "UseSimpledrm=1" in
the configfile.

And pass the use-simpledrm value to ply_device_manager_new () through a new
PLY_DEVICE_MANAGER_FLAGS_USE_SIMPLEDRM flag.

This also moves the kernel commandline handling to src/main.c grouping
it together with most of the other commandline handling.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 months agomain: Do not override device_scale from lower-priorities config files
Hans de Goede [Mon, 17 Feb 2025 15:15:50 +0000 (16:15 +0100)] 
main: Do not override device_scale from lower-priorities config files

main () calls functions to get the theme and other config settings from
the commandline / config files in order of *descending* priority:

1. find_override_splash ()             /* Parses commandline */
2. find_system_default_splash ()       /* /etc/plymouth/plymouthd.conf */
3. find_distribution_default_splash () /* /usr/share/plymouth/plymouthd.defaults */

To avoid the later parsed config files *with lower priorities* overriding
earlier settings the code initializes the config variables to NAN and only
sets them if they are still set to NAN.

Except for the device_scale handling, where load_settings () always calls
ply_set_device_scale () overriding earlier values, the commandline
handling for "plymouth.force-scale=..." is done separately later so that
the commandline does take priority over the config files, but since
/usr/share/plymouth/plymouthd.defaults is parsed last any DeviceScale
setting there will override /etc/plymouth/plymouthd.conf settings.

Fix this by following the pattern used by start_time/splash_delay/
device_timeout, add a device_scale variable initialized to -1 and
only override that variable if it is at -1.

This also allows removing find_force_scale () moving the commandline
parsing to find_override_splash () together with the other commandline
handling.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 months agoply-utils: Add ply_kernel_command_line_get_ulong () helper
Hans de Goede [Tue, 4 Mar 2025 11:50:53 +0000 (12:50 +0100)] 
ply-utils: Add ply_kernel_command_line_get_ulong () helper

Add a ply_kernel_command_line_get_ulong () helper mirroring
ply_key_file_get_ulong ().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
4 months agoply-keyfile: Change ply_key_file_get_long () into ply_key_file_get_ulong ()
Hans de Goede [Mon, 17 Feb 2025 15:05:54 +0000 (16:05 +0100)] 
ply-keyfile: Change ply_key_file_get_long () into ply_key_file_get_ulong ()

Change ply_key_file_get_long () into ply_key_file_get_ulong () and add
error checking.

All callers of ply_key_file_get_long () expect a positive / unsigned number.
Rename it to ply_key_file_get_ulong ().

Also add error checkig for non valid numbers and return the default value
for these instead of 0.

Note this also fixes the return value of ply_key_file_get_long () being
a double (this is now changed to an unsigned long).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 months agoMerge branch 'keymap-icon-fixes' into 'main'
Ray Strode [Mon, 10 Feb 2025 19:52:38 +0000 (19:52 +0000)] 
Merge branch 'keymap-icon-fixes' into 'main'

ply-keymap-icon: Make Dvorak check case-insensitive

See merge request plymouth/plymouth!341

5 months agoRun keymap-render.py to update the pre-rendered keymap
Hans de Goede [Mon, 10 Feb 2025 13:49:07 +0000 (14:49 +0100)] 
Run keymap-render.py to update the pre-rendered keymap

Run keymap-render.py to update the pre-rendered keymap used by
ply-keymap-icon.c.

This adds 2 new console keymaps: "mod" and "nz" and 1 new xkb keymap:
"English (New Zealand)".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
5 months agoply-keymap-icon: Make Dvorak check case-insensitive
Hans de Goede [Mon, 10 Feb 2025 10:47:57 +0000 (11:47 +0100)] 
ply-keymap-icon: Make Dvorak check case-insensitive

When using evdev support the XKB keymap name (with variant) for Dvorak
users will be e.g. "US (Dvorak)". The Dvorak layouts are not described
in /usr/share/X11/xkb/rules/evdev.xml, so these are not added to
ply-keymap-metadata.h / keymap-render.png .

For the console-keymap case dvorak is handled specially in:

keymap-render.py:normalize_keymaps()
ply-keymap-icon.c:ply_keymap_normalize_keymap()

mapping all keymap-names with a lowercase dvorak in there to "dvorak",
change this special handling to be case-insensitive so that it also works
for the xkb-keymap case.

Note the keymap-render.py change really is a no-op since keymap-render.py
only calls normalize_keymaps() on console-keymaps which are always
lower-case. normalize_keymaps() should still be updated though to keep
the 2 functions in sync.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2341810
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 months agoMerge branch 'freetype-monospace-bold' into 'main'
Ray Strode [Sun, 15 Dec 2024 18:40:14 +0000 (18:40 +0000)] 
Merge branch 'freetype-monospace-bold' into 'main'

label-freetype: implement bold font handling

See merge request plymouth/plymouth!338

9 months agolabel-freetype: implement bold font handling
Ferdinand Bachmann [Tue, 29 Oct 2024 20:59:57 +0000 (21:59 +0100)] 
label-freetype: implement bold font handling

Bold monospace fonts are prominently used in the console output printed
by systemd. Without them, the output looks incorrect compared to pango.
This still is far from a complete implementation of rich text, but
brings label-freetype much closer to what label-pango does for the
default theme.

This commit introduces a glyph_face variable in load_glyphs() that holds
the correct face for the current glyph (label->face or
label->bold_face). This face is then passed on to load_glyph() and
finish_measuring_line() to ensure correct font measurements.

9 months agoMerge branch 'fix-freetype-monospace-fallback' into 'main'
Ray Strode [Sun, 27 Oct 2024 15:30:07 +0000 (15:30 +0000)] 
Merge branch 'fix-freetype-monospace-fallback' into 'main'

label-freetype: fix monospace font fallback

See merge request plymouth/plymouth!337

9 months agolabel-freetype: fix monospace font fallback
Ferdinand Bachmann [Sun, 27 Oct 2024 12:05:00 +0000 (13:05 +0100)] 
label-freetype: fix monospace font fallback

fix find_default_monospace_font_path() accidently returning the
non-monospace fallback font in some cases.

11 months agoMerge branch 'fixterminal' into 'main'
Ray Strode [Wed, 28 Aug 2024 04:10:37 +0000 (04:10 +0000)] 
Merge branch 'fixterminal' into 'main'

main: Go back to text mode when quitting (if appropriate)

See merge request plymouth/plymouth!334

11 months agomain: Correctly switch back to text mode if the splash is requested, but never shown
nerdopolis [Tue, 20 Aug 2024 22:53:33 +0000 (18:53 -0400)] 
main: Correctly switch back to text mode if the splash is requested, but never shown

Co-authored-by: filip-hejsek
Suggested-by: filip-hejsek
11 months agomain: Go back to text mode when quitting (if appropriate)
Ray Strode [Wed, 1 May 2024 12:23:00 +0000 (08:23 -0400)] 
main: Go back to text mode when quitting (if appropriate)

Since commit 48881ba2ef3d25fd27fd150d4d5957d4df9868e0 plymouth
goes into GRAPHICS mode early on. Unfortunately, there are cases
where it neglects to go back to TEXT mode when quitting. That can
happen if boot finishes before the splash screen is created.

This commit fixes that.

11 months agoMerge branch 'wip/jimmac/libadwaita-spinner' into 'main'
Ray Strode [Mon, 12 Aug 2024 11:02:44 +0000 (11:02 +0000)] 
Merge branch 'wip/jimmac/libadwaita-spinner' into 'main'

spinner: update design

See merge request plymouth/plymouth!324

11 months agospinner: update design
Jakub Steiner [Mon, 12 Aug 2024 11:02:44 +0000 (11:02 +0000)] 
spinner: update design

11 months agoMerge branch 'correctalphavalue' into 'main'
Ray Strode [Fri, 9 Aug 2024 12:51:42 +0000 (12:51 +0000)] 
Merge branch 'correctalphavalue' into 'main'

two-step: Don't try to set use_black_background based on the ConsoleLogTextColor

See merge request plymouth/plymouth!332

11 months agotwo-step: Don't try to set use_black_background based on the ConsoleLogTextColor
nerdopolis [Fri, 9 Aug 2024 11:55:08 +0000 (07:55 -0400)] 
two-step: Don't try to set use_black_background based on the ConsoleLogTextColor

The correct value is 0x000000ff, for full opacity

11 months agoMerge branch 'consoleviewerbackground' into 'main'
Ray Strode [Thu, 8 Aug 2024 23:38:50 +0000 (23:38 +0000)] 
Merge branch 'consoleviewerbackground' into 'main'

Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor

See merge request plymouth/plymouth!330

11 months agoscript: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor
nerdopolis [Wed, 7 Aug 2024 20:22:47 +0000 (16:22 -0400)] 
script: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor

11 months agospace-flares: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor
nerdopolis [Wed, 7 Aug 2024 20:22:23 +0000 (16:22 -0400)] 
space-flares: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor

11 months agofade-throbber: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor
nerdopolis [Wed, 7 Aug 2024 20:22:00 +0000 (16:22 -0400)] 
fade-throbber: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor

11 months agotwo-step: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor
nerdopolis [Wed, 7 Aug 2024 20:21:24 +0000 (16:21 -0400)] 
two-step: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor

11 months agoMerge branch 'twostepconsoleviewerbackground' into 'main'
Ray Strode [Wed, 7 Aug 2024 11:50:44 +0000 (11:50 +0000)] 
Merge branch 'twostepconsoleviewerbackground' into 'main'

Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active

See merge request plymouth/plymouth!328

11 months agolabel-pango: Don't draw a black box around rich text when the background is default
nerdopolis [Wed, 7 Aug 2024 04:12:13 +0000 (00:12 -0400)] 
label-pango: Don't draw a black box around rich text when the background is default

11 months agoAdd ConsoleViewerPreserveBackground hint to themes to make the option visible for...
nerdopolis [Tue, 6 Aug 2024 12:29:18 +0000 (08:29 -0400)] 
Add ConsoleViewerPreserveBackground hint to themes to make the option visible for theme creators

11 months agoscript: Support ConsoleViewerPreserveBackground option to keep the background when...
nerdopolis [Fri, 2 Aug 2024 18:32:44 +0000 (14:32 -0400)] 
script: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active

11 months agospace-flares: Support ConsoleViewerPreserveBackground option to keep the background...
nerdopolis [Fri, 2 Aug 2024 18:32:22 +0000 (14:32 -0400)] 
space-flares: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active

11 months agofade-throbber: Support ConsoleViewerPreserveBackground option to keep the background...
nerdopolis [Fri, 2 Aug 2024 18:32:07 +0000 (14:32 -0400)] 
fade-throbber: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active

11 months agotwo-step: Support ConsoleViewerPreserveBackground option to keep the background when...
nerdopolis [Fri, 2 Aug 2024 18:31:15 +0000 (14:31 -0400)] 
two-step: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active

11 months agoMerge branch 'devttynullsplash' into 'main'
Ray Strode [Tue, 6 Aug 2024 09:37:55 +0000 (09:37 +0000)] 
Merge branch 'devttynullsplash' into 'main'

main: Assume graphical splash when the active kernel console is /dev/ttynull.

See merge request plymouth/plymouth!327

11 months agomain: Assume graphical splash when the active kernel console is /dev/ttynull.
nerdopolis [Fri, 2 Aug 2024 12:00:10 +0000 (08:00 -0400)] 
main: Assume graphical splash when the active kernel console is /dev/ttynull.

11 months agoply-utils: Add ply_get_primary_kernel_console_type ()
nerdopolis [Fri, 2 Aug 2024 11:59:14 +0000 (07:59 -0400)] 
ply-utils: Add ply_get_primary_kernel_console_type ()

11 months agoply-device-manager: Don't log an error when /sys/class/tty/console/active is empty
nerdopolis [Fri, 2 Aug 2024 11:56:28 +0000 (07:56 -0400)] 
ply-device-manager: Don't log an error when /sys/class/tty/console/active is empty

This is possible on some kernels that were built with CONFIG_NULL_TTY enabled, and were booted with console=ttynull
/sys/class/tty/console/active is empty in this case, so the file being empty is not always an error worth logging

12 months agoMerge branch 'fixscriptdraw' into 'main'
Ray Strode [Wed, 31 Jul 2024 10:05:35 +0000 (10:05 +0000)] 
Merge branch 'fixscriptdraw' into 'main'

script: Partially revert 8fb0e1f33443fe24d49660a1b00966def95a8c77 and move...

See merge request plymouth/plymouth!326

12 months agoscript: Add script_lib_update_displays () and call it on state changes
nerdopolis [Tue, 30 Jul 2024 10:55:28 +0000 (06:55 -0400)] 
script: Add script_lib_update_displays () and call it on state changes

12 months agoscript: Partially revert 8fb0e1f33443fe24d49660a1b00966def95a8c77 and move needs_redr...
nerdopolis [Tue, 30 Jul 2024 02:25:10 +0000 (22:25 -0400)] 
script: Partially revert 8fb0e1f33443fe24d49660a1b00966def95a8c77 and move needs_redraw handling back to script_lib_sprite_refresh

12 months agoMerge branch 'weblate-plymouth-master' into 'main'
Marge Bot [Sat, 27 Jul 2024 17:34:31 +0000 (17:34 +0000)] 
Merge branch 'weblate-plymouth-master' into 'main'

Translations update from Fedora Weblate

See merge request plymouth/plymouth!315

12 months agoTranslated using Weblate (Greek)
Giannis Antypas [Sat, 20 Jul 2024 00:38:51 +0000 (02:38 +0200)] 
Translated using Weblate (Greek)

Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Greek)

Co-authored-by: Giannis Antypas <gianni.antypas@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/el/
Translation: plymouth/main
Part-of: <https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/315>

12 months agoTranslated using Weblate (Hindi)
Scrambled 777 [Sat, 20 Jul 2024 00:38:51 +0000 (02:38 +0200)] 
Translated using Weblate (Hindi)

Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Scrambled 777 <weblate.scrambled777@simplelogin.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/hi/
Translation: plymouth/main
Part-of: <https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/315>

12 months agoTranslated using Weblate (Slovenian)
Martin Srebotnjak [Sat, 20 Jul 2024 00:38:51 +0000 (02:38 +0200)] 
Translated using Weblate (Slovenian)

Currently translated at 100.0% (7 of 7 strings)

Translated using Weblate (Slovenian)

Currently translated at 85.7% (6 of 7 strings)

Added translation using Weblate (Slovenian)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/sl/
Translation: plymouth/main
Part-of: <https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/315>

12 months agoMerge branch 'fixscriptcrash' into 'main'
Ray Strode [Sat, 27 Jul 2024 12:38:13 +0000 (12:38 +0000)] 
Merge branch 'fixscriptcrash' into 'main'

script: Be more tolerant when there's no console viewer

Closes #259

See merge request plymouth/plymouth!325

12 months agoscript: Handle redrawing the console viewer better on display hotplugs
nerdopolis [Thu, 25 Jul 2024 03:12:49 +0000 (23:12 -0400)] 
script: Handle redrawing the console viewer better on display hotplugs

12 months agoscript: remove incomplete code that attempted to make the console viewers scriptable
nerdopolis [Sat, 20 Jul 2024 04:13:20 +0000 (00:13 -0400)] 
script: remove incomplete code that attempted to make the console viewers scriptable

12 months agoscript: Handle adding the console viewer better when hotplugging
nerdopolis [Sat, 20 Jul 2024 03:47:42 +0000 (23:47 -0400)] 
script: Handle adding the console viewer better when hotplugging

12 months agoscript: Be more tolerant when there's no console viewer
nerdopolis [Tue, 16 Jul 2024 15:44:25 +0000 (11:44 -0400)] 
script: Be more tolerant when there's no console viewer

12 months agoFix Debian CI
nerdopolis [Tue, 16 Jul 2024 16:05:09 +0000 (12:05 -0400)] 
Fix Debian CI

13 months agoMerge branch 'simpledrm-early-probe' into 'main'
Hans de Goede [Fri, 7 Jun 2024 18:08:07 +0000 (18:08 +0000)] 
Merge branch 'simpledrm-early-probe' into 'main'

ply-device-manager: Create renderer for simpledrm devices right away

See merge request plymouth/plymouth!323

13 months agoply-device-manager: Make create_devices_for_subsystem () return void
Hans de Goede [Wed, 5 Jun 2024 20:07:32 +0000 (22:07 +0200)] 
ply-device-manager: Make create_devices_for_subsystem () return void

Make create_devices_for_subsystem () return void. Its callers do not care
about the return value and currently the return value is not always correct
since if a device is found, found may later become false again if
a subsequent create_devices_for_udev_device () call fails.

13 months agoply-device-manager: Create renderer for simpledrm devices right away
Hans de Goede [Tue, 4 Jun 2024 21:07:19 +0000 (23:07 +0200)] 
ply-device-manager: Create renderer for simpledrm devices right away

Often when plymouth starts and enumerates udev devices which are already
present at start (coldplug detection), udev is still initializing all
the devices and it reports 0 for udev_device_get_is_initialized ().

It may take a long time for the state of the simpledrm udev device
to change to initialized and for a udev add event to be send.

Especially when the amdgpu kernel module is involved which is very
large for a kernel module and can take op to 7 seconds to load.

In this case it is even possible for plymouth's default DeviceTimeout
of 8 seconds to trigger before the simpledrm device is considered
initialized. See for example these lines extracted from the plymouth-debug
log attached to: https://bugzilla.redhat.com/show_bug.cgi?id=2183743

  00:00:02.909 ../src/libply-splash-core/ply-device-manager.c:498:create_devi: found device /sys/devices/pci0000:00/0000:00:01.0/simple-framebuffer.0/drm/card0
  00:00:02.910 ../src/libply-splash-core/ply-device-manager.c:513:create_devi: it's not initialized
  00:00:10.917 ../src/libply-splash-core/ply-device-manager.c:1237:create_dev: Timeout elapsed, looking for devices from udev
  00:00:10.918 ../src/libply-splash-core/ply-device-manager.c:498:create_devi: found device /sys/devices/pci0000:00/0000:00:01.0/simple-framebuffer.0/drm/card0
  00:00:10.918 ../src/libply-splash-core/ply-device-manager.c:513:create_devi: it's not initialized

This leads to plymouth falling back to the text splash even when
plymouth.use-simpledrm is passed on the kernel commandline.

Add a special case for simpledrm devices and add these during coldboot
even if they are not initialized yet.

13 months agoply-device-manager: Remove simpledrm renderers before adding normal drm renderers
Hans de Goede [Wed, 5 Jun 2024 19:52:19 +0000 (21:52 +0200)] 
ply-device-manager: Remove simpledrm renderers before adding normal drm renderers

udev remove events for simpledrm udev devices may arrive after the udev add
event for a normal drm udev device which is replacing the simpledrm device.

When the local_console is managed by a simpledrm renderer and the remove
event for the simpledrm renderer is received after the add event of
the normal drm device, the local_console is left unmanaged breaking legacy
input support.

When this scenario gets hit it breaks entering disk unlock passwords.

Add code to remove simpledrm renderers before adding normal drm renderers
to avoid this.

13 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.

13 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.