melawy-archiso-config/Melawy-Linux-Developer-Edition/airootfs/usr/local/bin/online-install-nvidia-drivers

16 lines
329 B
Bash
Executable File

#!/bin/bash
_check_nvidia_card="$(chwd --is_nvidia_card | grep -q 'NVIDIA card found!'; echo $?)"
if [[ "${_check_nvidia_card}" -eq 0 ]]; then
echo "NVIDIA CARD FOUND!"
chwd -a pci nonfree 0300
else
chwd -a pci free 0300
fi
# Check for hybrid graphics
if [[ $(lspci -d "*:*:0302") ]]; then
chwd -a pci nonfree 0302
fi