ubuntu系统更新后分辨率变低的问题之一

(前提:原因为内核不完整)

在一次ubuntu系统更新后,显示分辨率突然变低,在系统设置-显示器中分辨率选项仅有1080*960,在软件和更新中发现原有的自己安装的显卡驱动已经不在使用,系统选为默认的驱动。

首先以为是显卡驱动版本的问题,于是反复尝试安装各个版本的驱动。安装的方法可为软件和更新中自动安装,或通过以下过程安装:

# 查看可用驱动版本
$ ubuntu-drivers devices
# 自动安装推荐的驱动版本
$ sudo ubuntu-drivers autoinstall
# 手动安装
$ sudo apt install nvidia-xxx

安装后重启(可用reboot命令),重启后通过以下命令检查完整性:

$ nvidia-smi

得到了以下报错:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

试图通过

nvcc -V

来确认驱动版本,得到报错“命令nvcc未发现”,并建议“sudo apt install nvidia-toolkit”,安装后nvcc可用,但nvidia-smi依旧无效。

最后尝试通过安装包安装驱动,在https://www.nvidia.cn/Download/index.aspx?lang=cn中选择自己机器的显卡,得到对应版本的驱动并安装,重启后在bios中的security中找到security boot选项卡并关闭,在驱动安装包的目录下运行:

sudo bash NVIDIA-Linux-x86_64-525.85.05.run

返回如下报错:

ERROR:Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured on Red Hat Linux system, for exzmple ,be sure you have the 'kernel-source' or 'kernel-devel' RPM installed .If you know the correct kernel source files are installed ,you may specify the kernel source path with the '--kernel-source-path' command line option.

在网上找到数种解决方法,未成功的罗列如下:

  • 自动补全

yum install kernel-devel kernel-headers -y
  • 在网上下载包

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300_4.13.0-041300.201709031731_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-image-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb

最后通过以下代码解决问题:

# 查看自己内核的版本
uname -r
# 下载对应版本的内核源
sudo apt install linux-headers-xxx

安装成功之后再次使用:

sudo bash NVIDIA-Linux-x86_64-525.85.05.run

发现在搭建内核树之后即停止后续安装,显示器自动黑屏后锁屏,此时分辨率已恢复正常;输入密码进入后一切正常,系统设置-显示器中已有分辨率列表可选,nvidia-sim显示正常。

  • 8
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值