Kodi Community Forum

Full Version: auto detection of video card for live CD boot up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Let me be more clear... this would eliminate the need to choose 1 for nvidia, 2 for ati, 3 for intel (and 4 for the show? jk)

This is possible.

the following command will output the mgf of the video card:

lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)'


now a simple if / then statement can be used inside of the initramfs loading scripts that is called before any script that configures X

basically you say (this is psudeo code):

if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == Intel
then (perform the same tasks as if the user hit #3 during boot process)
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == ATI
then (perform the same tasks as if the user hit #2 during boot process)
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == nVidia
then (perform the same tasks as if the user hit #1 during boot process)
else echo "buy a real video card. press any key to restart."
halt
end if

-CB