Commit graph

2966 commits

Author SHA1 Message Date
Ray Strode
d42a2830bd Merge branch 'keymap-icon-fixes' into 'main'
ply-keymap-icon: Make Dvorak check case-insensitive

See merge request plymouth/plymouth!341
2025-02-10 19:52:38 +00:00
Hans de Goede
a251957882 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>
2025-02-10 14:49:07 +01:00
Hans de Goede
f443234585 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>
2025-02-10 14:23:58 +01:00
Ray Strode
a0e8b6cf50 Merge branch 'freetype-monospace-bold' into 'main'
label-freetype: implement bold font handling

See merge request plymouth/plymouth!338
2024-12-15 18:40:14 +00:00
Ferdinand Bachmann
42430bcdf8 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.
2024-10-30 10:50:22 +01:00
Ray Strode
8bc9364cac Merge branch 'fix-freetype-monospace-fallback' into 'main'
label-freetype: fix monospace font fallback

See merge request plymouth/plymouth!337
2024-10-27 15:30:07 +00:00
Ferdinand Bachmann
90ae4ab42e label-freetype: fix monospace font fallback
fix find_default_monospace_font_path() accidently returning the
non-monospace fallback font in some cases.
2024-10-27 13:05:36 +01:00
Ray Strode
ea83580a6d Merge branch 'fixterminal' into 'main'
main: Go back to text mode when quitting (if appropriate)

See merge request plymouth/plymouth!334
2024-08-28 04:10:37 +00:00
nerdopolis
1e206268df main: Correctly switch back to text mode if the splash is requested, but never shown
Co-authored-by: filip-hejsek
Suggested-by: filip-hejsek
2024-08-20 18:53:33 -04:00
Ray Strode
d2ab367e12 main: Go back to text mode when quitting (if appropriate)
Since commit 48881ba2ef 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.
2024-08-20 18:18:18 -04:00
Ray Strode
c08a22599f Merge branch 'wip/jimmac/libadwaita-spinner' into 'main'
spinner: update design

See merge request plymouth/plymouth!324
2024-08-12 11:02:44 +00:00
Jakub Steiner
1a01883fa2 spinner: update design 2024-08-12 11:02:44 +00:00
Ray Strode
59c0e30e8f 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
2024-08-09 12:51:42 +00:00
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