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.
udev_list_entry_foreach (entry, udev_enumerate_get_list_entry (matches)){
struct udev_device *device = NULL;
const char *path, *node;
+ int initialized;
path = udev_list_entry_get_name (entry);
device = udev_device_new_from_syspath (manager->udev_context, path);
- /* if device isn't fully initialized, we'll get an add event later
- */
- if (udev_device_get_is_initialized (device)) {
- ply_trace ("device is initialized");
+ /* If device isn't fully initialized, we'll get an add event later */
+ initialized = udev_device_get_is_initialized (device);
+ /* Simpledrm can be handled uninitialized and this shows the splash sooner */
+ if (initialized || syspath_is_simpledrm (path)) {
+ ply_trace ("device is initialized %d", initialized);
node = udev_device_get_devnode (device);
if (node != NULL) {