DS app running on SD, not running on eMMC - Part II

This issue has been started in this thread DS app running on SD, but not on eMMC (image problem?) - #14 by foreverneilyoung, which finally ended up in the problem to install DS and JP to an eMMC.

I’m having here a procedure, which should be “easy” to follow for you and which illustrates the problem I have:

Required:

  • Jetson Nano dev kit 4 GB
  • Jetson Nano productive module 16 GB eMMC

Steps to failure:

  • Install base system using SDK manager, don’t install any SDK
  • Finish initial installation on device
  • Clean up and remove some packages to make space for JP and DS:
sudo apt remove chromium*
sudo apt remove firefox*
sudo apt remove thunderbird*
sudo apt remove libreoffice*
sudo apt remove man-db

sudo apt autoremove
sudo apt remove libnvinfer-samples
sudo apt remove cuda-documentation-10-2
sudo apt remove cuda-samples-10-2
sudo apt remove libvisionworks-samples
sudo apt remove libopencv-samples

sudo apt autoremove
  • Install DeepStream SDK
sudo apt install deepstream-5.1 -y
  • You should now have at least 4-5 GB free again, even though it seems, that all required SDKs are installed

  • Open a console, fire up “python3” and enter this sequence

    import sys
    sys.path.append(‘/opt/nvidia/deepstream/deepstream/lib’)
    import gi
    gi.require_version(‘Gst’, ‘1.0’)
    from gi.repository import GObject, Gst

    GObject.threads_init()
    Gst.init(None)

    pgie = Gst.ElementFactory.make(‘nvinfer’, ‘primary-inference’)
    print(pgie)
    None

  • You should see “pgie” is None. This is a safe indication, that no DeepStream based Python application will run on this device.

If you do the same on an SD booted system, it will work:

  • Use a 32 GB SD card flashed from the official Nvidia sources instead of the eMMC module

  • Finalize the installation on the device

  • Install DS

sudo apt install deepstream-5.1 -y

  • Fire up python an run the same sequenc. pgie should now describe a valid object. Python apps will work.
1 Like

Hi,
In DeepStream SDK, CUDA and TensorRT are required for nvinfer plugin so we are not able to remove the packages. Could you please try:
Save 1GB of Memory! Use LXDE on your Jetson - JetsonHacks

Using a lightweight desktop system may help. We are trying to reduce package size but on current releases, suggest put roots on external storage with larger space.

OK, I was following your suggestion and also this great tutorial Jetson Nano - Boot from USB - JetsonHacks. I managed to boot from a 64 GB USB 3 thumb drive. Astonishingly the boot time is quite double of the SD (32 GB SD = 30 s, 64 GB USB = 50 s).

Is there anything to do with this? I have two entries in extlinux.conf, one for the SD too, but the primary record is for the USB drive.

I notice a “NO SD” indicator on the start screen followed by a timeout, can this be removed?

Hi,
Please try the steps:

  1. Install system image through SDKManager. Not to install SDK Components.
  2. Install DeepStream SDK through apt install:
$ sudo apt install deepstream-5.1
$ sudo apt install cuda-nvrtc-10-2
  1. Remove the packages:
$ sudo apt remove --purge thunderbird* libreoffice* chromium*

After the steps we can see more freespace:

$ df -a
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p1  14318640 9632908   3935348  71% /

And can run

/opt/nvidia/deepstream/deepstream-5.1/samples/configs/deepstream-app$ deepstream-app -c source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt
1 Like

Thanks, but how to do this?

  1. Install system image through SDKManager. Not to install SDK Components.

There is no way to install w/o SDK components, you can’t uncheck this.

Hi,
Please check

Ah… sh… yes. On the second page. Will try and let you know

OK, I can confirm this to work.

Some minor issues

  1. You have to sudo update && sudo upgrade after the base installation and before installing DS and CUDA, otherwise…
