Steam asks for some other NVIDIA drivers, and games freeze/crash [closed]

I recently installed steam on my Kubuntu 20.04 LTS machine using the .deb from their website, and on launch, it opens a terminal asking me to install other Nvidia drivers.

I run Nvidia-driver-470 proprietary drivers on my 1660ti. (also tried nvidia-driver-495)
Other specs in my PC are:
i7 8700
16GB ram

here is a screenshot of the terminal steam opens on startup:

terminal screenshot

I press Enter after the 1st prompt, and it asks for the root password, then prints out what is seen in picture 1. After the second prompt pressing Enter closes the terminal window and opens steam immediately. It does this for every startup.

I have tried:

sudo apt-get remove --purge steam steam-launcher
rm -rf ~/.local/share/Steam && rm -rf ~/.steam
sudo apt clean && sudo apt -f install

Installing steam after that fixes nothing.

The worst of all is, most of the games don't even work. They either freeze or crash at startup or midway. And it is not only the games that use Proton (i use 6.3), games like Portal 2, which run natively I believe also crash.

I have googled and found no solutions so please help.

The output of sudo ubuntu-drivers devices

output of sudo ubuntu-drivers devices

apt list --installed | grep libnvidia                                                                                               [3:59:44]

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libnvidia-cfg1-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-common-470/unknown,now 470.82.01-0ubuntu1 all [installed,automatic]
libnvidia-compute-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-decode-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-encode-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-extra-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-fbc1-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-gl-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]
libnvidia-ifr1-470/unknown,now 470.82.01-0ubuntu1 amd64 [installed,automatic]

sudo ubuntu-drivers autoinstall                                                                                                     [4:18:44]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-modules-nvidia-495-generic-hwe-20.04 : Depends: linux-modules-nvidia-495-5.11.0-43-generic (= 5.11.0-43.47~20.04.2) but it is not going to be installed
                                              Depends: nvidia-kernel-common-495 (>= 495.44) but 495.29.05-0ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

all ppas connected to nvidia

/etc/apt/sources.list:deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /
/etc/apt/sources.list:# deb-src https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /

all ppas connected to steam

/etc/apt/sources.list.d/steam.list:deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam
/etc/apt/sources.list.d/steam.list:deb-src [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam
/etc/apt/sources.list.d/steam.list:
/etc/apt/sources.list.d/steam.list:# Uncomment these lines to try the beta version of the Steam launcher
/etc/apt/sources.list.d/steam.list:#deb [arch=amd64,i386] https://repo.steampowered.com/steam/ beta steam
/etc/apt/sources.list.d/steam.list:#deb-src [arch=amd64,i386] https://repo.steampowered.com/steam/ beta steam

Thanks in advance, and if there is any more info you need, post a comment and I'll edit the question


You have learned that you cannot randomly throw packages/libraries together from different sources and expect things to work. Nvidia drivers (either 470 or 495) and steam packages are available from the standard repos (restricted, multiverse) -- use them. CUDA does offer a .run file for installation which allows you to put libraries and executables into your own directories instead of system areas (avoids the crazy dependencies of trying the deb installation route or polluting system areas with wrong versions of things). Skip any offer of an Nvidia driver, you got a working one from the standard repos.

how to install cuda

cuda location selection

Clean out all the unnecessary steam and cuda, and who knows what else from your repositories. Ensure the multiverse and restricted selections are made from the Software and Updates/sources tab, then update your package info with sudo apt-get update then just install the desired cuda drivers and steam. The steam package may need the 32 bit libraries, but you probably got those already. The only steam packages I have are steam:i386, steam-installer, and steam-devices, and steam games run fine.