Commit graph

2430 commits

Author SHA1 Message Date
Wolfgang Haupt
1e00a7a0ce The use of AM_GNU_GETTEXT_VERSION in configure.ac instructs autopoint to
copy po/Makefile.in.in from the exact gettext version. It is fine if the
version of gettext installed on the system has the same minor version
number with the requested version, but it fails if you have a newer
version of gettext because of the mismatch between autoconf macros and
Makefile.in.in.

  *** error: gettext infrastructure mismatch: using a Makefile.in.in
  from gettext version 0.19 but the autoconf macros are from gettext
  version 0.20

Instead of specifying the exact version with AM_GNU_GETTEXT_VERSION, we
can use AM_GNU_GETTEXT_REQUIRE_VERSION to ask autopoint to simply use
the gettext version installed on the system to prevent the mismatch.
2021-03-09 12:12:23 +00:00
Hans de Goede
9773f3e513 Merge branch 'drm_probe_speedup' into 'master'
Speed up DRM-connector probing

See merge request plymouth/plymouth!133
2021-03-09 11:25:31 +00:00
Hans de Goede
42ee6809b0 ply-device-manager: Speed up DRM-connector probing
During the initial monitor/connector enumeration on boot the kernel
fires a large number of change events. If we process these 1 by 1,
we spend a lot of time probing the DRM-connectors. So instead we
collect them all and then coalescence them so that if there are multiple
change events pending for a single card, we only re-probe the card once.

Here are some numbers of the probing times before / after this patch:

1. Lenovo X1 carbon 8th gen connected to a Lenovo Thunderbolt dock gen 2
   with 2 FullHD monitors connected:
Before: add event card0: 00:00:02.543 last change complete at: 00:00:04.250,
   12 change events processed, 13 probes done!
After: add event card0: 00:00:02.548 last change complete at: 00:00:04.049
   1 change event processed, 2 probes done!

2. Intel skylake CPU + iGPU based desktop with 2 FullHD monitors connected:
Before: add event card0: 00:00:02.394 last change complete at: 00:00:05.024,
   5 change events processed, 6 probes done!
After: add event card0: 00:00:02.343 last change complete at: 00:00:03.744,
   1 change event processed, 2 probes done!

In the Thunderbolt dock case we probe the DRM-connectors 2 times instead
of 13 times after this change. This does not lead to a big speed-up though
because the dock caches the monitors EDID info and the DP aux channel to
the dock is quite fast.

In the desktop case we only reduce the amount of probes from 6 to 2, so
less then in the Thunderbolt dock case, but since we don't have the EDID
caching happening there this does reduce the time which it takes to probe
the DRM-connectors from 2.6 seconds to 1.4 seconds which is a huge
improvement.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-06 10:57:05 +01:00
Hans de Goede
dc8dc20b26 ply-device-manager: add a verify_add_or_change() helper
Add a verify_add_or_change() helper function. This is a preparation
patch for coalescing multiple change events on the same card together
to speed up probing of the drm connectors.

Note this causes the action == "add" || action == "change" check to
be done twice. This double checking goes away in the next patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-06 10:57:05 +01:00
Hans de Goede
a649b55108 ply-device-manager: push udev_device_get_devnode call up into on_udev_event
on_udev_event calls either on_drm_udev_add_or_change; or
free_devices_for_udev_device. Both of these functions call
udev_device_get_devnode and are a no-op if that returns NULL.

Cleanup things by directly calling udev_device_get_devnode from
on_udev_event and exit eary if the udev_device does not have
an associated devnode.

With the udev_device_get_devnode call handled by on_udev_event,
all that is left of free_devices_for_udev_device is a single
line calling free_devices_from_device_path. So drop
free_devices_for_udev_device and directly call
free_devices_from_device_path from on_udev_event.

Note this also fixes a theoretical udev_device reference leak
in the action == NULL early-exit path. In practice action never
is NULL, so this was not really a problem. But in the refactored
code we now also do the early-exit on dev_path == NULL which does
actually happen.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-06 10:57:05 +01:00
Hans de Goede
9a3899c0ab two-step: Fix unused variable compiler warning
Fix the following:

plugin.c: In function ‘show_splash_screen’:
plugin.c:1645:13: warning: unused variable ‘i’ [-Wunused-variable]
 1645 |         int i;
      |

Compiler warning which I introduced in:

https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/132/

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-06 10:57:05 +01:00
Hans de Goede
8c249a46f2 Merge branch 'remove_new_object_sh' into 'master'
scripts: Remove new-object.sh

See merge request plymouth/plymouth!134
2021-03-06 09:53:53 +00:00
Hans de Goede
ba1a1e28d3 scripts: Remove new-object.sh
Remove new-object.sh. As discussed in:

https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/113

It is not used (and may very well have never been used?).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-06 10:40:36 +01:00
Hans de Goede
5c4b4012da Merge branch 'bgrt_fallback_image_fixes' into 'master'
BGRT fallback image fixes

