首页 > 系统相关 >Ubuntu 环境下NVIDIA 驱动重启后驱动失效

Ubuntu 环境下NVIDIA 驱动重启后驱动失效

时间:2024-08-28 18:04:13浏览次数:5  
标签:upgrades kernel sudo image NVIDIA Ubuntu linux 驱动 unattended

NVIDIA 驱动重启后驱动失效,还原系统恢复,重启后继续失效。

估计是系统更新了内核,这可能会导致与已安装的 NVIDIA 驱动不兼容,从而导致驱动失效。

 

解决办法禁止自动更新内核:

To prevent your Ubuntu system from automatically updating the kernel, you can follow these steps:

1. Mark the Kernel Package as "Hold"

This method stops the package manager from updating the kernel automatically.

Steps:

    1. Open a terminal.
    2. Identify your current kernel package: dpkg --list | grep linux-image
    3. Mark the current kernel packages to hold them: sudo apt-mark hold linux-image-<version> sudo apt-mark hold linux-headers-<version> Replace <version> with the version number of your installed kernel.

2. Disable Unattended Upgrades for the Kernel

You can prevent unattended-upgrades from automatically updating the kernel.

Steps:

    1. Open the unattended-upgrades configuration file:   sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
    2. Find the line that starts with Unattended-Upgrade::Package-Blacklist {.
    3. Add the following lines to blacklist kernel packages:   "linux-image"; "linux-headers";
    4. Save the file and exit.

3. Use Synaptic Package Manager (Graphical)

If you prefer a graphical interface, you can lock the kernel version using Synaptic Package Manager.

Steps:

    1. Install Synaptic if it's not already installed:   sudo apt-get install synaptic
    2. Open Synaptic Package Manager.
    3. Search for linux-image and linux-headers.
    4. Right-click on the relevant packages and select Lock Version.

4. Disable Automatic Updates Completely

You can disable automatic updates for all packages, including the kernel, by disabling the unattended-upgrades service.

Steps:

    1. Disable the unattended-upgrades service:   sudo systemctl disable unattended-upgrades
    2. Stop the service if it’s currently running:   sudo systemctl stop unattended-upgrades

确认已经禁止

 

1. Check the Status of Held Packages

You can verify if the kernel packages are on hold by using the following command:

bash dpkg --get-selections | grep linux-image

This will list all the kernel packages. If the package is marked as "hold," it will show up with the status hold next to it. For example:

arduino linux-image-5.15.0-46-generic hold

If your kernel packages are listed as hold, it means they won’t be automatically updated.

2. Review Unattended Upgrades Configuration

Ensure that the unattended upgrades configuration file is set correctly:

    1. Open the configuration file: bash sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
    2. Check that the kernel packages (linux-image and linux-headers) are included in the blacklist section like this: bash Unattended-Upgrade::Package-Blacklist { "linux-image"; "linux-headers"; };
    3. If this section is present and configured correctly, kernel updates should be blocked during unattended upgrades.

3. Check Synaptic Package Manager Settings

If you used the Synaptic Package Manager to lock the kernel version, you can:

    1. Open Synaptic Package Manager.
    2. Search for linux-image and linux-headers.
    3. Right-click on the package and ensure that "Lock Version" is checked. This confirms that the package is locked and won't be updated automatically.

4. Check the Status of Unattended-Upgrades Service

If you have disabled the unattended-upgrades service, verify that it is no longer active:

    1. Check the status of the service: bash sudo systemctl status unattended-upgrades
    2. The output should indicate that the service is inactive (dead) if you have successfully disabled it. Look for something like this: yaml ● unattended-upgrades.service - Unattended Upgrades Shutdown Loaded: loaded (/lib/systemd/system/unattended-upgrades.service; disabled; vendor preset: enabled) Active: inactive (dead)

 取消自动更新

Steps to Cancel the Hold on Kernel Packages:

    1. Open a Terminal: Make sure you're logged in to your system with sudo privileges.

    2. Remove the Hold Status: Use the following commands to unhold the kernel packages:

      bash sudo apt-mark unhold linux-image-5.15.0-43-generic sudo apt-mark unhold linux-image-6.5.0-41-generic sudo apt-mark unhold linux-image-generic-hwe-22.04
    3. Verify the Changes: After unholding the packages, you can check their status again:

      bash dpkg --get-selections | grep linux-image

 

标签:upgrades,kernel,sudo,image,NVIDIA,Ubuntu,linux,驱动,unattended
From: https://www.cnblogs.com/zhoushusheng/p/18385272

相关文章

  • ubuntu20.04内核重新编译(5.15.x)
    一、源码获取方法1:gitclonegit://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal方法2:#apt-cachesearchlinux-sourcelinux-source-LinuxkernelsourcewithUbuntupatcheslinux-source-5.4.0-Linuxkernelsourceforversion5.4.0with......
  • 基于Ubuntu部署企业级kubernetes集群---k8s集群容器运行时Containerd准备
    1.Containerd部署文件获取1.下载 Containerd文件wgethttps://github.com/containerd/containerd/releases/download/v1.7.21/cri-containerd-1.7.21-linux-amd64.tar.gz2.查看下载的文件 3.解压到当前文件到根目录下tarxfcri-containerd-1.7.21-linux-amd64.tar.g......
  • Linux APP查询驱动的方式归类总
    LinuxAPP查询驱动的方式归类总前言一、具体方式是什么?1、休眠与唤醒2、阻塞与非阻塞3、POLL机制4、异步通知tips:等待队列用于进程等待条件,工作队列用于异步任务处理。二、使用步骤休眠与唤醒tips:在中断处理函数中,不能休眠,也就不能调用会导致休眠的函数。上半......
  • linux总线设备驱动模型
    linux总线设备驱动模型platform平台驱动模型linux自带I2C、SPI、USB等总线。但是在SOC中有些外设是没有总线这个概念的,但是又要使用总线、驱动和设备模型该怎么办呢?为了解决此问题,Linux提出了platform这个虚拟总线,相应的就有platform_driver和platform_devi......
  • 安卓驱动开发中的设备树
    安卓驱动开发中的设备树在安卓驱动开发领域,设备树(DeviceTree)是一个至关重要的概念和技术。设备树是一种描述硬件配置的数据结构,它为操作系统提供了一种标准化的方法来描述和管理硬件资源。本文将深入探讨设备树在安卓驱动开发中的重要性、工作原理以及实际应用。一、设备树......
  • 浪潮5468M7,英伟达4090,安装ubuntu18.04 使用ubuntu做运算
    浪潮5468M7,配置6块英伟达4090使用ubuntu做运算1.制作安装镜像,使用ventoy刻录U盘,下载ubuntu18.04,直接拷贝进入镜像装系统方法此处省略,参见官方技术网站,浪潮信息技术网–360°专家服务(4008600011.com)2.机器制作raid,此处步骤省略,默认启动模式为UEFI。riad制作参见浪潮400......
  • 使用schroot在Ubuntu 22.04中安装“Ubuntu 16.04子系统
    新的高通SDK需要较新的Ubuntu版本,但老的高通SDK却不兼容,因为Ubuntu22.04的rootfs环境与16.04差异巨大,导致SDK中部分项目在编译时由于依赖不兼容导致编译出错。同时又因为服务器硬件升级导致安装旧版本的Ubuntu系统时,部分硬件由于驱动问题得不到支持,不得不将系统升级到新版本的Ubu......
  • 基于Ubuntu部署企业级kubernetes集群
    1.主机名配置由于本次使用3台主机完成kubernetes集群部署,其中1台为master节点,名称为k8s-master01;其中2台为workoer节点,名称分别为:k8s-worker01及k8s-worker02master节点hostnamectlset-hostnamek8s-master01Worker01节点hostnamectlset-hostnamek8s-worker01Work......
  • 领域驱动模型设计与微服务架构落地(四)之DDD分层架构设计
    那么聊完领域模型之后,其实我们会发现,接下来,很多的程序员可能就会直接上代码,因为很多的程序员觉得这个你的战略设计跟我们落地的代码没有关系。哪怕你可能说得天花乱坠,可是做为底层的开发人员,我只关心手头上的功能有没有实现,实现完成之后有没有BUG。那么我们该如何对于我们的系......
  • ubuntu环境下部署LNMP集成环境超详细图文教程
    ubuntu系统下安装LNMP集成环境一、Nginx安装二、安装及配置MySQL数据库修改密码三、安装PHP四、配置Nginx服务​编辑五、配置PHP 本文使用的Ubuntu版本为20.04。php开发中集成环境的安装是必不可少的技能。而LNMP代表的是:Linux系统下Nginx+MySQL+PHP这种网站服务器......