From 02ce63ea6c1edfc41b0ecd94d96fa5d6e7808ea2 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Tue, 28 Jun 2016 23:31:17 +0200 Subject: Cherry pick rev 4411 from trunk --- bin/graphics_env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3