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

相关内容

热门资讯

易点天下启动H股上市前期筹备工... 12月5日晚间,易点天下(301171)公告称,公司董事会授权管理层启动H股上市的前期筹备工作,授权...
“中招”流感该如何应对?专家提... 转自:央视新闻客户端  近期,气温波动幅度大,容易造成人体免疫力低下。今天,国家卫生健康委举行新闻发...
网飞Netflix宣布以827... 转自:中国基金报  12月5日晚间,Netflix(奈飞)宣布收购华纳兄弟探索公司,Netflix将...
香港大埔宏福苑火灾79名伤者全... 据新华社香港12月5日电 香港特区行政长官李家超和特区政府多位局长5日联合召开记者会。其中医务卫生局...
湖南平江通报老年妇女遭家暴:成... 湖南省岳阳市平江县联合处置组12月6日发布情况通报:12月4日11时许,我县公安局接到报警称,一老年...