See merge request plymouth/plymouth!132
2021-03-05 14:51:55 +00:00
Hans de Goede
c5db6cf2d1 two-step: Only create background_bgrt_fallback_image if use_firmware_background is set
We should not create (and try to use) the background_bgrt_fallback_image
when the config file has not requested use of the firmware-background.

Otherwise we will end up using bgrt-fallback.png if present even when the
config file has not requested usage of the firmware-background.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-05 13:55:10 +01:00
Hans de Goede
9cb47b71cb two-step: Always load the BGRT fallback image
view_set_bgrt_background() can fail even if the BGRT image was loaded
successfully. So we may need the fallback image even though the
BGRT image was loaded successfully.

This commit also fixes plugin->background_bgrt_fallback_image not being
free-ed and set to NULL when loading the fallback image fails.

Note this also drops the clearing of the use_firmware_background flagss
when we fail to load both the BGRT and the fallback images. Clearing
these flags is not necessary. They are only checked if
plugin->background_bgrt_image or plugin->background_bgrt_fallback_image
are non NULL; and if the loading of both images failed then both
are NULL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-03-05 13:52:38 +01:00
Hans de Goede
6bd905e5e8 Merge branch 'fix-bgrt-fallback' into 'master'
Fix BGRT fallback rendering

Closes #142

See merge request plymouth/plymouth!131
2021-03-05 10:41:06 +00:00
Adrian Vovk
64522226f4 Fix BGRT fallback rendering 2021-03-02 16:13:23 -05:00
Ray Strode
c74b3aef9c Merge branch 'kill-mode-change' into 'master'
systemd: switch to KillMode=mixed

See merge request plymouth/plymouth!122
2021-02-22 12:49:19 +00:00
Ray Strode
9d0f8b2e7b systemd: switch to KillMode=mixed
KillMode=none is deprecated, so we need to stop using it.

For now, use `KillMode=mixed` and `IgnoreOnIsolate=true` instead.

In the future, we should change plymouth to be able to exit and
start again without restarting the active animation, but that's
going to require some effort.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/123
2021-02-22 12:45:11 +00:00
Ray Strode
c4ced2a2d7 Merge branch 'use-fallback-image-if-bgrt-is-not-supported' into 'master'
Use fallback image if BGRT is not supported

See merge request plymouth/plymouth!125
2020-12-07 22:39:07 +00:00
Marius Meisenzahl
3ed2a1a92c Use fallback image if BGRT is not supported 2020-12-07 22:39:07 +00:00
Brian Murray
53c83cc8d6 client: Don't wait forever for a ping reply
In the event that plymouthd is not responding the plymouth client will
wait forever when sending a ping to the daemon.

This commit introduces a timeout of 30 seconds to better cope with a
hung plymouthd process.

(Some small changes to original patch by Ray Strode)

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/130
2020-10-28 10:07:27 -04:00
Ray Strode
03e7789503 Revert "Don't wait forever for a ping reply."
This reverts commit 55902cedde
2020-10-28 14:00:22 +00:00
Ray Strode
a3798ec4c5 Merge branch 'timeout-on-pings' into 'master'
Don't wait forever for a ping reply.

See merge request plymouth/plymouth!124
2020-10-26 19:54:16 +00:00
Brian Murray
55902cedde Don't wait forever for a ping reply.
In the event that plymouthd is not responding the plymouth client will wait
forever when sending a ping to the daemon. Instead of waiting forever timeout
after a while.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/130
2020-10-26 20:13:20 +01:00
Rafael Fontenelle
1253f7a2cb Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/pt_BR/
Translation: plymouth/master
2020-09-25 13:29:46 +02:00
Charles Lee
bb2a3fbdd8 Translated using Weblate (Chinese (Simplified))
Currently translated at 71.4% (5 of 7 strings)

