Jetpack 3.2.1 on Tx2 !

Hi ,
I installed Jetpack 3.2.1 on Tx2 for me to get deepstream sdk. But i dont see nvcc --version working and even deepstreamer pipeline also does not work.

sudo nvgstiva-app -c ~/configs/PGIE-FP16-CarType-CarMake-CarColor.txt -i /home/nvidia/sample_720p.mp4
[sudo] password for nvidia:
------------> -----------------
** ERROR: <create_secondary_gie:105>: Failed to create ‘secondary_gie_0’
** ERROR: <create_secondary_gie:235>: create_secondary_gie failed
** ERROR: <create_secondary_gie_bin:364>: create_secondary_gie_bin failed
** ERROR: <create_processing_instance:926>: create_processing_instance failed
** ERROR: <create_pipeline:1062>: create_pipeline failed
** ERROR: main:384: Failed to create pipeline
App run failed

Any ideas ???

Any ideas, please help !

First, did you install CUDA? If you go to “/usr/local/”, there should be a version of CUDA there. Within this “cuda-/” subdirectory, look for subdirectory “bin/”. “nvcc” would be within that. This bin directory is not normally in your default search path and applications building with this typically get told where to find it.

Do keep in mind that you don’t have to always flash to use JetPack. Normally the Jetson flashes/reboots and then JetPack installs extra packages, but you can uncheck flash and just install packages. If you are missing CUDA, then this is how you would add it back in. If it is there, then you would just tell any kind of build configuration where to find nvcc (or perhaps add it to your default search path).

I am unable to install Cuda as the installer fails and asks me to install manually.
When i try running manually as :
sudo apt-get cuda-toolkit-9-0 libompl libfreeimage-dev libopenmpi-dev openmpi-bin

I get following error:
E:Could not get lock /var/lib/dpkg/lock-open(11:Resource tempaoririly unavailable)
E: Unable to lock the adminstration directory(/var/lib/dpkg/), is another process running it ?

Although i tried restarting and freshly tried installing assuming some lock issue would get solved.

But no Luck.

Any ideas , please let me know.


Either the system is trying to do an automatic update, or one failed and is stuck. The following is to try and find out if the system is just looking at upgrades after booting.

What do you see from:

sudo systemctl status unattended-upgrades.service

What do you see from:

ps aux | egrep '(apt|dpkg)' | egrep -v 'egrep'

Do you see a file (symbolic link) here?

ls /etc/systemd/system/

If there is a possibility the system is trying to do an apt-get upgrade automatically (or just getting a list of out of date packages), try disabling the unattended upgrades and reboot, then install CUDA again:

sudo systemctl disable unattended-upgrades.service
sudo shutdown -r now
# ...try CUDA install again...use JetPack if needed, but uncheck flash and connect only wired ethernet.

If you succeed, and if you want this feature on, then you can re-enable:

sudo systemctl enable unattended-upgrades.service

If this still fails, then we can check for a stale lock file.

