see this Facing the below errors while building the kernel for Javier NX module - #21 by ayyappan.rathinam thread.
One of nvidia employee mentioned that it wont work as expected in ubuntu 22.04. I believe all nvidia guys are using ubuntu 18.04
YEs. I am using VM always. and nvidia is recommending dual os. I mean ubuntu 18.04