runit: Work around for the startup race condition

There is a race condition for the startup of lightdm on artix distros. The fix is supposed to be adding a wait for elogind as mentioned here. But this didn’t seem to fix it for my system and the race condition would still exist, so obviously something is still competing with lightdm. A work is just to add a short sleep; it isn’t the correct solution but is the simplest.

Just edit /etc/runit/sv/lightdm/run and add the wait for elogind and a sleep if you so choose:

#!/bin/sh
sv check dbus >/dev/null || exit 1
sv check elogind > /dev/null || exit 1
sleep 0.1
install -d -m0711 -olightdm -glightdm /run/lightdm
exec lightdm