Co-authored-by: Charles Lee <lchopn@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/zh_CN/
Translation: plymouth/master
2020-09-25 13:29:43 +02:00
Yuri Chornoivan
1f0846089c Translated using Weblate (Ukrainian)
Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/uk/
Translation: plymouth/master
2020-09-25 13:29:39 +02:00
Piotr Drąg
23cafb1a08 Translated using Weblate (Polish)
Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/pl/
Translation: plymouth/master
2020-09-25 13:29:36 +02:00
Oğuz Ersen
97ef6c3d48 Translated using Weblate (Turkish)
Currently translated at 100.0% (5 of 5 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/tr/
Translation: plymouth/master
2020-09-25 13:29:33 +02:00
Hans de Goede
20778f2efa Merge remote-tracking branch 'weblate/master' into master
Merge weblate updated/generated .po files from:
https://translate.fedoraproject.org/projects/plymouth/master/
into master
2020-09-21 15:30:28 +02:00
Weblate
bec341ae2d Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/
Translation: plymouth/master
2020-09-20 14:53:12 +02:00
Ray Strode
f28deaefdc Merge branch 'wip/fix-client-disconnect-crash' into 'master'
boot-server: Handle client disconnecting while trigger pending

See merge request plymouth/plymouth!123
2020-09-18 20:53:01 +00:00
Ray Strode
9f89239367 boot-server: Handle client disconnecting while trigger pending
At the moment if a client disconnects while the daemon is completely
an asynchronous request, the daemon crashes trying to access a freed
connection object.

This commit changes the boot server code to keep the connection object
alive after the client disconnects, if there's pending work to do.

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/125
2020-09-18 20:48:59 +00:00
Ray Strode
104d83d5f5 boot-server: Ref count the connections
This commit adds reference counting to ply_boot_connection_t.

This will be needed by a subsequent commit to fix a crasher bug.
2020-09-18 20:48:59 +00:00
Ray Strode
5ee1aa665e Merge branch 'update-l10n' into 'master'
Update translations

Closes #87

See merge request plymouth/plymouth!85
2020-09-16 17:16:23 +00:00
Rafael Fontenelle
85b72d61e5 Update translations from Zanata
Download latest translations from Fedora Zanata
2020-09-16 17:12:11 +00:00
Hans de Goede
15d80bd115 Merge branch 'drm-usermode' into 'master'
drm: Honor modes selected by the user through video= kernel cmdline argument

See merge request plymouth/plymouth!84
2020-09-16 16:57:41 +00:00
Hans de Goede
8dba434b2d NL translation update 2020-09-15 09:45:35 +02:00
Hans de Goede
18f87e81aa drm: Honor modes selected by the user through video= kernel cmdline argument
Before this commit we would skip preferred-mode selection if a video=
kernel cmdline is argument, instead relying on the kernel to have activated
all the outputs and then we would inherit those modes.

But this relies on fbcon having initialized the outputs, which it does not
do when deferred-fbcon-takeover is used. Deferred-fbcon-takeover is
necessary for flickerfree boot, so this is now the default in many distros.

Instead of relying on the kernel having setup everything for us, honor
the video= mode selection by checking for modes with a DRM_MODE_TYPE_USERDEF
flag before checking for modes with a DRM_MODE_TYPE_PREFERRED flag.

Note that the DRM_MODE_TYPE_USERDEF flag is only ever set based on a
video= argument. So on systems without a video= argument on the kernel
cmdline nothing changes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-09-15 09:45:35 +02:00
Ray Strode
9a55f5866e Merge branch 'patch-mismatched-monitors' into 'master'
use resolution of higher res monitor for window size

Closes #122

See merge request plymouth/plymouth!121
2020-08-24 14:51:52 +00:00
Kayran Schmidt
b2bf5d5cc9 use resolution of higher res monitor for window size 2020-08-23 11:24:48 +00:00
Hans de Goede
8176dc59b7 Merge branch 'translations-set-locale' into 'master'
Enable translations by having the init calling setlocale

See merge request plymouth/plymouth!120
2020-08-08 09:27:35 +00:00
Sebastien
f33e2014a8 Initialize the translations on start if they are available
setlocale was already called on filesystem mounting but that's not enough
to cover all the cases. The call needs to be conditional because doing it
at a time where the locales are not available (in the initrd) would
result in translations to not be working.
2020-08-07 16:51:35 +02:00
Ray Strode
6465e779c6 Merge branch 'master' into 'master'
Use the correct key name for title and subtitle

See merge request plymouth/plymouth!119
2020-08-01 00:47:24 +00:00
Sebastien
66bf171eae Use the correct key name for title and subtitle
The '_' was removed in the conversion to use gettext
2020-07-31 14:45:46 +00:00
Ray Strode
ab986a9582 autogoo: use /proc/self/fd/0 instead of /dev/stdin
The symlink isn't available in some sandboxes:

99bf64efdc (note_860312)
2020-07-09 09:34:36 -04:00
Ray Strode
e3a2cb9566 configure: bump to 0.9.6 2020-07-08 16:48:19 -04:00
Ray Strode
60c8359f2b Merge branch 'ci' into 'master'
Add CI pipeline for Plymouth

See merge request plymouth/plymouth!48
2020-07-08 20:01:28 +00:00
Emmanuele Bassi
d4741329c4 Apply suggestion to .gitlab-ci.yml 2020-07-08 19:20:46 +00:00
Emmanuele Bassi
f76485a560 ci: Add a distcheck step
We want to ensure that the CI is "release ready".
2020-07-08 19:20:46 +00:00
Emmanuele Bassi
9b485f6655 Add CI pipeline for Plymouth
We can use GitLab's CI/CD support to run a build.
2020-07-08 19:20:46 +00:00
Ray Strode
480f3e6daa Merge branch 'drop-intltool' into 'master'
Drop intltool

See merge request plymouth/plymouth!117
2020-07-08 19:20:30 +00:00
Ray Strode
e5baa1a4c5 configure: quiet a warning
I really don't like autogoo
2020-07-08 15:14:40 -04:00