properly select the highest connected GPU

This commit is contained in:
Josh Lay 2022-11-03 20:09:52 -05:00
parent 70e756e01a
commit 471e055ca5
Signed by: jlay
GPG key ID: B265E45CACAD108A
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@
{# done this way to avoid issues with the card number possibly shifting after playbook run #}
# dynamically determine the connected GPU using the DRM subsystem
CARD=$(/usr/bin/grep -ls ^connected /sys/class/drm/*/status | /usr/bin/grep -o 'card[0-9]' | /usr/bin/sort | /usr/bin/uniq | /usr/bin/tail -1)
CARD=$(/usr/bin/grep -ls ^connected /sys/class/drm/*/status | /usr/bin/grep -o 'card[0-9]' | /usr/bin/sort | /usr/bin/uniq | /usr/bin/sort -h | /usr/bin/tail -1)
{# begin the templated script for 'default' profiles to reset state #}
{% if 'default' in item.0.key %}