Commit graph

2953 commits

Author SHA1 Message Date
nerdopolis
380e601889 two-step: Don't try to set use_black_background based on the ConsoleLogTextColor
The correct value is 0x000000ff, for full opacity
2024-08-09 07:59:03 -04:00
Ray Strode
d7937e77da Merge branch 'consoleviewerbackground' into 'main'
Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor

See merge request plymouth/plymouth!330
2024-08-08 23:38:50 +00:00
nerdopolis
872ecf75a2 script: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor 2024-08-07 16:43:42 -04:00
nerdopolis
5ef8b3170d space-flares: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor 2024-08-07 16:43:42 -04:00
nerdopolis
1297059357 fade-throbber: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor 2024-08-07 16:43:38 -04:00
nerdopolis
f5f7b7c60f two-step: Replace ConsoleViewerPreserveBackground with ConsoleLogBackgroundColor 2024-08-07 16:21:24 -04:00
Ray Strode
956df66dc6 Merge branch 'twostepconsoleviewerbackground' into 'main'
Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active

See merge request plymouth/plymouth!328
2024-08-07 11:50:44 +00:00
nerdopolis
1be72c0eab label-pango: Don't draw a black box around rich text when the background is default 2024-08-07 00:12:13 -04:00
nerdopolis
4d9e442a6c Add ConsoleViewerPreserveBackground hint to themes to make the option visible for theme creators 2024-08-06 08:30:23 -04:00
nerdopolis
759f883301 script: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active 2024-08-06 11:33:26 +00:00
nerdopolis
22fd5bfde4 space-flares: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active 2024-08-06 11:33:26 +00:00
nerdopolis
e1bc057723 fade-throbber: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active 2024-08-06 11:33:26 +00:00
nerdopolis
ab96ffa373 two-step: Support ConsoleViewerPreserveBackground option to keep the background when the console viewer is active 2024-08-06 11:33:26 +00:00
Ray Strode
32bf3a81f2 Merge branch 'devttynullsplash' into 'main'
main: Assume graphical splash when the active kernel console is /dev/ttynull.

See merge request plymouth/plymouth!327
2024-08-06 09:37:55 +00:00
nerdopolis
f2d0f87b99 main: Assume graphical splash when the active kernel console is /dev/ttynull. 2024-08-05 22:21:06 -04:00
nerdopolis
7847f49ec8 ply-utils: Add ply_get_primary_kernel_console_type () 2024-08-05 21:09:42 -04:00
nerdopolis
2dc6aa9e44 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
2024-08-02 07:56:28 -04:00
Ray Strode
6976081d6a Merge branch 'fixscriptdraw' into 'main'
script: Partially revert 8fb0e1f334 and move...

See merge request plymouth/plymouth!326
2024-07-31 10:05:35 +00:00
nerdopolis
f0195a129a script: Add script_lib_update_displays () and call it on state changes 2024-07-30 06:55:28 -04:00
nerdopolis
5489ddd65c script: Partially revert 8fb0e1f334 and move needs_redraw handling back to script_lib_sprite_refresh 2024-07-29 22:25:10 -04:00
Marge Bot
3738dfd8b5 Merge branch 'weblate-plymouth-master' into 'main'
Translations update from Fedora Weblate

See merge request plymouth/plymouth!315
2024-07-27 17:34:31 +00:00
Giannis Antypas
fc35eb3762 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>
2024-07-27 17:33:31 +00:00
Scrambled 777
b161cd1c7b 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>
2024-07-27 17:33:31 +00:00
Martin Srebotnjak
fb0e280747 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>
2024-07-27 17:33:31 +00:00
Ray Strode
fe7b7d8fce Merge branch 'fixscriptcrash' into 'main'
script: Be more tolerant when there's no console viewer

Closes #259

See merge request plymouth/plymouth!325
2024-07-27 12:38:13 +00:00
nerdopolis
8fb0e1f334 script: Handle redrawing the console viewer better on display hotplugs 2024-07-24 23:12:49 -04:00
nerdopolis
9569d7561b script: remove incomplete code that attempted to make the console viewers scriptable 2024-07-20 00:13:20 -04:00
nerdopolis
7166e4aeac script: Handle adding the console viewer better when hotplugging 2024-07-20 00:03:14 -04:00
nerdopolis
83711ef4b5 script: Be more tolerant when there's no console viewer 2024-07-19 21:52:38 -04:00
nerdopolis
0e787babef Fix Debian CI 2024-07-16 14:45:32 -04:00
Hans de Goede
3ce6441aa0 Merge branch 'simpledrm-early-probe' into 'main'
ply-device-manager: Create renderer for simpledrm devices right away

See merge request plymouth/plymouth!323
2024-06-07 18:08:07 +00:00
Hans de Goede
12fdedb4ef 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
2f8b64ea4c 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
8c0d596503 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
eb5abda0c2 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
9096b304f6 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
188a4393b1 ply-renderer: Add ply_renderer_get_type ()
Add a ply_renderer_get_type () helper function to get the type of
a renderer.
2024-06-07 17:21:00 +02:00
Hans de Goede
19d49a42fc 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
1c3ff0338c 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
64379c1100 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.
2024-06-07 17:21:00 +02:00
Hans de Goede
65724bc46a 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
2024-06-05 13:00:20 +00:00
Hans de Goede
c06ee92baf 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 03842d5201.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2270030
2024-06-05 14:49:57 +02:00
Ray Strode
238d2fc2a2 Merge branch 'mr256' into 'main'
Issue #256

See merge request plymouth/plymouth!322
2024-06-04 15:06:13 +00:00
emperor06
f9f90fc3de 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
2024-06-04 11:05:05 -04:00
Ray Strode
edc7c3ea10 Merge branch 'fixmeson' into 'main'
Bump required Meson version

See merge request plymouth/plymouth!314
2024-04-30 01:19:15 +00:00
nerdopolis
8f0584f753 Bump required Meson version 2024-04-30 01:18:56 +00:00
Ray Strode
5fbb7bdb74 Merge branch 'xkbcommon-dep' into 'main'
ply-splash-core: Add xkbcommon dep to pkgconfig file

See merge request plymouth/plymouth!316
2024-04-24 18:47:30 +00:00
Ray Strode
c936adb567 ply-splash-core: Add xkbcommon dep to pkgconfig file
This addresses a build blip.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/251
2024-04-24 14:44:07 -04:00
Ray Strode
6935236fb6 Merge branch 'weblate-plymouth-master' into 'main'
Translations update from Fedora Weblate

See merge request plymouth/plymouth!312
2024-03-17 18:45:12 +00:00
Baurzhan Muftakhidinov
f2e02061a9 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
2024-03-10 10:36:09 +01:00