Fixed GPU detection for newer AMD video cards
On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: modules/home/scripts/zcli.nix
This commit is contained in:
parent
e3c98cd633
commit
5957df54fd
1 changed files with 3 additions and 3 deletions
|
|
@ -232,18 +232,18 @@ in
|
|||
local has_vm=false
|
||||
|
||||
if ${pkgs.pciutils}/bin/lspci &> /dev/null; then # Check if lspci is available
|
||||
if ${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -qi 'vga\|3d'; then
|
||||
if ${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -qi 'vga\|3d\|display'; then
|
||||
while read -r line; do
|
||||
if echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'nvidia'; then
|
||||
has_nvidia=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'amd'; then
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'amd\|ati\|advanced micro devices'; then
|
||||
has_amd=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'intel'; then
|
||||
has_intel=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'virtio\|vmware'; then
|
||||
has_vm=true
|
||||
fi
|
||||
done < <(${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -i 'vga\|3d')
|
||||
done < <(${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -i 'vga\|3d\|display')
|
||||
|
||||
if "$has_vm"; then
|
||||
detected_profile="vm"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue