feat(nvidia): add service to sync Flatpak driver version#133
Closed
ledif wants to merge 3 commits intoget-aurora-dev:mainfrom
Closed
feat(nvidia): add service to sync Flatpak driver version#133ledif wants to merge 3 commits intoget-aurora-dev:mainfrom
ledif wants to merge 3 commits intoget-aurora-dev:mainfrom
Conversation
renner0e
reviewed
Apr 1, 2026
|
|
||
| set -euo pipefail | ||
|
|
||
| SYSTEM_NVIDIA_VERSION=$(cat /proc/driver/nvidia/version | grep -oP 'Kernel Module\s+\K[0-9]+\.[0-9]+\.[0-9]+') |
Collaborator
There was a problem hiding this comment.
Sorry for the bikeshed but we can probably skip the cat here
Author
There was a problem hiding this comment.
Actually, this was broken. I had to change it to use head -1 instead and fix the regex.
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) But the grep was failing to match the version correctly:
❯ sudo bash -x /usr/local/bin/TEST-ublue-nvidia-flatpak-runtime-sync check
+ set -euo pipefail
++ grep -oP 'Kernel Module\s+\K[0-9]+\.[0-9]+\.[0-9]+' /proc/driver/nvidia/version
+ SYSTEM_NVIDIA_VERSION=After updating the regex:
❯ sudo bash -x /usr/local/bin/TEST-ublue-nvidia-flatpak-runtime-sync check
+ set -euo pipefail
++ head -1 /proc/driver/nvidia/version
++ grep -oP '\d+\.\d+\.\d+'
+ SYSTEM_NVIDIA_VERSION=595.58.03
++ echo 595.58.03
++ tr . -
+ FLATPAK_NVIDIA_VERSION=595-58-03
+ case "${1}" in
+ flatpak info --system org.freedesktop.Platform.GL.nvidia-595-58-03
+ flatpak info --system org.freedesktop.Platform.GL32.nvidia-595-58-03
+ echo 'NVIDIA Flatpak runtime 595.58.03 already installed'
NVIDIA Flatpak runtime 595.58.03 already installed
+ exit 1
Collaborator
|
I can't test this because I don't have the hardware but if it works we might want to put this in bluefin common |
Author
|
Closing in favor of projectbluefin/common#257. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.