Failed connecting monitor in the middle of automatically running the system

I registered the service in systemd and confirmed that the file was automatically executed upon reboot. The file contains content that allows the camera to run. I want to run jetson nano without being connected to the monitor and make sure it is running well by connecting it in the middle. However, after removing the monitor connection and rebooting the jetson nano, I connected the monitor connection line a few minutes later, but it did not connect to the monitor.

Is there any way to run jetson nano before connecting the monitor and make the screen appear when the monitor is connected later?

I don’t quite understand what do you mean “I connected the monitor connection line a few minutes later, but it did not connect to the monitor.”. If you are talking about the monitor has nothing shown, then you can say it is totally blanked or no signal.

Please share dmesg when such case happened so that we can see what is going on.

Such situation should not happen. And I don’t see any connection between such case with your systemd process.

Thank you for your answer, Wayne WWW.

For accurate expression, it works as follows.

We want to run the current AI model when booting from jetsonano.
So the method we looked for was booting using /etc/rc.local.

The contents of “rc.local” are as follows.
export DISPLAY=0.0
source ~/.bashrc
sudo -H -u jetson nohub /usr/bin/python3 /home/jetson/jetson_AI/ --usb 0 > /home/jetson/jetson_AI/demo.log &

Also, for display settings,
/etc/ssh/sshd_config uncomment lines have been performed.
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

After setting it up and rebooting, we confirmed that the script we wanted is running properly.
But the part we want is that we want to run without connecting hdmi to Jetsonano.

The code works well when the hdmi line is connected (i.e., the monitor is visible), but if the hdmi line is not connected, it seems that the does not run at the same time as booting (log file does not remain).
Is there any way to solve this problem?

Also, what we experimented with is that when you boot with hdmi wire connected, the monitor comes in, and when you disconnect and reconnect the hdmi wire, the monitor comes in.
However, we found that the monitor does not come in when the hdmi line is connected again after booting without connecting the hdmi line.
Is there any way to solve this problem?

Thank you.

Additionally, the solution we ultimately want is for jetson nano to run as soon as it boots (without a monitor/ i.e. not visualization).

I don’t have a direct answer for both of your questions.

My suggestion is

For (1), please just run your script when no monitor is connected and see if it can work. I mean no rc script. Just the original command you are using. If even that cannot work, then no need to mention the rc local.

For (2), I don’t think that would happen, please use the uart console or usb console to dump the dmesg under such scenario.

I don’t have a full solution for you, but at the moment “rc.local” runs, there is no X server, and thus there is no DISPLAY. If you want a DISPLAY context you have to start a server, and someone must be logged in to that server. The server can be real, or the X server can be virtual (a program which needs an X server won’t care if the server is displaying to hardware or is just a virtual buffer).

If you want to know why reconnecting the monitor does not work, then you should monitor “dmesg --follow”, and then post what shows up upon connecting and disconnecting the monitor for the case of failing. This assumes an actual HDMI cable without any adapters which might cause problems.

I solved the problem. Thank you.