Linux new kernel 6.5.0-14(ubuntu 22.04) can not compile NVIDIA display card driver

i can now choose the version of gcc to use for compilation (from ubuntu forum) :
it prioritize gcc-12 over gcc-11

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --config gcc
(select gcc-12 here)

before compiling i purged all nvidia files with :

sudo apt autoremove nvidia* --purge

then manually compilie/intall with :

sudo apt install nvidia-driver-390

as expected no dice, same error :(
then tried (after purging again)

sudo apt install nvidia-driver-418

which fetches nvidia-dkms-470 … driver stuff. It compiled fine but refused to install at reboot saying that 470 driver will ignore my card, i need the nvidia-390 driver !