Read the statement by Michael Teeuw here.
Autostarts but doesn't run, will run on restart
-
@ember1205 people are constantly fiddling with stuff, you never know what you’re gonna get anymore.
-
Would there be more value in coding in a check for to see if it’s Raspbian or possibly even bullseye and adding a two second sleep if there is?
raspberry_pi=$(grep ID /etc/os-release | cut -f2 -d=) if [ "$raspberry_pi." == "raspbian" ] ; then sleep 2 fi xorg=$(pgrep Xorg)
Maybe there’s a better string to search for, but it might be a stop-gap that would help?
-
@ember1205 i don’t think thats right… as we could have the same problem on any other system…
-
Correct syntax would need to be:
raspberry_pi=$(grep ^ID= /etc/os-release | cut -f2 -d=) if [ "$raspberry_pi." == "raspbian" ] ; then sleep 2 fi
The RPi 3B+ is a little slower to initialize on Bullseye versus Buster. Any time a device is running a slightly heavier OS and needs a little more time to finish booting up, I could see this occurring. The question is, do you solve it with a fix that impacts everyone (“sleep 2” or similar), test for particular OS/HW combo’s, or is there another process to look for that would better indicate when the system should be finished initializing?
Right now, it looks for X and just “moves on” when it isn’t found and assumes some sort of mistake or something in the config. Great as a fail-safe, but creates a new occasional issue to be dealt with.
-
@ember1205 that test is for when MM is running under docker (with no X running) but using the docker host’s xorg for viewing…
-
The test I’m referring to checks to see if X is running. If not, it moves on to test for Lubuntu. If that also fails, it assumes server only and moves on.
I do recall seeing a specific Docker test at the very beginning of the script, but that’s a fair bit earlier than where I’ve added this check (which is right before the “pgrep Xorg” line).
-
@ember1205 yes… i am looking for a test that works if the system is slow…
i added the rm of ./config folder and my pi 0 now comes up instead of the chrome desktop
which was random before…if [ $(which $b). != '.' ]; then rm -rf ~/.config/$b 2>/dev/null # add this line
-
@sdetweil said in Autostarts but doesn't run, will run on restart:
… my pi 0 now comes up instead of the chrome desktop
which was random before…Not sure I’m following what this should mean?
-
@ember1205 you had another problem where chrome comes up to the white screen w the icons. that is the chrome desktop.
i added the delete of the config folder to the run start script to get it back to just MagicMirror
-
Oh… now I follow.