The following packages have unmet dependencies:
 deepstream-5.1 : Depends: libnvinfer7 (>= 7.1.0) but it is not installable
                  Depends: libnvinfer-dev (>= 7.1.0) but it is not installable
                  Depends: libnvparsers7 (>= 7.1.0) but it is not installable
                  Depends: libnvparsers-dev (>= 7.1.0) but it is not installable
                  Depends: libnvonnxparsers7 (>= 7.1.0) but it is not installable
                  Depends: libnvonnxparsers-dev (>= 7.1.0) but it is not installable
                  Depends: libnvinfer-plugin7 (>= 7.1.0) but it is not installable
                  Depends: libnvinfer-plugin-dev (>= 7.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

After having installed it and removed the unnecessary packages as described above, I still had 4.1 GB free:

ubuntu@jetson:~$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   15G   10G  4,1G  72% /
none            1,9G     0  1,9G   0% /dev
tmpfs           2,1G   41k  2,1G   1% /dev/shm
tmpfs           2,1G   21M  2,1G   1% /run
tmpfs           5,3M  4,1k  5,3M   1% /run/lock
tmpfs           2,1G     0  2,1G   0% /sys/fs/cgroup
tmpfs           415M  115k  415M   1% /run/user/1000

After installing my stuff 3.8 GB. That is more than sufficient for me.

Needless to say, that both - your sample and my app - worked fine.

Great job, many thanks for the help.

I just have some questions regarding your sample, especially to the metrics displayed:

KLT Tracker Init
KLT Tracker Init
KLT Tracker Init
KLT Tracker Init
KLT Tracker Init
KLT Tracker Init
KLT Tracker Init
KLT Tracker Init
**PERF:  27.81 (27.67)	27.38 (27.25)	27.38 (27.25)	27.38 (27.25)	27.81 (27.67)	27.81 (27.67)	27.38 (27.25)	27.81 (27.67)	
**PERF:  28.64 (28.16)	28.64 (27.95)	28.64 (27.95)	28.64 (27.95)	28.64 (28.16)	28.64 (28.16)	28.64 (27.95)	28.64 (28.16)	
**PERF:  28.27 (28.24)	28.27 (28.10)	28.27 (28.10)	28.27 (28.10)	28.27 (28.24)	28.27 (28.24)	28.27 (28.10)	28.27 (28.24)	
**PERF:  29.26 (28.33)	29.26 (28.23)	29.26 (28.23)	29.26 (28.23)	29.26 (28.33)	29.26 (28.33)	29.26 (28.23)	29.26 (28.33)	
**PERF:  28.81 (28.47)	28.81 (28.38)	28.81 (28.38)	28.81 (28.38)	28.81 (28.47)	28.81 (28.47)	28.81 (28.38)	28.81 (28.47)	
**PERF:  29.03 (28.55)	29.03 (28.49)	29.03 (28.49)	29.03 (28.49)	29.03 (28.55)	29.03 (28.55)	29.03 (28.49)	29.03 (28.55)	
**PERF:  28.00 (28.47)	28.00 (28.42)	28.00 (28.42)	28.00 (28.42)	28.00 (28.47)	28.00 (28.47)	28.00 (28.42)	28.00 (28.47)	
**PERF:  27.96 (28.41)	27.96 (28.36)	27.96 (28.36)	27.96 (28.36)	27.96 (28.41)	27.96 (28.41)	27.96 (28.36)	27.96 (28.41)	
**PERF:  28.29 (28.46)	28.29 (28.41)	28.29 (28.41)	28.29 (28.41)	28.29 (28.46)	28.29 (28.46)	28.29 (28.41)	28.29 (28.46)	
**PERF:  28.34 (28.43)	28.34 (28.39)	28.34 (28.39)	28.34 (28.39)	28.34 (28.43)	28.34 (28.43)	28.34 (28.39)	28.34 (28.43)	

Is this a display of the inference framerates achieved on each of the 8 channels? If so I would need a little interpretation help of this video I made. It clearly not shows 28 fps on each window, or?

It stutters and is not fluently, IMHO.

Anyway, nice job

Hi,
Please execute nvpmodel -m 0 and sudo jetson_clocks. And run VIC at max clock:
Nvvideoconvert issue, nvvideoconvert in DS4 is better than Ds5? - #3 by DaneLLL

Executing the steps should provide max performance of Jetson Nano. Please give it a try.

nvpmodel -m 0 and sudo jetson_clocks is already the case. No change.

echo on > /sys/devices/13e10000.host1x/15340000.vic/power/control gives:

-bash: /sys/devices/13e10000.host1x/15340000.vic/power/control: No such file or directory

Under /sys/devices there is only this:

ubuntu@jetson:~$ ls /sys/devices/
0.spdif-dit.0             70000800.apbmisc  7000fc00.kfuse                       7.spdif-dit.7         dvfs                regulators
1003000.pcie              700008d4.pinmux   70012000.se                          aconnect@702c0000     dvfs_rails          sdhci-tegra.3
1.spdif-dit.1             70006000.serial   70015000.tegra_cec                   arm-pmu               extcon              smmu_test
2.spdif-dit.2             70006040.serial   70019000.iommu                       armv8_pmuv3           gpio-keys           smp-custom-ipi
3.spdif-dit.3             70006200.serial   70019000.mc                          breakpoint            gpu.0               software
4.spdif-dit.4             7000a000.pwm      70019000.memory-controller           bthrot_cdev           gpu-throttle-alert  sound
50000000.host1x           7000c000.i2c      7001b000.external-memory-controller  bwmgr                 hda_pcm_map         system
57000000.gpu              7000c400.i2c      70030000.hda                         cam_i2cmux            hot-surface-alert   tegra-aotag
5.spdif-dit.5             7000c500.i2c      70090000.xusb                        core_dvfs_cdev_cap    leds                tegra-camera-platform
60005000.timer            7000c700.i2c      70098000.mailbox                     core_dvfs_cdev_floor  mods-simple-bus     tegra-carveouts
60006000.clock            7000d000.i2c      7009f000.xusb_padctl                 cpufreq               nvpmodel            tegra_fiq_debugger
60007000.flow-controller  7000d100.i2c      700d0000.xudc                        cpuidle               platform            tegra-supply-tests
6000c000.ahb              7000d400.spi      700e2000.soctherm                    cpu-throttle-alert    pmc-iopower         tegra_udrm
6000c800.actmon           7000d600.spi      700e3000.mipical                     dfll-cdev-cap         power-domain        thermal-fan-est
6000d000.gpio             7000e000.rtc      70110000.clock                       dfll-cdev-floor       psci                timer
60020000.dma              7000e400.pmc      70110000.pwm                         dma_test              pwm-fan             tracepoint
6.spdif-dit.6             7000f800.efuse    72010000.ptm                         dummy-cool-dev        pwm_regulators      virtual
u

Hi,
For Jetson Nano, the nodes are in

/sys/devices/50000000.host1x/54340000.vic/

OK, I’m getting improved results (more fluently view) with these settings:

sudo -i

# Disable runtime suspend of VIC
echo on > /sys/devices/50000000.host1x/54340000.vic/power/control

# Set userspace governor
echo userspace > /sys/devices/50000000.host1x/54340000.vic/devfreq/54340000.vic/governor

# Get frequencies
cat /sys/devices/50000000.host1x/54340000.vic/devfreq/54340000.vic/available_frequencies

The latter order gives these frequencies:

Then…

# Set max frequency
echo 627200000 > /sys/devices/50000000.host1x/54340000.vic/devfreq/54340000.vic/max_freq

# Set target frequency
echo 627200000 > /sys/devices/50000000.host1x/54340000.vic/devfreq/54340000.vic/userspace/set_freq

But… what the hell am I doing here?

The effect is visibly, but what is this doing exactly? And is it permanent or will I have to repeat this sequence after each boot? Does this also have an impact to an “ordinary” USB camera inference?

Interestingly it runs for a minute stuttering like before. Then the fan switches and it all runs very fluently. But starting again, even if the fan is running, does not improve the first 30 secs now :)

Nice effect. That tells me, that the engine is not running full speed from the beginning…

This video demonstrates the effect of a speed boost jumping in at around second 30.

It stutters, but then, when the green bus has passed, it works great.

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