Deepstream + systemctl and no X11 = daemon cannot start

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) Jetson Xavier AGX
• DeepStream Version 6.0.1
• JetPack Version (valid for Jetson only) 4.6
• TensorRT Version 8.2.1

I am trying to run a simple script through systemctl daemons, but the daemon is always Inactive, it starts but exits.

My script is essentially the, with short insignificant modifications ( (18.7 KB).

When I run the script from terminal, it works fine:
python3 -i rtsp://admin:hbyt12345@

But when I call it by using systemctl, it doesn’t starts.
systemctl --user start deepstreampipeline.service

My systemd file is this:

ubuntu@ubuntu:~/EdgeServer$ more /home/ubuntu/.config/systemd/user/deepstreampipeline.service 
Description=Serviço de detecções DeepStream no edge do ecosistema Livia

ExecStart=python3 /home/ubuntu/EdgeServer/ -i rtsp://admin:hbyt12345@
ExecStopPost=fkill -f


I have seen many posts talking about the X11 problem, but there is no display. I have also tried to debug by doing sudo python3 -i rtsp://admin:hbyt12345@, since I know that systemd doesn’t run with exactly the same environment variables from user, but it didn’t help. I am missing something, but I doesn’t understand what is going on.

Does any one have a tip?

This problem doesn’t seem to be related to deepstream.

You can use the following command to view the systemd log to analyze the cause of the error.

It is possible that you need to start your service after some system services are started.

journalctl -u deepstreampipeline

I am quite sure its about deepstream, my systemd script works with any other Python scripts, except this one with deepstream. Now my systemd script is this, so that it get’s independent from reloading it, since it will always call an .sh file:

Description=Serviço de detecções DeepStream no edge do ecosistema Livia



And all my does is python3 -i rtsp://admin:hbyt12345@ &

Is there any violation of deepstream/gstreamer trying to use X, even though its is just a console application?

This does not mean that it has anything to do with deepstream. It may just be that the dependent system services are not started by systemd.

So what you need to do now is to check the systemd log. Have you used the command above to check the log?

I use as an example.

Below is my systemd configuration file. Save it to /lib/systemd/system/deepstream.service


ExecStart=python3 -i rtsp://""/media/video1
ExecReload=/bin/kill -HUP $MAINPID


Add deepstrem.service to startup list

sudo systemctl enable deepstream.service 

enable NetworkManager-wait-online.service, please note that this will slow down startup, but it is necessary

sudo systemctl enable NetworkManager-wait-online.service

As I said above, this is a systemd issue, not deepstream.

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