]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
3 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>
3 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>
3 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>
3 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

12 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

12 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

12 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

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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

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

12 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 ()

12 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

14 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

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

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

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

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

16 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

18 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

18 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

18 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

18 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