nvidia@tegra-ubuntu:~/Desktop$ sudo systemctl status unattended-upgrades.service
unattended-upgrades.service - Unattended Upgrades Shutdown
Loaded: loaded (/lib/systemd/system/unattended-upgrades.service; enabled; ven
Active: inactive (dead)
Docs: man:unattended-upgrade(8)

nvidia@tegra-ubuntu:~/Desktop$ ps aux | egrep ‘(apt|dpkg)’ | egrep -v ‘egrep’
dnsmasq 574 0.0 0.0 9824 1804 ? S 11:49 0:00 /usr/sbin/dnsmasq -x /var/run/dnsmasq/ -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5 --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
nvidia 25334 0.0 0.0 5548 576 pts/8 S+ 18:43 0:00 grep -E --color=auto (apt|dpkg)

nvidia@tegra-ubuntu:~/Desktop$ ls /etc/systemd/system/
ls: cannot access ‘/etc/systemd/system/’: No such file or directory

i did not see symbolic link

nvidia@tegra-ubuntu:~/Desktop$ sudo systemctl disable unattended-upgrades.service
Synchronizing state of unattended-upgrades.service with SysV init with /lib/systemd/systemd-sysv-install…
Executing /lib/systemd/systemd-sysv-install disable unattended-upgrades
update-rc.d: error: unattended-upgrades Default-Start contains no runlevels, aborting.

So I don’t see the unattended upgrades enabled (which would run on startup). But I do see that you have some sort of caching going on with dnsmasq. Unfortunately, I don’t know if this is related or not (it could be perfectly normal).

I do see in “/etc/apt/apt.conf.d/” a file “20auto-upgrades”. I am going to suggest you move this somewhere else, e.g., assuming you are logged in as user “nvidia”:

mkdir ~nvidia/tmp
sudo mv /etc/apt/apt.conf.d/20auto-upgrades ~nvidia/tmp/

…reboot, and try again. If it fails, verify if this file exists:


If this file still exists, and the update failed, try:

sudo pgrep -f 'dpkg|apt'
# then <i><b>for each process ID</b></i>, if any, run:
kill <process ID>
sudo rm /var/lib/dpkg/lock

…and try again (it is important to kill any existing “apt” or “dpkg” command first so it won’t corrupt a database by running two operations simultaneously…sometimes though the lock exists after an apt or dpkg failure and doesn’t go away when it should).

After that, if it all worked, then you can:

sudo mv ~nvidia/tmp/20auto-upgrades /etc/apt/apt.conf.d/

(this adds the auto update back in)

The reason for all of this trouble is that a new dpkg/apt operation is refusing to run due to something else already running…but we don’t know if something else is really running, or if instead a failed run left a lock. Eventually we get to the steps of either removing a stale lock or killing some automatic update which is running on each boot. If you’ve never run “sudo apt update; sudo apt-get upgrade”, then there is an enormous list of files to download and that could legitimately hold the lock open for hours or more.

If you have installed CUDA successfully, please clean cache and try again.

2. If the error Failed to create pipeline is displayed, remove the cache files on the Jetson developer kit as follows:
$ sudo rm -rf ${HOME}/.cache/*

We have the steps in the document.

Hi linuxdev and DaneLLL,
Thanks for your help. Well i was unsuccesful in installing cuda, hence ended up flashing again Jetpack 3.2.1 . Now cuda looks to be fine. But gstreamer errors are there such as ,

nvidia@tegra-ubuntu:~$ gst-launch-1.0 filesrc location = ~/Documents/videos/Demo.mp4 ! decodebin ! nvvidconv ! xvimagesink
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1760): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Could not open display (null)
Setting pipeline to NULL …
Freeing pipeline …

You may miss

export DISPLAY=:0

No Luck .
nvidia@tegra-ubuntu:~$ export DISPLAY=:0
nvidia@tegra-ubuntu:~$ gst-launch-1.0 ~/Documents/videos/Demo.mp4 ! decodebin ! nvvidconv ! xvimagesink

(gst-launch-1.0:2292): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed
WARNING: erroneous pipeline: no source element for URI “/home/nvidia/Documents/videos/Demo.mp4”

You miss filesrc element.

Thanks DaneLLL. This helped.
Any idea how should i ensure that this stream is decoding from NVIDIA’s hardware ?
And also how i can decode 2 or multiple streams from this NVIDIA hardware.

Please check gstreamer user guide

And DeepStream user guide.

Thanks DaneLLL.
I am not able to use nvidia plugin of nvoverlaysink as it gives following error:
But if i run with xvimagesink it runs well.

gst-launch-1.0 filesrc location=~/Documents/videos/Demo.mp4 ! decodebin ! nvvidconv ! nvoverlaysink -e
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
NvMMLiteOpen : Block : BlockType = 279
TVMR: NvMMLiteTVMRDecBlockOpen: 7647: NvMMLiteBlockOpen
NvMMLiteBlockCreate : Block : BlockType = 279
TVMR: cbBeginSequence: 1179: BeginSequence 3840x2160, bVPR = 0
TVMR: LowCorner Frequency = 345000
TVMR: cbBeginSequence: 1529: DecodeBuffers = 4, pnvsi->eCodec = 10, codec = 9
TVMR: cbBeginSequence: 1600: Display Resolution : (3840x2160)
TVMR: cbBeginSequence: 1601: Display Aspect Ratio : (3840x2160)
TVMR: cbBeginSequence: 1669: ColorFormat : 5
TVMR: cbBeginSequence:1686 ColorSpace = NvColorSpace_YCbCr2020
TVMR: cbBeginSequence: 1809: SurfaceLayout = 3
TVMR: cbBeginSequence: 1902: NumOfSurfaces = 11, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1, BitDepthForSurface = 16 LumaBitDepth = 10, ChromaBitDepth = 10, ChromaFormat = 5
TVMR: cbBeginSequence: 1904: BeginSequence ColorPrimaries = 9, TransferCharacteristics = 16, MatrixCoefficients = 9
Allocating new output: 3840x2160 (x 11), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged : nFrameWidth = 3840, nFrameHeight = 2160
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH265Dec-omxh265dec:omxh265dec-omxh265dec0: Internal data stream error.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideodec.c(2904): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH265Dec-omxh265dec:omxh265dec-omxh265dec0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
TVMR: TVMRFrameStatusReporting: 6132: Closing TVMR Frame Status Thread -------------
TVMR: TVMRVPRFloorSizeSettingThread: 5942: Closing TVMRVPRFloorSizeSettingThread -------------
TVMR: TVMRFrameDelivery: 5982: Closing TVMR Frame Delivery Thread -------------
TVMR: NvMMLiteTVMRDecBlockClose: 7815: Done
Freeing pipeline …

It may be the resolution not supported by TV. If the TV supports up to 1080, You have to downscale 4K to 1080p.

Please also try the pipelines listed in user guide instead of using decodebin.