add timeout for /dev/fb0, some hardware does not initialize this devices and causes infinite hanging.

This commit is contained in:
Tobias Powalowski 2024-02-29 10:31:22 +01:00
parent 55092042b2
commit 14bfa31097

View file

@ -125,14 +125,15 @@ _initrd_stage() {
for i in cdrom usb-storage zram zstd; do for i in cdrom usb-storage zram zstd; do
modprobe -q "${i}" modprobe -q "${i}"
done done
# take care of builtin drm modules # take care of builtin drm modules, timeout after 10 seconds to avoid hang on some systems
udevadm wait --settle /dev/fb0 udevadm wait --settle /dev/fb0 -t 10
# get screen setting mode from /sys _SIZE="16"
_FB_SIZE="$(sed -e 's#.*:##g' -e 's#x.*##g' /sys/class/graphics/fb0/modes 2>/dev/null)" if [[ -e /sys/class/graphics/fb0/modes ]]; then
if [[ "${_FB_SIZE}" -gt '1900' ]]; then # get screen setting mode from /sys
_FB_SIZE="$(sed -e 's#.*:##g' -e 's#x.*##g' /sys/class/graphics/fb0/modes 2>/dev/null)"
if [[ "${_FB_SIZE}" -gt '1900' ]]; then
_SIZE="32" _SIZE="32"
else fi
_SIZE="16"
fi fi
# it needs one echo before, in order to reset the consolefont! # it needs one echo before, in order to reset the consolefont!
_msg "Initializing Console..." _msg "Initializing Console..."