jetson agx xavier hack

Some of my experiences I got playing with Jetson Xavier.

  1. I got lots of trouble to start with trying to flash Jetson. It ended up that I simply needed to remove the tlp package at the host. The log from sdkmanager is simply not very helpful. Otherwise, it should have saved me lots of time figuring this out. Eventually, I found the problem immediately as I tried to use jetsonhack instead as it gave an error of “Reading ECID“.
  2. I flashed to nvme with jetsonhack without much problem. I was thinking that I should start with something official (flash to microSD) before trying something more advance. Wrong decision! It ended up wasting me at least several days. As mentioned above, I wouldn’t have any issue flashing if I started with jetsonhack right from the start.
    1. I didn’t even have the problem getting into oem-config for my agx xavier as described on the jetsonhack page. But I couldn’t reboot afterward (problem connecting webcam as described below) and so I thought it was the problem of default user. So I tried again with sudo ./tools/l4t_create_default_user.sh -u ubuntu -p ubuntu (find the tools folder from what you downloaded). The default user works as well but it is not recommended as I won’t have an opportunity to resize the partition of my nvme. 
  3. I tried to connect a webcam and couldn’t reboot afterward. I thought it was a problem of the default user as mentioned above. It turns out that it seems not all USB port works for a webcam. My problem was solved after connecting to a regular USB port rather than USB-C with an adapter. I did re-flash with a default user. But it didn’t allow my to repartition my nvme and so I flash again without a default user. It is not clear how I could undo l4t_create_default_user and so I simply redownload the jetson files. 
  4. Webcam has very low frame rate with OpenCV somehow. But a gstreamer hack works well. Instead of setting cap = cv2.VideoCapture(0) as usual, use cap = cv2.VideoCapture(“v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=640, height=480, framerate=30/1 ! videoconvert ! video/x-raw, format=BGR ! appsink”, cv2.CAP_GSTREAMER) instead as described here.
  5. I would suggest to install barrier. Assuming that someone probably using the jetson besides another machine.

Using jetsonhack to flash to nvme works well for me. But it doesn’t seem to install pytorch by default. Will try to figure it out next. And Jetson comes with Python 3.6, which is really too old. Next, I will see if Python 3.8 will work.

Leave a Reply

Your email address will not be published. Required fields are marked *