gr-fosphor Installation for NVidia GPUs

In case you didn’t know, we maintain a set of GNU Radio-related install scripts at:
https://github.com/paulgclark/grc-install

All of these scripts build from source and install the resulting libraries and executables to a local target directory. One of the popular out-of-tree (OOT) add-ons to GNU Radio is fosphor. It’s a really neat visualization tool that allows you to much better see what’s going on in the frequency domain. It essentially combines a frequency plot with a waterfall plot. It’s an invaluable tool for exploring the RF spectrum.

In this example, you’re looking at an LTE channel in the center of the plot, and you can actually make out some of the traffic running through the frequency and time multiplexing. Note the increased detail relative to a simple frequency plot of the same swath of spectrum:

Great stuff, right? There’s just one catch to all this – foshpor relies on OpenCL, which usually relies on your system’s GPU. This makes installing gr-fosphor a little more complicated than your typical OOT module. We’ve had an install script available for Intel GPUs for a while, but our Nvidia GPU script was less well tested. Well, we’ve finally had an opportunity to do that testing and update the install script, so if you’ve got an NVidia-based Ubuntu 20.04 system, I encourage to to check it out!

Install Instructions

Get git and our GitHub repo:

sudo apt install -y git
mkdir ~/install
cd ~/install
git clone https://github.com/paulgclark/grc-install

Install GNU Radio from source (this takes 15-30 minutes depending on your system):

cd ~/install/grc-install/install_scripts
sudo ./grc_from_source.sh

Open a new terminal window (THIS IS IMPORTANT! You need the environment variables the script above creates to proceed) and install gr-fosphor:

cd ~/install/grc-install/install_scripts/fosphor
sudo -E ./fosphor_nvidia_gpu.sh

At this point, you can test that fosphor was correctly installed by plugging in your Ettus B2XX SDR (if you have one) and executing the following flowgraph:

gnuradio-companion ~/install/grc-install/grc/fosphor/fosphor-example.grc

(when the execution window comes up, you may need to stretch it to increase the window size to reveal the fosphor visualization)

If you have a different SDR, you’ll need to install support for that and swap out the USRP Source in the flowgraph for the appropriate SDR source (we do have install scripts for HackRF, Lime and Pluto as well).

If you have the latest NVidia drivers, fosphor should work. If however, you encounter an error, it is likely caused by an older GPU driver version. You can check and fix this by hitting the “Windows” key and typing “additional drivers”

Then click on the Additional Drivers icon. You should then see the driver options for your GPU:

If you don’t have the latest driver version selected (460 in the case of the image above), then select the latest version, apply changes and reboot.

If this helps, please let us know in the comments below. Good luck!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.