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