A S Alam [Wed, 3 Mar 2021 20:47:31 +0000 (21:47 +0100)]
Translated using Weblate (Punjabi)
Currently translated at 100.0% (7 of 7 strings)
Co-authored-by: A S Alam <amanpreet.alam@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/pa/
Translation: plymouth/master
Wolfgang Haupt [Wed, 3 Mar 2021 15:06:37 +0000 (16:06 +0100)]
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.
Hans de Goede [Fri, 5 Mar 2021 11:25:36 +0000 (12:25 +0100)]
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>
Hans de Goede [Fri, 5 Mar 2021 11:20:52 +0000 (12:20 +0100)]
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>
Hans de Goede [Mon, 28 Sep 2020 13:04:11 +0000 (15:04 +0200)]
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>
Hans de Goede [Fri, 5 Mar 2021 10:57:53 +0000 (11:57 +0100)]
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>
Ray Strode [Tue, 25 Aug 2020 14:49:11 +0000 (10:49 -0400)]
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.
Brian Murray [Mon, 26 Oct 2020 19:13:20 +0000 (20:13 +0100)]
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.
Charles Lee [Fri, 25 Sep 2020 11:29:43 +0000 (13:29 +0200)]
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
Ray Strode [Wed, 2 Sep 2020 17:44:37 +0000 (13:44 -0400)]
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.
Hans de Goede [Sun, 10 Nov 2019 17:23:27 +0000 (18:23 +0100)]
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>
Sebastien [Thu, 6 Aug 2020 11:52:01 +0000 (11:52 +0000)]
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.
Daniel van Vugt [Fri, 17 Apr 2020 09:27:12 +0000 (17:27 +0800)]
main: Don't bail out of load_settings if "Theme" is missing
Because on some systems (like Ubuntu with its alternatives) the "Theme="
line will be missing from plymouthd.defaults. And bailing out early was
causing other settings like DeviceTimeout to never be loaded, which would
then cause the graphics renderers to fail.
At the moment switching modes affects two aspects of how plymouth
runs.
1) What log file is opened (i.e., boot.log or no log file at all)
2) What type of splash gets shown (the details of which are relegated
to the individual splash plugins)
The mode change handler has a check in place to avoid changing the
type of splash getting shown in the event no splash is supposed to
be shown yet. This check just makes the function return without
doing anything.
Unfortunately, the check is placed at the top of the function, so
it runs before the log file is changed.
This commit moves the check lower down, so the log file gets properly
updated when the mode is changed.
Ray Strode [Thu, 26 Mar 2020 18:11:50 +0000 (14:11 -0400)]
main: switch log file when switching mode
plymouthd can be run in various modes, for, e.g., boot up,
shutdown, and software upgrades.
The mode plymouthd is using can be changed at runtime.
The "boot" mode keeps a log of the console messages that
happen during boot up. At the moment, when changing from
the "boot" mode to any other mode, the log file is kept
open.
That open file can cause problems during shutdown.
This commit makes sure the log file is properly closed when
the mode is changed from boot to another mode.
Hans de Goede [Tue, 24 Mar 2020 22:17:42 +0000 (23:17 +0100)]
drm: Do not unnecessarily get output info twice
When a kernel-mode-setting driver loads it will trigger an add udev event
for /dev/dri/card0, followed by one udev change event per connector on the
card. This means that after our initial probe of the card,
create_heads_for_active_connectors is called a number of times for all the
udev change events.
After the initial enum our outputs array will contain active entries for
all connected displays. Meaning that the first loop in
create_heads_for_active_connectors would call get_output_info for
these outputs. Under the hood this does a number of ioctls and especially
the drmModeGetConnector call can be quite expensive.
Then in the second loop create_heads_for_active_connectors would call
get_output_info for all connectors, including for the once which were
checked in the first loop.
There is no reason why we cannot check if active connectors in the
old outputs array have changed when we are calling get_output_info for
all connectors to build the new array. This avoids unnecessarily making
the expensive get_output_info call twice for active connectors in the
old outputs array.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Mon, 23 Mar 2020 16:38:18 +0000 (17:38 +0100)]
ply-device-manager: Only consume one udev event at a time
Commit f9e376797a91 ("ply-device-manager: Consume all events in one go")
changed ply-device-manager to consume all pending udev events in one go
instead of consuming only 1 and then returning back to the mainloop.
The idea here was to avoid the overhead of returning back to the mainloop,
doing the poll again, seeing more events were pending and then re-enter
ply-device-manager.
In retrospect this is not a good idea. Systemd waits for oneshot units
like plymouth-switch-root.service to finish and this can block the boot.
Specifically plymouth-switch-root.service must complete before systemd in
the initrd will exec the systemd from the real rootfs. This means that
systemd inside the initrd waits for the:
Command to complete, if this command runs while we are consuming udev
events from the graphics card (which sends a change event per probed
connector during the initial probe), then plymouth will not send the ack
to the plymouth boot-client (completing the ExecStart) until all udev
events are consumed.
On my main workstation with i915 graphics and 2 HDMI connected FHD monitors,
this delays the actual switching of the root by 1.9 - 2.1 seconds,
because the re-enumaration of the connectors in the drm plugin takes
about 0.4 seconds per run.
Other upcoming changes will greatly reduce that 0.4 seconds, but still
returning to the main-loop after a single udev event so that we can
answer any waiting boot-clients ASAP is a good idea.
Hans de Goede [Mon, 23 Mar 2020 14:59:24 +0000 (15:59 +0100)]
Add RemainAfterExit=yes to plymouth's systemd service files
All plymouth's systemd unit files are meant to only run once, either during
boot or during shutdown/restart.
Certain events cause systemd to recheck the dependency try between systemd
units. Systemd had a bug before the 245 release which caused this check to
sometimes not restart exited services for which the dependencies are met.
Systemd 245 fixes this, this is causing problems with plymouth.
When the conditions are met for systemd to recheck the dependencies;
and the plymouthd started by plymouth-start.service has exited;
then systemd will restart the plymouth-start unit, causing plymouthd to
take over tty1 after boot. This is causing various problems, also see:
Since all plymouth's systemd units are intended to run only once, they
all should be marked as remaining after exit by adding:
"RemainAfterExit=yes" to them. This causes systemd to still consider them
running after e.g. plymouthd has exited, as long as they have started
successfully. This fixes systemd restarting plymouth's units when it
should not do so.
Hans de Goede [Tue, 18 Feb 2020 21:03:58 +0000 (22:03 +0100)]
two-step: Add UseEndAnimation setting
We try to start the end animation early based on our progress accounting
but this is highly unreliable because e.g.:
-It counts time to enter the diskcrypt passwd as normal boot time, while
this varies wildly from boot to boot
-Boot times for laptops can differ significantly between docked / undocked
state
Between gdm calling /bin/plymouth deactivate and the drm plugin's deactivate
method getting called there can be e.g. 2.1 seconds (from a random boot),
with a theoretical maximum of 3 seconds (2 seconds to finish the throbber +
1 second for the end animation).
On a modern system userland boot should be able to finish in say 5 seconds,
making gdm wait an additional 1 - 3 seconds for deactivation is a huge amount
of extra wait time!
This commit adds a new "UseEndAnimation" option to the two-step plugin,
which defaults to true. Setting this to false makes deactivation immediate.
This works nicely with the spinner (and bgrt) themes since we do not really
do anything special in the end animation there anyways and since we fade-over
into gdm things will still look ok, while shaving a signifcant chunk of our
boot time.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
J-P Nurmi [Tue, 10 Mar 2020 22:10:08 +0000 (23:10 +0100)]
script: add Image.Crop(x, y, width, height)
The script plugin currently allows pixel buffers to be resized and
scaled, but provides no mechanism for script theme authors to just crop
the buffer, which is necessary for images that cannot be stretched,
such as progress bars with gradients.
This commit adds that feature as a new Crop method.
Hans de Goede [Tue, 18 Feb 2020 10:51:03 +0000 (11:51 +0100)]
ply-throbber: Do not redraw when we need to stop throbbing on free
One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.
Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.
ply-throbber is the only (older) widget which does a redraw on free,
this likely was not noticed until now because typically the throbber
will already have been stopped on free.
This commit adds a redraw parameter to ply_throbber_stop_now and sets
this to false when calling ply_throbber_stop_now from ply_throbber_free.
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
while plymouth is running.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 18 Feb 2020 10:50:17 +0000 (11:50 +0100)]
ply-keymap-icon: Do not draw on free
One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.
Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.
ply-keymap-icon is a recently added widget, none of the other
(older) widgets redraw themselves as hidden on free because there is
no reason to do this.
This commit removes the troublesome hide call (which involves redrawing).
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
while plymouth is running.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 18 Feb 2020 10:45:55 +0000 (11:45 +0100)]
ply-capslock-icon: Do not draw on free
One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.
Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.
ply-capslock-icon is a recently added widget, none of the other
(older) widgets redraw themselves as hidden on free because there is
no reason to do this.
This commit adds a new stop_polling helper and replaces the troublesome
hide call (which involves redrawing) with this. This fixes plymouth
sometimes crashing when monitors are hot(un)plugged while plymouth is
running.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>