1. 官網(wǎng)下載4090:驅(qū)動程序
2. 關(guān)閉圖形界面
sudo systemctl set-default multi-user.target
sudo reboot
對應(yīng)的打開圖形界面命令為:
sudo systemctl set-default graphical.target
sudo reboot
3. tty登錄之后
安裝新版驅(qū)動:
# 切換到驅(qū)動目錄
cd /home/user/download/
# 權(quán)限
sudo chmod a+x NVIDIA-Linux-x86_64-520.56.06.run
# 安裝
sudo ./NVIDIA-Linux-x86_64-520.56.06.run
如果報錯,信息如下:
ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel. ?This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA ? ? ??
? ? ? ? ?Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading. ?Please be sure to exit any programs that may be using the GPU(s) ??
? ? ? ? ?before attempting to upgrade your driver. ?If no GPU-based programs are running, you know that your kernel supports module unloading, and you still receive this message, then an ? ??
? ? ? ? ?error may have occurred that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to reboot your computer.
則需要卸載老版 nvidia 驅(qū)動:
(1)如果有老版驅(qū)動安裝包,則運行如下命令:
./NVIDIA-Linux-x86-310.19.run --uninstall
reboot now
(2)沒有老版驅(qū)動安裝包,可以使用如下命令刪除 niidia 驅(qū)動,并使用 autoremove 清除所有不必要的相關(guān)套件:
apt-get purge nvidia*
apt-get autoremove
reboot
或者關(guān)閉所有裝置,并停止載入 nvidia 驅(qū)動:
systemctl isolate multi-user.target
modprobe -r nvidia-drm
成功卸載掉老款驅(qū)動后,重新運行下載的驅(qū)動安裝包,期間可能提示你安裝 gcc、make 命令后再安裝。
4. 打開圖形界面并重啟
sudo systemctl set-default graphical.target
sudo reboot
安裝后第一次開機(jī)時間較長,耐心等待
經(jīng)驗證,更換4090顯卡后,基于cuda10.2編譯的pytorch已不受支持;
更換為cuda11.6編譯的pytorch可正常使用。
conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge
5. 安裝 cuda +? cudnn,參考:
CentOS7 安裝Nvidia Tesla T4驅(qū)動 CUDA CUDNN,The third-party dynamic library (libcudnn.so) that Paddle,_centos7安裝t4驅(qū)動_愚昧之山絕望之谷開悟之坡的博客-CSDN博客
使用.deb安裝cudnn8.6.0_weixin_44011046的博客-CSDN博客?文章來源:http://www.zghlxwxcb.cn/news/detail-448439.html
Ubuntu20.04安裝cuDNN(包括WSL)_cudnn安裝 ubuntu_lconghe的博客-CSDN博客?文章來源地址http://www.zghlxwxcb.cn/news/detail-448439.html
到了這里,關(guān)于ubuntu 22.04 安裝 RTX 4090 顯卡驅(qū)動的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!