I finally got visual profiler working in fresh Ubuntu 20.04 installation. For helping all other people in similar situation, and for a small request for Nvidia, here are some remarks.
First visual profiler was needing some gtk canberra library. That was fixed by
sudo apt-get install libcanberra-gtk*
maybe I was getting more than enough canberra libraries with that, but in any case I suppose Nvidia could include the installing of the used canberra library into its installation scripts, so that manual installation is not needed…?
The biggest problem was not understanding that visual profiler needs java version 8, and Ubuntu comes with version 11. And due to licensing issues that is not included in the installation script. Error messages were not helpful, either. This requirement is surely mentioned somewhere in Nvidia’s long installation guide, but I would ask that Nvidia would print few lines of a note of this requirement and need for users to install it by themselves somewhere at the end of the cuda installation script output. Printing lines at the terminal is cheap, it likely wouldn’t cost anything. This way all the people notice it immediately and could fix it easily.
In any case, what finally fixed the visual profiler installation was
sudo apt install openjdk-8-jdk
and running it with
nvvp -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java ./myprogram