Commit graph

2936 commits

Author SHA1 Message Date
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
ButterflyOfFire
fbb3f0b360 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
2024-03-10 10:36:08 +01:00
Ray Strode
050418a789 Merge branch 'scriptparsekmsg' into 'main'
script: Get the messages from the console and ply-kmsg-reader, and use...

See merge request plymouth/plymouth!277
2024-03-08 16:31:25 +00:00
nerdopolis
58a25cc403 script: Get the messages from the console and ply-kmsg-reader, and use ply-terminal-emulator and ply-console-viewer to the display messages 2024-03-08 13:23:02 +00:00
Ray Strode
f23233d446 Merge branch 'fix-no-unused-warning' into 'main'
ply-buffer: Fix unused-value warning

Closes #246

See merge request plymouth/plymouth!309
2024-03-07 20:22:29 +00:00
Ray Strode
c65d37e4ac 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
2024-03-07 15:14:34 -05:00
Ray Strode
18691572ee 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
2024-03-06 14:33:11 +00:00
Daniel van Vugt
3b8e918479 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
2024-03-05 17:51:11 +08:00
Ray Strode
4dc3a5ba0c Merge branch 'match-mutter-default-scale' into 'main'
ply-utils: Match mutter's default device scale choice

See merge request plymouth/plymouth!307
2024-02-27 08:07:23 +00:00
Daniel van Vugt
acf97c7367 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
2024-02-27 14:56:41 +08:00
Ray Strode
954abd07db Merge branch 'weblate-plymouth-master' into 'main'
Translations update from Fedora Weblate

See merge request plymouth/plymouth!306
2024-02-26 14:50:25 +00:00
Sabri Ünal
af51a5b96f 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
2024-02-26 02:36:08 +01:00
n3rdopolis
5113860332 Merge branch 'fix240' into 'main'
ply-boot-splash: Set unbuffered input when creating a text display

Closes #240

See merge request plymouth/plymouth!303
2024-02-07 01:29:18 +00:00
n3rdopolis
10ac8d2dc9 ply-boot-splash: Set unbuffered input when creating a text display 2024-02-06 20:19:23 -05:00
Ray Strode
7a0b0b802d 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
2024-02-01 10:39:17 +00:00
n3rdopolis
50aabad06a 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
2024-02-01 00:10:47 -05:00
Ray Strode
02bd04d431 Merge branch 'fix245' into 'main'
renderers: Do not assume all keyboards have LEDs

Closes #245

See merge request plymouth/plymouth!304
2024-01-31 16:14:08 +00:00
n3rdopolis
709f21e801 renderers: Do not assume all keyboards have LEDs
This is an attempt to fix #245
2024-01-31 08:38:38 -05:00