Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

fix(just): toggle-nvk now supports nvidia-open #356

Merged
merged 4 commits into from
Feb 19, 2025

Conversation

ledif
Copy link
Collaborator

@ledif ledif commented Feb 1, 2025

Fixes ublue-os/aurora#157.

Before

Image Name Rebase Target Is Valid Target
aurora-dx-nvidia aurora-dx
aurora-dx aurora-dx-nvidia
aurora-dx-nvidia-open aurora-dx-open

After

Image Name Rebase Target Is Valid Target
aurora-dx-nvidia aurora-dx
aurora-dx aurora-dx-nvidia-open
aurora-dx-nvidia-open aurora-dx

HikariKnight
HikariKnight previously approved these changes Feb 7, 2025
@HikariKnight
Copy link
Member

Thanks for this, when the toggle-nvk recipe was made, nvidia-open was like a year away from existing

Copy link
Member

@m2Giles m2Giles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does mean that it won't rebase back to non-open Nvidia drivers.

@HikariKnight HikariKnight dismissed their stale review February 9, 2025 14:31

possibly add nvidia-legacy-hardware check from bazzite

@HikariKnight
Copy link
Member

HikariKnight commented Feb 9, 2025

in bazzite we have /usr/libexec/nvidia-legacy-hardware which will exit 0 (true) or exit 1 (false) depending on the user having legacy nvidia hardware.

We were going to originally use it to automatically rebase nvidia users with newer gpus to the nvidia-open image, but i am unsure if kyle ever did that.

this is the script

#!/usr/bin/bash
# Returns true if legacy nvidia hardware (older than turing) using die names
# GK### (Kepler), GM### (Maxwell), GP### (Pascal), GV### (Volta)
if lspci -nn | grep -P "(VGA compatible|3D) controller .+G(K|M|P|V)\d{3}" > /dev/null; then
    exit 0
fi
exit 1

this way we can make the toggle fail on legacy hardware, also unsure if Tesla cards will count as legacy, i could not find any proper info about that when i first made the script

@KyleGospo KyleGospo enabled auto-merge February 18, 2025 03:33
KyleGospo
KyleGospo previously approved these changes Feb 18, 2025
auto-merge was automatically disabled February 18, 2025 05:12

Head branch was pushed to by a user without write access

@ledif
Copy link
Collaborator Author

ledif commented Feb 18, 2025

in bazzite we have /usr/libexec/nvidia-legacy-hardware which will exit 0 (true) or exit 1 (false) depending on the user having legacy nvidia hardware.

We were going to originally use it to automatically rebase nvidia users with newer gpus to the nvidia-open image, but i am unsure if kyle ever did that.

this is the script

#!/usr/bin/bash
# Returns true if legacy nvidia hardware (older than turing) using die names
# GK### (Kepler), GM### (Maxwell), GP### (Pascal), GV### (Volta)
if lspci -nn | grep -P "(VGA compatible|3D) controller .+G(K|M|P|V)\d{3}" > /dev/null; then
    exit 0
fi
exit 1

this way we can make the toggle fail on legacy hardware, also unsure if Tesla cards will count as legacy, i could not find any proper info about that when i first made the script

Thanks for the snippet. I updated the PR to include it.

@HikariKnight HikariKnight added this pull request to the merge queue Feb 19, 2025
Merged via the queue into ublue-os:main with commit 2e89e98 Feb 19, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nvidia-open breaks toggle-nvk
5 participants