Skip to content

Commit

Permalink
feat: Add a helpful message to bash for common secure boot & Nvidia u…
Browse files Browse the repository at this point in the history
…ser issues.
  • Loading branch information
KyleGospo committed Sep 27, 2023
1 parent 403547d commit 98083aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions system_files/desktop/shared/usr/etc/profile.d/bazzite-warnings.sh
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

0 comments on commit 98083aa

Please sign in to comment.