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

相关内容

热门资讯

尚玉良看望慰问一线教师 (来源:河津融媒)尚玉良看望慰问一线教师9月10日是第四十二个教师节,运城市政府党组成员、副市长,河...
国网2026前4避雷器9亿12... (来源:电能革新)国家电网有限公司2026年输变电项目第四次变电设备(含电缆)公开招标采购(招标编号...
从工业节能到楼宇智控!中企自主... 近日,格力电器等企业自主研发的“大温升冷热联供螺杆式复叠高温热泵”“中温水高效空调系统关键技术及应用...
我县召开农村道路交通安全风险分... (来源:昔阳融媒)为扎实推进农村交通安全综合治理,切实筑牢农村道路交通安全防线,我县召开农村道路交通...
缙云开展教师节慰问活动 在第42个教师节到来之际,王益、赵建铭、付勇斐、朱剑成等县领导分赴部分学校开展教师节慰问活动,向广大...