【服务器管理】Ubuntu18.04的驱动nvidia驱动升级为450版本后,ssh速度很慢的解决方案


笔者最近发现,Ubuntu18.04的nvidia驱动自动升级为450版本之后,ssh连接速度和显卡跑代码的速度都很慢。

偶然测试发现,把nvidia驱动回退到440版本后,就恢复正常了,现记录如下:

首先卸载旧驱动

sudo apt-get --purge remove nvidia*
sudo apt autoremove

重启,使得所有nvidia残余进程被杀掉,否则无法安装

sudo shutdown -r now

下载驱动(实验证明440.100版本驱动对18.04十分适合)

wget https://cn.download.nvidia.com/XFree86/Linux-x86_64/440.100/NVIDIA-Linux-x86_64-440.100.run

给run文件加权限

sudo chmod a+x NVIDIA-Linux-x86_64-440.100.run

安装驱动

sudo ./NVIDIA-Linux-x86_64-440.100.run -no-x-check -no-nouveau-check -no-opengl-files

安装过程:

The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。
Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 选择 No 继续。
Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 选择No

重启

sudo shutdown -r now

提升nvidia-smi运行速度

sudo /usr/bin/nvidia-persistenced --verbose

直接把该命令放到开机自动运行

echo "/usr/bin/nvidia-persistenced --verbose" | sudo tee -a /etc/init.d/rc.local

另外一种加速方法

sudo nvidia-smi -pm 1

设置持久模式:0/DISABLED,1/ENABLED

测试安装结果

nvidia-smi

最终,ssh连接速度由很慢的30秒恢复到几秒,nvidia-smi也瞬间弹出结果,运行代码也恢复正常!

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YirongChen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值