Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ZFS-root.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,12 @@ XFCE=n

# If you have Nvidia video HW and you *know* which version of driver you want
# it can be preset here. Leaving undefined will cause the script to prompt.
# The package installed will be : nvidia-driver-${NVIDIA}
# The package installed will be : nvidia-${NVIDIA}
#
# none for no driver
# 390 or 470 for legacy driver
# 550 for current latest, or whatever version you prefer
# driver-390 or driver-470 for legacy driver
# driver-580 for current latest, or whatever version you prefer
# such as driver-580-open or headless-580-open
NVIDIA=none

# If installing Sound Open Firmware binaries (mostly for laptops) choose
Expand Down
16 changes: 10 additions & 6 deletions ZFS-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,15 @@ query_nvidia() {
# Installing Nvidia PPA here just so we can search for versions
apt-add-repository --yes --update ppa:graphics-drivers/ppa
NVIDIA_LATEST=$(apt-cache search nvidia-driver- | cut -d ' ' -f1 | grep -e "nvidia-driver-...$" | cut -d'-' -f3 | sort | tail -1)
NVIDIA=$(whiptail --title "Nvidia Hardware detected - install latest driver ?" --radiolist "Gnome/KDE/NEON was selected, and Nvidia graphics HW was detected on this system. The ppa:graphics-drivers/ppa repo could be installed in order to get the binary Nvidia driver\n\nNOTE: Be sure to select the correct driver - the latest (${NVIDIA_LATEST}) may not support older legacy HW. See\n\nhttps://www.nvidia.com/en-us/drivers/unix/legacy-gpu/\n\nfor more information on legacy HW. It is safe to select NONE if you are unsure. You can always install the appropriate driver later via Additional Drivers" 22 70 4 \
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
NVIDIA=$(whiptail --title "Nvidia Hardware detected - install latest driver ?" --radiolist "Gnome/KDE/NEON was selected, and Nvidia graphics HW was detected on this system. The ppa:graphics-drivers/ppa repo could be installed in order to get the binary Nvidia driver\n\nNOTE: Be sure to select the correct driver - the latest (${NVIDIA_LATEST}) may not support older legacy HW. See\n\nhttps://www.nvidia.com/en-us/drivers/unix/legacy-gpu/\n\nfor more information on legacy HW. It is safe to select NONE if you are unsure. You can always install the appropriate driver later via Additional Drivers" 22 70 4 \
NVIDIA=$(whiptail --title "Nvidia Hardware detected - install latest driver ?" --radiolist "Gnome/KDE/NEON was selected, and Nvidia graphics HW was detected on this system. The ppa:graphics-drivers/ppa repo could be installed in order to get the binary Nvidia driver\n\nNOTE: Be sure to select the correct driver - the latest (${NVIDIA_LATEST}) may not support older legacy HW. See\n\nhttps://www.nvidia.com/en-us/drivers/unix/legacy-gpu/\n\nfor more information on legacy HW. It is safe to select NONE if you are unsure. You can always install the appropriate driver later via Additional Drivers" 26 70 8 \

Need to adjust the size of the menu. List height should match the total items in the list

${NVIDIA_LATEST} "Latest ${NVIDIA_LATEST}" OFF \
470 "Legacy 470 driver" OFF \
390 "Legacy 390 driver" OFF \
none "No Nvidia driver" ON \
NVIDIA=$(whiptail --title "Nvidia Hardware detected - install latest driver ?" --radiolist "Gnome/KDE/NEON was selected, and Nvidia graphics HW was detected on this system. The ppa:graphics-drivers/ppa repo could be installed in order to get the binary Nvidia driver\n\nNOTE: Be sure to select the correct driver - the latest (${NVIDIA_LATEST}) may not support older legacy HW. See\n\nhttps://www.nvidia.com/en-us/drivers/unix/legacy-gpu/\n\nfor more information on legacy HW. It is safe to select NONE if you are unsure. You can always install the appropriate driver later via Additional Drivers" 22 70 9 \
driver-${NVIDIA_LATEST} "Latest ${NVIDIA_LATEST}" OFF \
driver-580-open "Open 580 driver" OFF \
headless-580-open "Open 580 driver (headless)" OFF \
driver-580 "Closed 580 driver" OFF \
headless-580 "Closed 580 driver (headless)" OFF \
driver-470 "Legacy 470 driver" OFF \
driver-390 "Legacy 390 driver" OFF \
none "No Nvidia driver" ON \
3>&1 1>&2 2>&3)
RET=${?}
[[ ${RET} = 1 ]] && exit 1
Expand Down Expand Up @@ -3305,7 +3309,7 @@ cat >> ${ZFSBUILD}/root/Setup.sh << '__EOF__'
# The NVIDIA var should be set to the appropriate version from the menu query
if [ "${NVIDIA}" != "none" ] ; then
apt-add-repository --yes --update ppa:graphics-drivers/ppa
apt-get -qq --yes install nvidia-driver-${NVIDIA} libxnvctrl0
apt-get -qq --yes install nvidia-${NVIDIA} libxnvctrl0
fi

####
Expand Down