16 lines
329 B
Plaintext
16 lines
329 B
Plaintext
|
#!/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
|