diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2016-06-28 23:31:17 +0200 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2016-06-28 23:31:17 +0200 |
commit | 02ce63ea6c1edfc41b0ecd94d96fa5d6e7808ea2 (patch) | |
tree | d608c7dd5a422ebac0c964f5a03573462b8a1eda | |
parent | a1619f31e087e1212c050a6bfcadc3c532e465ae (diff) |
Cherry pick rev 4411 from trunk
-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 719865d..05755b0 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 |