feat(nvidia): add service to sync Flatpak driver version#257
feat(nvidia): add service to sync Flatpak driver version#257renner0e merged 6 commits intoprojectbluefin:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a systemd service and a helper script to synchronize NVIDIA system drivers with Flatpak runtimes. The feedback highlights the need for a more robust version detection regex, explicit system-wide installation flags for Flatpak, and the addition of retry logic and timeout extensions in the systemd service to better handle network-dependent tasks.
system_files/nvidia/usr/libexec/ublue-nvidia-flatpak-runtime-sync
Outdated
Show resolved
Hide resolved
system_files/nvidia/usr/libexec/ublue-nvidia-flatpak-runtime-sync
Outdated
Show resolved
Hide resolved
system_files/nvidia/usr/lib/systemd/system/ublue-nvidia-flatpak-runtime-sync.service
Show resolved
Hide resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
system_files/nvidia/usr/lib/systemd/system/ublue-nvidia-flatpak-runtime-sync.service
Outdated
Show resolved
Hide resolved
renner0e
left a comment
There was a problem hiding this comment.
I find them annoying to deal with but we should probably also check this for --user flatpaks, would be nice if we could reuse this script here for those as well, but it's a little more tricky to figure that out.
I agree we should tackle user Flatpaks at some point, but let's stick to just the system ones for this PR. |
|
Related upstream issue: flatpak/flatpak#3907 |
system_files/nvidia/usr/libexec/ublue-nvidia-flatpak-runtime-sync
Outdated
Show resolved
Hide resolved
system_files/nvidia/usr/libexec/ublue-nvidia-flatpak-runtime-sync
Outdated
Show resolved
Hide resolved
Co-authored-by: renner <80410025+renner0e@users.noreply.github.com>
|
Good stuff |
Supersedes get-aurora-dev/common#133.
Tested it on my Bazzite machine which has an NVIDIA card.
○ ublue-nvidia-flatpak-runtime-sync.service - Sync NVIDIA system drivers with Flatpak runtime Loaded: loaded (/etc/systemd/system/ublue-nvidia-flatpak-runtime-sync.service; enabled; preset: disabled) Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: inactive (dead) (Result: exec-condition) since Wed 2026-04-01 09:16:00 CDT; 1s ago Invocation: dedef8b0919a46bca0c115e0bf7a1ae3 Condition: start condition unmet at Wed 2026-04-01 09:16:00 CDT; 1s ago Process: 4341 ExecCondition=/usr/local/bin/TEST-ublue-nvidia-flatpak-runtime-sync check (code=exited, status=1/FAILURE) Mem peak: 1.6M CPU: 5ms Apr 01 09:16:00 llano systemd[1]: Starting ublue-nvidia-flatpak-runtime-sync.service - Sync NVIDIA system drivers with Flatpak runtime... Apr 01 09:16:00 llano systemd[1]: ublue-nvidia-flatpak-runtime-sync.service: Skipped due to 'exec-condition'. Apr 01 09:16:00 llano systemd[1]: Condition check resulted in ublue-nvidia-flatpak-runtime-sync.service - Sync NVIDIA system drivers with Flatpak runtime being skipped.It exited because the Flatpak platform was already in sync with the on image driver version, but it seems like it should work when they are not synced.
This is what the driver reports:
❯ cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 595.58.03 Release Build (builder@dbdfa680a27e) Wed Mar 25 09:03:45 UTC 2026 GCC version: gcc version 15.2.1 20260123 (Red Hat 15.2.1-7) (GCC)This is executing the script with
-x:fixes: ublue-os/aurora#1418