Comment 20 for bug 1794292

Revision history for this message
Gert van de Kraats (gkraats) wrote :

Proposing next improved code

At src/libply-splash-core/ply-device-manager.c

1) at
create_devices_for_subsystem (ply_device_manager_t *manager,
                              const char *subsystem)
change
    found_device = create_devices_for_udev_device (manager, device);
into
    found_device = found_device || create_devices_for_udev_device (manager, device);

2) at
create_devices_for_terminal_and_renderer_type (ply_device_manager_t *manager,
                                               const char *device_path,
                                               ply_terminal_t *terminal,
                                               ply_renderer_type_t renderer_type)
change
   return;
into
   return false;

Notes at 1);
As can be seen at the downloaded grub-trace, the graphical splash with keyboard is activated on 2 screens,
before the device-timeout (which is set to 10.0).
After the device-timeout routine create_devices_from_udev will call create_devices_for_subsystem (manager, SUBSYSTEM_DRM).
This routine should return true if any drm-device is found. Because of the wrong code it returns only true
if the last device is coorect.
As can be seen at the downloaded grub-trace the last device /dev/dri/renderD128 is not usable.
This causes at the trace-message: create_devices_from_udev:Creating non-graphical devices, since there's no suitable graphics hardware.
This causes the second unwanted call to create_devices_for_terminal_and_renderer_type for non-graphical /dev/tty1, also listening to keyboard.

Notes at 2)
This is the solution for a compiler warning. It is just wrong coding, do not know if it will ever harm.

Remark:
For some reason at my PC the drm-devices are comimg up very slow at 18.10 (22 sec) compared to 18.04 (3 sec).
To avoid the ugly text splash I had to enlarge DeviceTimeout from default 5 to 10. This does not slow down startuptime.
cat /etc/plymouth/plymouthd.conf
# Administrator customizations go in this file
[Daemon]
Theme=solar
ShowDelay=0
DeviceTimeout=10