diff options
| author | Pierre Equoy <pierre.equoy@canonical.com> | 2016-06-27 14:50:52 +0800 |
|---|---|---|
| committer | Pierre Equoy <pierre.equoy@canonical.com> | 2016-06-27 14:50:52 +0800 |
| commit | ef75e8b2eb1fe28c073aab39bb80d18065c80323 (patch) | |
| tree | d608c7dd5a422ebac0c964f5a03573462b8a1eda /bin | |
| parent | b6f77c51c8051f76c10260e7096b5860291b7453 (diff) | |
provider:checkbox: Fix AMD hybrid testing graphics_env script
Previous version of graphics_env script was using the content of gpu-manager.log to check how many cards were available. Unfortunately, this file is not reliable because it uses udev which, as of today, does only care about proprietary drivers (nvidia, fglrx). We change the method to count the number of GPUs with something easier and more reliable.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/graphics_env | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/graphics_env b/bin/graphics_env index 719865d5..05755b04 100755 --- a/bin/graphics_env +++ b/bin/graphics_env @@ -13,7 +13,7 @@ UBUNTU_CODENAME=`lsb_release -c | awk {'print $2'}` # We only want to set the DRI_PRIME env variable on Xenial (16.04) systems # running more than 1 GPU. if [[ $UBUNTU_CODENAME == "xenial" ]]; then - NB_GPU=`cat /var/log/gpu-manager.log | grep "How many cards?" | awk {'print $NF'}` + NB_GPU=`udev_resource -l VIDEO | grep -oP -m1 '\d+'` if [ $NB_GPU -gt 1 ]; then if [[ $VENDOR_SLUG == *AMD* ]]; then if [ $INDEX -gt 1 ]; then |
