Hi aus9
... The dmesg timestamps give your TIMEOUT a one second lead to be the new winner ...
The sleep method will always wait 6 seconds regardless of if or when the /dev/dri/ entries show up.
The Timeout method will only wait as long the /dev/dri/ entries are not present up to a max of 10 seconds.
If you want to see the actual time spent in the Timeout code, you can
add a command to save the elapsed time to a file:
Timeout=40
while [ $Timeout -gt 0 ]
do
[ -e /dev/dri/card0 ] && [ -e /dev/dri/card1 ] && break
Timeout=$(($Timeout - 1))
sleep 0.25
done
calc '(40-'$Timeout')*.25' > Timeout.txt
The Timeout.txt file in your home directory will contain how many seconds it
had to wait for the /dev/dri/ entries to show up.
Remember, the time it takes for the /dev/dri/ entries to show up can vary with
changes made to the contents and order of extensions in your onboot.lst file.