-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a helpful message to bash for common secure boot & Nvidia u…
…ser issues.
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
system_files/desktop/shared/usr/etc/profile.d/bazzite-warnings.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
IMAGE_INFO="/usr/share/ublue-os/image-info.json" | ||
IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO) | ||
|
||
if [[ $IMAGE_FLAVOR = "nvidia" ]]; then | ||
if ! grep -q "nvidia" <<< $(lsmod) || grep -q "nouveau" <<< $(lsmod); then | ||
echo -e 'You are using a Nvidia image, but the Nvidia driver is not loaded:\n - If you are using secure boot, run "just enroll-secure-boot-key", then reboot and enter the password "ublue-os" when prompted.\n - If you are not using secure boot or have already enrolled the above key, ensure you have the needed kargs by running "just nvidia-set-kargs" and then rebooting.\n - This message will not appear if the issue is resolved.\n' | ||
fi | ||
else | ||
if ! grep -q "xone" <<< $(lsmod); then | ||
echo -e 'Requires drivers could not be loaded:\n - If you are using secure boot, run "just enroll-secure-boot-key", then reboot and enter the password "ublue-os" when prompted.\n - This message will not appear if the issue is resolved.\n' | ||
fi | ||
fi |