Jetson AI Fundamentals Course - Swap File Instructions Do Not Work


I’m trying to work through the Jetson AI Fundamentals Course, but I cannot setup my Jetson Nano. The instructions for configuring the swap file resulted in my swap file being 0, instead of doubling the space. I’ve done it twice, with the same result. I’ve read instructions and watched the video, but both are saying the same thing, and neither are working for me. Has anyone else run into this problem?

I’m using a Jetson Nano 4GB and my SD card is 128GB.


Hi @bleedchocolate, what are the commands you ran to allocate and mount your swap file?

Were they like this?

What does tegrastats show for your swap, and what does ls -ll /path/to/your/swapfile.swap show?

Hi Dusty,

Thank you for your response. I checked the git you sent and saw a line they do not include in the course, either in the video or the course notes; everything else was the same though. It was this one:

sudo swapon /mnt/4GB.swap

I ran tegrastats and it showed SWAP 0/4096MB (cached 0MB), which I assume shows the swap is 4GB and it is showing 0 out of it being used.
The line you gave me run showed: -rw------- 1 root root 4294967296. I’m new to NVIDIA and don’t do a whole lot with Linux in general, so I’m not sure what the output means, but I assume this looks ok too?

Thanks so much!

Hi Rick, yep that looks fine - swapon will activate the swap instantly (which appears to be reflected in your tegrastats output), whereas the /etc/fstab entry will make it persist after reboots. Cool robot avatar btw!

Thanks a lot for the explanation…teaching a man to fish! And if you like droids, feel good in the fact that you’ve contributed to this Jetson becoming one :)

I’ve got several Raspberry Pi’s in various states of what I’m aiming to do, but I’m really maxing out what can be done on-board. I’ve been putting off getting into developing with NVIDIA, but I know the Jetson has some of what I’m trying to do already on-board, and the fact it was built to do this stuff is just awesome. It’s the learning curve that was putting me off…but the time has come.

I appreciate you!

That’s awesome! You’ll get up to speed quick. ML & AI are rapidly evolving and the pace can be challenging to keep up with but it’s worthwhile to learn. Good luck with your projects and don’t hesitate to reach out!

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