{"id":15569269,"url":"https://github.com/ssokolow/update_nvidia","last_synced_at":"2026-04-16T20:36:01.265Z","repository":{"id":66916884,"uuid":"532260631","full_name":"ssokolow/update_nvidia","owner":"ssokolow","description":"Helper to defer updates of nVidia binary drivers on APT-based Linux distros until the next reboot to keep libGL and the kernel module in sync","archived":false,"fork":false,"pushed_at":"2024-09-03T09:05:33.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T09:29:01.849Z","etag":null,"topics":["apt","apt-get","defer","helper","kubuntu","nvidia","nvidia-driver","nvidia-drivers","ubuntu","update","utilities","utility","utility-application"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssokolow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.apache2","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-03T12:57:33.000Z","updated_at":"2024-09-03T09:05:31.000Z","dependencies_parsed_at":"2024-02-08T22:59:00.290Z","dependency_job_id":null,"html_url":"https://github.com/ssokolow/update_nvidia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Fupdate_nvidia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Fupdate_nvidia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Fupdate_nvidia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Fupdate_nvidia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssokolow","download_url":"https://codeload.github.com/ssokolow/update_nvidia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235053824,"owners_count":18928440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apt","apt-get","defer","helper","kubuntu","nvidia","nvidia-driver","nvidia-drivers","ubuntu","update","utilities","utility","utility-application"],"created_at":"2024-10-02T17:24:39.018Z","updated_at":"2025-10-03T00:31:00.745Z","avatar_url":"https://github.com/ssokolow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Purpose\n\nnVidia binary driver updates on Debian-family Linux systems cause GPU\nacceleration to break whenever they temporarily force the kernel module and\nlibGL versions out of sync.\n\nThis helper fixes that.\n\n## Approach\n\nRun it as part of your startup tasks before X.org starts and it'll do the\nfollowing:\n\n1. Use `apt-mark unhold` to enable updates of packages with \"nvidia\" in their\n   name.\n2. Use `apt-get update` and `apt-get dist-upgrade` to apply any pending updates.\n3. Reload the kernel modules in case they got updated.\n4. Use `apt-mark hold` to prevent your usual update process from updating\n   packages with \"nvidia\" in their name during normal operation.\n\nThis is handled as part of system startup rather than shutdown for two reasons:\n\n1. It avoids needing to try to find a way to special-case \"UPS-initiated\n   shutdown\".\n2. It still works the same if you're one of those people who only ever reboots\n   when your computer suffers a power outage without a working UPS.\n\nAs something that must run as `root` and isn't exactly practical to sandbox due\nto how it interacts with apt-get, I chose to write it with no dependencies\nbeyond the Rust standard library and the system APT binaries for maximum\nprotection against supply-chain attacks.\n\n# Installation and Dependencies\n\nThis is basically a self itch-scratch that I posted in case it helps anyone\nelse, so you'll need a working [Rust toolchain](https://www.rust-lang.org/) to\nbuild this.\n\n(Technically, as of this writing, there _is_ a pre-built binary in\n[ssokolow/profile](http://github.com/ssokolow/profile) at\n`files/usr/local/sbin/update_nvidia` which, as a musl-libc static build, should\nwork on any x86_64 Linux platform, but I make **absolutely** no guarantees about\nit and may forget to update this message if it moves. It's just something I\nbuilt for my own use.)\n\nIt depends on having an APT-based distro and has only been tested on Kubuntu\nLinux 20.04 with Rust 1.63.0, but, at its simplest, it should just be a matter\nof:\n\n```sh\n    cargo build --release\n    sudo cp target/release/update_nvidia /usr/local/sbin/update_nvidia\n    sudo cp update_nvidia.service /etc/systemd/system/update_nvidia.service\n    sudo systemctl enable update_nvidia.service\n    sudo ./update_nvidia --mark-only\n```\n\nThere _is_ a [`justfile`](https://github.com/casey/just/) with an `install`\ntask, but it's optimized for my own use-case, so, if you want to use\n`just install`, you'll need to do two things:\n\n1. `rustup target install x86_64-unknown-linux-musl` so it can build a binary\n   that has no external dependencies beyond the Linux kernel ABI.\n2. Delete the two `cp` lines that update the copy in my \"set up a new system\"\n   ansible scripting under `~/.profile_repo`.\n\nFor security, it hard-codes all the paths to the APT binaries it uses. You can\nsee the paths it expects in its `-h`/`--help` output and, if you need to change\nthem, they're just some `const` strings at the top of `src/main.rs`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssokolow%2Fupdate_nvidia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssokolow%2Fupdate_nvidia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssokolow%2Fupdate_nvidia/lists"}