Detect GPIO pins on boot and make decision accordingly

I am not sure what happened on your side. But this is the method that was validated by us and other customers also.

Only step 1 for your case. The rest is for enabling Weston. Not related ot your issue.

@WayneWWW
That’s weird

I was able to stop and start the display using “sudo init 3” and “sudo init 5” , and I think it’s enough in my case for now.
Back to my other question, Is there no way I can get the python application to display its output on the screen after startup without Xserver?

Thank you some much for your assistance.

This depends on what kind of framework your python app is using to render something to the screen.

If the reason you disable gdm3 and still want to render something is just because of the Ubuntu desktop, then you can still run startX or xinit int the background. Which will enable Xserver but no GUI.

@WayneWWW
Ok, so lets say I am starting my system normally with a gui and the password is disabled (but the login screen still needs me to press “enter”).
How can my python application display its output using Opencv (cv2.imshow) on the screen after startup ?
Is there any way to bypass the login screen?
The application can be delayed a little if that helps


I am still not sure why “login screen” is the concern here. Is your systemd service got stuck by the “login screen” here?

Also, what kind of “login screen” we are talking about here? Is that on your HDMI screen under console mode or GUI mode?

@WayneWWW ,
My concern with the login screen is that “I think” it’s not allowing me display my output using Opencv, After I login the app runs fine, and displays as expected,however I need the application to display its output on the screen automatically after startup.
I am talking about the Gui login screen.
I tried the solution of this thread, but I am still stuck on the login screen:

@WayneWWW
Nvm, I was able to enable auto-login by adding the following two lines to “/etc/lightdm/lightdm.conf” :
autologin-user=jetson
autologin-user-timeout=0

So my system is entering the desktop screen, but the app is failing to output the images on the screen, knowing that another application (which doesn’t need to display) works just fine.
If I run the application manually it also works fine, but it’s failing to run automatically on startup.
“sudo systemctl status mysthing.service”
gives: "python3[6574]: cannot open display " as an error

@WayneWWW
I also tried adding a 15 second delay before starting the python application, which did not work.

@WayneWWW
@kayccc
@JerryChang
Any idea why the app is failing to open the camera after power up ?

I found the solution here:

Thank you for your assistance.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.