ubuntu 22.04 安装 RTX 4049 显卡驱动
创始人
2024-05-31 16:33:49

1. 官网下载4090:驱动程序

2. 关闭图形界面

sudo systemctl set-default multi-user.target
sudo reboot

对应的打开图形界面命令为:

sudo systemctl set-default graphical.target
sudo reboot

3. tty登录之后

安装新版驱动:

# 切换到驱动目录
cd /home/user/download/
# 权限
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 驱动:

(1)如果有老版驱动安装包,则运行如下命令:

./NVIDIA-Linux-x86-310.19.run --uninstall
reboot now

(2)没有老版驱动安装包,可以使用如下命令删除 niidia 驱动,并使用 autoremove 清除所有不必要的相关套件:

apt-get purge nvidia*
apt-get autoremove
reboot

或者关闭所有装置,并停止载入 nvidia 驱动:

systemctl isolate multi-user.target
modprobe -r nvidia-drm

成功卸载掉老款驱动后,重新运行下载的驱动安装包,期间可能提示你安装 gcc、make 命令后再安装。

4. 打开图形界面并重启

sudo systemctl set-default graphical.target
sudo reboot

安装后第一次开机时间较长,耐心等待

经验证,更换4090显卡后,基于cuda10.2编译的pytorch已不受支持;

更换为cuda11.6编译的pytorch可正常使用。

conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge

相关内容

热门资讯

带宽公司(BAND)股价飙升:... 带宽公司(BAND)盘中飙升9.31%,股价达71.02美元,创52周新高71.50美元。2026年...
疲劳驾驶认定规则 不涉及网约车... 《机动车驾驶人疲劳驾驶认定规则》6月1日起实施。连日来,“限制网约车司机驾驶时间”等解读在网上流传甚...
Tempus首个全基因组检测或... Tempus首款全基因组测序检测产品xH原计划2025年1月用于研究,现将于明年投入临床应用。今年早...
盈透证券5月日均收入交易笔数激...   炒股就看金麒麟分析师研报,权威,专业,及时,全面,助您挖掘潜力主题机会! 市场将盈透证券归为“...
不,这并非山寨币轮动 本周流传说法称比特币ETF资金流出14.2亿美元,HYPE ETF推动山寨币资金流入,但该说法经不起...