The easy (and recommended) way is to download the VBIOS from techpowerup.com just make sure the Device Id, Subsystem Id are the same for your card with lspci -vnn and that you donwload the same version as your current one nvidia-smi -q | grep "VBIOS Version". If you download a wrong one you may break your GPU. You have to edit the VBIOS.
nvidia-smi -q | grep "VBIOS Version"
There is many ways of doing this, but the following should work for most people. If you do not understand the following, download the VBIOS from techpowerup, it's easier.
For this method you have to release the GPU from the drivers and unload the drivers.
Download nvflash. Do not install from AUR; the package it's broken.
Unzip it in /root
sudo unzip nvflash_5.414.0_linux.zip -d /root/
Replace nvflash_5.414.0_linux.zip with your version of nvflash.
Execute scripts/iommu.sh to get the BUS ID for the GPU. Looks like 06:00.0.
chmod +x scripts/iommu.sh
IOMMU group 13
06:00.0 VGA compatible controller [...]
Edit scripts/config. You have to add the BUS ID, something like 06:00.0, that says VGA compatible [...] to the config file.
VGA compatible [...]
You can also edit where the VBIOS will be saved VBIOS_EXTRACT_PATH and the path to nvflash if you decide to extract it somewhere else NVFLASH.
Edit your display manager in scripts/extract-vbios-linux.sh. The default (in the config) is lightdm. For example, Gnome uses gdm. Or completily kill X before proceeding.
systemctl stop lightdm
systemctl start lightdm
Close everything and execute the script. This will kill X server and there will be no display output for a couple of seconds.
chmod +x scripts/extract-vbios-nvflash.sh
sudo nohup scripts/extract-vbios-nvflash.sh
The extracted VBIOS will be located in /root/VBIOS.rom.
Edit the VBIOS
It did not work for me, the extracted VBIOS was 59KiB and it should be around 162KiB. It may work for you.
You can also edit where the VBIOS will be saved VBIOS_EXTRACT_PATH.
chmod +x scripts/extract-vbios-linux.sh
sudo nohup scripts/extract-vbios-linux.sh
The extracted ROM will be located in /root/VBIOS.rom.