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

相关内容

热门资讯

市场监管总局推动“你点我检”活... (来源:中国市场监管报)转自:中国市场监管报本报讯 2025年,市场监管总局深入开展食品安全“你点我...
【早盘三分钟】3月19日华宝基... .app-kaihu-qr{text-align: left;padding: 20px 0;}.a...
IPO案例:发行人聘请评估机构... 1问询问题根据申请文件及问询回复:报告期各期发行人常规业务及通用存货报废金额分别为 269.99 万...
电力结构性飙涨!华宝基金电力E...   19日早盘,电力逆市走强,绿电概念表现强势,粤电力A两连板,广安爱众涨停,立新能源、金开新能等多...
大行评级丨里昂:长江基建集团连... 里昂发表研报指,长江基建集团2025年净利润按年增长2%至82.7亿港元,表现稳健并符合市场预期。更...