Help with hardware (CUDA)

I think I may have got sorted. I have done a full fresh install. I still managed to run into a couple of hiccups but nothing too brain taxing.
I tried to copy all the commands and steps as I took them for future ref.

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub                                                                           
 sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda.list'                                                       
 sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda_learn.list'                                     
 sudo apt update                                                                                                                                                                                 
 sudo apt install cuda-drivers                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                 
 wget https://www.sonarnerd.net/src/focal/libgmpris_2.2.1-8_amd64.deb                                                                                                                            
 sudo dpkg -i libgmpris_2.2.1-8_amd64.deb                                                                                                                                                        
                                                                                                                                                                                                 
 sudo usermod -a -G video $LOGNAME                                                                                                                                                               
 echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf                                                                                                                                       
 echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf                                                                                                                                       
 echo 'EXTRA_GROUPS=render' | sudo tee -a /etc/adduser.conf                                                                                                                                      
 sudo apt update                                                                                                                                                                                 
 sudo apt dist-upgrade                                                                                                                                                                           
 sudo apt install libnuma-dev                                                                                                                                                                    
 sudo reboot                                                                                                                                                                                     
                                                                                                                                                                                                 
 sudo apt install wget gnupg2                                                                                                                                                                    
 wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -                                                                                                                     
 echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list                                                                       
 sudo apt update                                                                                                                                                                                 
                                                                                                                                                                                                 
 wget https://www.signalyst.eu/bins/hqplayerd/focal/hqplayerd_4.25.2-86amd_amd64.deb                                                                                                             
 sudo dpkg -i hqplayerd_4.25.2-86amd_amd64.deb                                                                                                                                                   
 sudo apt install -f                                                                                                                                                                             
 sudo echo "/opt/rocm/lib" >/etc/ld.so.conf.d/rocm.conf                                                                                                                                          
 sudo ldconfig                                                                                                                                                                                   

After the cuda-drivers install xorg was still installed. This command prevents the server from going to sleep
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

This process did still install xserver when installing the cuda drivers, I found a command afterwards which may fix this sudo apt-get install --no-install-recommends cuda-drivers

Also for some odd reason the soundcard wouldn’t show up on alsa? To fix this I ran these commands:

sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
sudo apt-get install linux-sound-base alsa-base alsa-utils

And a look at what nvidia-smi looks like with a track playing through roon → HQPlayer:
image
And my signal path looks like this:
image
All playing with no glitches.
But I am still not happy lol. I’m not completely convinced I am using the full potential of cuda?

I will be doing another fresh install using the command sudo apt-get install --no-install-recommends cuda-drivers to see if it installs without all the xorg guff. But will also want to absolutely happy i’m using the full potential of the GFX card.

My mission continues.