Hello community, here is the log from the commit of package suse-prime for openSUSE:Factory checked in at 2019-01-15 09:16:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/suse-prime (Old) and /work/SRC/openSUSE:Factory/.suse-prime.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suse-prime" Tue Jan 15 09:16:47 2019 rev:4 rq:664721 version:0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/suse-prime/suse-prime.changes 2019-01-11 14:06:42.947725990 +0100 +++ /work/SRC/openSUSE:Factory/.suse-prime.new.28833/suse-prime.changes 2019-01-15 09:16:48.758211087 +0100 @@ -1,0 +2,10 @@ +Fri Jan 11 16:45:45 UTC 2019 - [email protected] + +- U_prime-select.sh-bail-out-if-nvidia-xconfig-fails-use.patch + * 'nvidia-xconfig --query-gpu-info' may easily fail due to missing + NVIDIA kernel modules or alike. Therefore bail out in this case + with exit 1. + * There could be more than one NVIDIA card/GPU in the system. Use + the first detected one for X configuration in that case. + +------------------------------------------------------------------- New: ---- U_prime-select.sh-bail-out-if-nvidia-xconfig-fails-use.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suse-prime.spec ++++++ --- /var/tmp/diff_new_pack.PJkbIt/_old 2019-01-15 09:16:49.190210686 +0100 +++ /var/tmp/diff_new_pack.PJkbIt/_new 2019-01-15 09:16:49.190210686 +0100 @@ -24,6 +24,7 @@ Group: System/X11/Utilities Url: https://github.com/michalsrb/SUSEPrime Source0: https://github.com/michalsrb/SUSEPrime/archive/%{version}.tar.gz#/SUSEPrime-%{version}.tar.gz +Patch0: U_prime-select.sh-bail-out-if-nvidia-xconfig-fails-use.patch Recommends: nvidia_driver Supplements: modalias(nvidia_driver:pci:v00008086d*sv*sd*bc03sc*i*) Conflicts: suse-prime-alt @@ -36,6 +37,7 @@ %prep %setup -n SUSEPrime-%{version} +%patch0 -p1 %build : ++++++ U_prime-select.sh-bail-out-if-nvidia-xconfig-fails-use.patch ++++++ >From 8be917026263539230b470e2c05cc46955e618c4 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch <[email protected]> Date: Fri, 11 Jan 2019 17:35:35 +0100 Subject: [PATCH] prime-select.sh: bail out if nvidia-xconfig fails; use PCI BusID of first NVIDIA GPU/card 'nvidia-xconfig --query-gpu-info' may easily fail due to missing NVIDIA kernel modules or alike. Therefore bail out in this case with exit 1. There could be more than one NVIDIA card/GPU in the system. Use the first detected one for X configuration in that case. --- prime-select.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prime-select.sh b/prime-select.sh index de51c2b..6613328 100755 --- a/prime-select.sh +++ b/prime-select.sh @@ -27,7 +27,13 @@ case $type in clean_files gpu_info=`nvidia-xconfig --query-gpu-info` - nvidia_busid=`echo "$gpu_info" |grep -i "PCI BusID"|sed 's/PCI BusID ://'|sed 's/ //g'` + # This may easily fail, if no NVIDIA kernel module is available or alike + if [ $? -ne 0 ]; then + echo "PCI BusID of NVIDIA card could not be detected!" + exit 1 + fi + # There could be more than on NVIDIA card/GPU; use the first one in that case + nvidia_busid=`echo "$gpu_info" |grep -i "PCI BusID"|head -n 1|sed 's/PCI BusID ://'|sed 's/ //g'` libglx_nvidia=`update-alternatives --list libglx.so|grep nvidia-libglx.so` update-alternatives --set libglx.so $libglx_nvidia -- 2.16.4
